當前位置: 首頁>>代碼示例>>PHP>>正文


PHP iACP類代碼示例

本文整理匯總了PHP中iACP的典型用法代碼示例。如果您正苦於以下問題:PHP iACP類的具體用法?PHP iACP怎麽用?PHP iACP使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了iACP類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的iACP類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。