当前位置: 首页>>代码示例>>PHP>>正文


PHP deleteblogs函数代码示例

本文整理汇总了PHP中deleteblogs函数的典型用法代码示例。如果您正苦于以下问题:PHP deleteblogs函数的具体用法?PHP deleteblogs怎么用?PHP deleteblogs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了deleteblogs函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showmessage

    if ($newblog = blog_post($_POST, $blog)) {
        if (empty($blog) && $newblog['topicid']) {
            $url = 'space.php?do=topic&topicid=' . $newblog['topicid'] . '&view=blog';
        } else {
            $url = 'space.php?uid=' . $newblog['uid'] . '&do=blog&id=' . $newblog['blogid'];
        }
        showmessage('do_success', $url, 0);
    } else {
        showmessage('that_should_at_least_write_things');
    }
}
if ($_GET['op'] == 'delete') {
    //删除
    if (submitcheck('deletesubmit')) {
        include_once S_ROOT . './source/function_delete.php';
        if (deleteblogs(array($blogid))) {
            showmessage('do_success', "space.php?uid={$blog['uid']}&do=blog&view=me");
        } else {
            showmessage('failed_to_delete_operation');
        }
    }
} elseif ($_GET['op'] == 'goto') {
    $id = intval($_GET['id']);
    $uid = $id ? getcount('blog', array('blogid' => $id), 'uid') : 0;
    showmessage('do_success', "space.php?uid={$uid}&do=blog&id={$id}", 0);
} elseif ($_GET['op'] == 'edithot') {
    //权限
    if (!checkperm('manageblog')) {
        showmessage('no_privilege');
    }
    if (submitcheck('hotsubmit')) {
开发者ID:NaturalWill,项目名称:UCQA,代码行数:31,代码来源:cp_blog.php

示例2: deletePost

 function deletePost($blogname, $blogid, $username, $password, $boolean = true)
 {
     global $_SGLOBAL;
     $this->authUser($username, $password);
     include_once S_ROOT . './source/function_delete.php';
     $blogid = intval($blogid);
     if (deleteblogs(array($blogid))) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:NaturalWill,项目名称:UCQA,代码行数:12,代码来源:class_xmlrpc.php

示例3: cplang

     $cpmsg = cplang('blog_succeed', array('deletecount' => $deletecount));
 } else {
     $blogs = $catids = array();
     $selectblogids = !empty($_GET['ids']) && is_array($_GET['ids']) ? $_GET['ids'] : array();
     if ($selectblogids) {
         $query = C::t('home_blog')->fetch_all($selectblogids);
         foreach ($query as $value) {
             $blogs[$value['blogid']] = $value;
             $catids[] = intval($value['catid']);
         }
     }
     if ($blogs) {
         $selectblogids = array_keys($blogs);
         if ($_POST['optype'] == 'delete') {
             include_once libfile('function/delete');
             $deletecount = count(deleteblogs($selectblogids));
             $cpmsg = cplang('blog_succeed', array('deletecount' => $deletecount));
         } elseif ($_POST['optype'] == 'move') {
             $tocatid = intval($_POST['tocatid']);
             $catids[] = $tocatid;
             $catids = array_merge($catids);
             C::t('home_blog')->update($selectblogids, array('catid' => $tocatid));
             foreach ($catids as $catid) {
                 $catid = intval($catid);
                 $cnt = C::t('home_blog')->count_by_catid($catid);
                 C::t('home_blog_category')->update($catid, array('num' => $cnt));
             }
             $cpmsg = cplang('blog_move_succeed');
         } else {
             $cpmsg = cplang('blog_choose_at_least_one_operation');
         }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:admincp_blog.php

示例4: libfile

             require_once libfile('function/cache');
             updatecache('globalstick');
         }
     } else {
         $next = 0;
         $nextdeleteitem = 'blog';
     }
 }
 if ($deleteitem == 'blog') {
     $blogs = array();
     $query = C::t('home_blog')->fetch_blogid_by_uid($uids, 0, $pertask);
     foreach ($query as $blog) {
         $blogs[] = $blog['blogid'];
     }
     if ($blogs) {
         deleteblogs($blogs);
     } else {
         $next = 0;
         $nextdeleteitem = 'pic';
     }
 }
 if ($deleteitem == 'pic') {
     $pics = array();
     $query = C::t('home_pic')->fetch_all_by_uid($uids, 0, $pertask);
     foreach ($query as $pic) {
         $pics[] = $pic['picid'];
     }
     if ($pics) {
         deletepics($pics);
     } else {
         $next = 0;
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:admincp_members.php

示例5: cplang

        $cpmsg = cplang('blog_succeed', array('deletecount' => $deletecount));
    } else {
        $blogs = $catids = array();
        $selectblogids = !empty($_GET['ids']) && is_array($_GET['ids']) ? $_GET['ids'] : array();
        if ($selectblogids) {
            $query = C::t('home_blog')->fetch_all($selectblogids);
            foreach ($query as $value) {
                $blogs[$value['blogid']] = $value;
                $catids[] = intval($value['catid']);
            }
        }
        if ($blogs) {
            $selectblogids = array_keys($blogs);
            if ($_POST['optype'] == 'delete') {
                include_once libfile('function/delete');
                $deletecount = count(deleteblogs($selectblogids, true));
                $cpmsg = cplang('blog_succeed', array('deletecount' => $deletecount));
            } elseif ($_POST['optype'] == 'restore') {
                $restore = C::t('home_blog')->update($selectblogids, array('status' => 0));
                $cpmsg = cplang('blog_restore_succeed', array('restorecount' => $restore));
            } else {
                $cpmsg = cplang('blog_choose_at_least_one_operation');
            }
        } else {
            $cpmsg = cplang('blog_choose_at_least_one_blog');
        }
    }
    ?>
<script type="text/JavaScript">alert('<?php 
    echo $cpmsg;
    ?>
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:admincp_blogrecyclebin.php

示例6: deleteinfo

function deleteinfo($ids)
{
    global $_SGLOBAL;
    include_once S_ROOT . './source/function_delete.php';
    $deltype = array();
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('report') . " WHERE rid IN (" . simplode($ids) . ")");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        $deltype[$value['idtype']][] = $value['id'];
    }
    $gid = getgroupid($_SGLOBAL['member']['credit'], $_SGLOBAL['member']['groupid']);
    //执行相应的删除操作
    foreach ($deltype as $key => $value) {
        switch ($key) {
            case 'blog':
                $_SGLOBAL['usergroup'][$gid]['manageblog'] = 1;
                deleteblogs($value);
                break;
            case 'picid':
                $_SGLOBAL['usergroup'][$gid]['managealbum'] = 1;
                deletepics($value);
                break;
            case 'album':
                $_SGLOBAL['usergroup'][$gid]['managealbum'] = 1;
                deletealbums($value);
                break;
            case 'thread':
                $_SGLOBAL['usergroup'][$gid]['managethread'] = 1;
                deletethreads(0, $value);
                break;
            case 'mtag':
                $_SGLOBAL['usergroup'][$gid]['managemtag'] = 1;
                deletemtag($value);
                break;
            case 'share':
                $_SGLOBAL['usergroup'][$gid]['manageshare'] = 1;
                deleteshares($value);
                break;
            case 'space':
                $_SGLOBAL['usergroup'][$gid]['managespace'] = 1;
                foreach ($value as $uid) {
                    deletespace($uid);
                }
                break;
        }
    }
}
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:46,代码来源:admincp_report.php

示例7: intval

*/
include_once '../data_oauth_check.php';
$userid = intval(oauth_check());
include_once '../../../common.php';
include_once S_ROOT . './uc_client/client.php';
@(include_once S_ROOT . './data/data_profield.php');
$blogid = intval($_POST['blogid']);
//$userid = 96 ;
//$blogid = 146;
$query = $_SGLOBAL['db']->query("SELECT uid from " . tname('blog') . " where blogid={$blogid} ");
$blog = $_SGLOBAL['db']->fetch_array($query);
/*print_r($blog[uid]);
	echo "SELECT uid from ".tname('blog')." where blogid=$blogid ";
	exit;*/
if ($blog[uid] == $userid) {
    $delete = deleteblogs(array($blogid));
    if ($delete) {
        $arrs = array('flag' => 'success');
    } else {
        $arrs = array('flag' => 'fail');
    }
    $result = json_encode($arrs);
    $result = preg_replace("#\\\\u([0-9a-f]+)#ie", "iconv('UCS-2BE', 'UTF-8', pack('H4', '\\1'))", $result);
    echo $result;
    exit;
} else {
    $arrs = array('flag' => 'fail');
    $result = json_encode($arrs);
    $result = preg_replace("#\\\\u([0-9a-f]+)#ie", "iconv('UCS-2BE', 'UTF-8', pack('H4', '\\1'))", $result);
    echo $result;
    exit;
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:do_deleteblog.php

示例8: array

            $moderate[$act][] = $blogid;
        }
    }
    if ($validate_blogids = dimplode($moderate['validate'])) {
        DB::update('home_blog', array('status' => '0'), "blogid IN ({$validate_blogids})");
        $validates = DB::affected_rows();
        $query_t = DB::query("SELECT uid, COUNT(blogid) AS count\r\n\t\t\tFROM " . DB::table('home_blog') . "\r\n\t\t\tWHERE blogid IN ({$validate_blogids})\r\n\t\t\tGROUP BY uid");
        while ($blog_user = DB::fetch($query_t)) {
            $credit_times = $blog_user['count'];
            updatecreditbyaction('publishblog', $blog_user['uid'], array('blogs' => 1), '', $credit_times);
        }
        updatemoderate('blogid', $moderate['validate'], 2);
    }
    if ($moderate['delete']) {
        require_once libfile('function/delete');
        $delete_blogs = deleteblogs($moderate['delete']);
        $deletes = count($delete_blogs);
        updatemoderate('blogid', $moderate['delete'], 2);
    }
    if ($ignore_blogids = dimplode($moderate['ignore'])) {
        DB::update('home_blog', array('status' => '2'), "blogid IN ({$ignore_blogids})");
        $ignores = DB::affected_rows();
        updatemoderate('blogid', $moderate['ignore'], 1);
    }
    if ($_G['gp_fast']) {
        echo callback_js($_G['gp_blogid']);
        exit;
    } else {
        cpmsg('moderate_blogs_succeed', "action=moderate&operation=blogs&page={$page}&filter={$filter}&dateline={$_G['gp_dateline']}&username={$_G['gp_username']}&title={$_G['gp_title']}&tpp={$_G['gp_tpp']}&showcensor={$showcensor}", 'succeed', array('validates' => $validates, 'ignores' => $ignores, 'recycles' => $recycles, 'deletes' => $deletes));
    }
}
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:moderate_blog.php

示例9: exit

/*
	[UCenter Home] (C) 2007-2008 Comsenz Inc.
	$Id: admincp_blog.php 9233 2008-10-28 06:21:44Z liguode $
*/
if (!defined('IN_UCHOME') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
//权限
if (!($allowmanage = checkperm('manageblog'))) {
    $_GET['uid'] = $_SGLOBAL['supe_uid'];
    //只能操作本人的
    $_GET['username'] = '';
}
if (submitcheck('deletesubmit')) {
    include_once S_ROOT . './source/function_delete.php';
    if (!empty($_POST['ids']) && deleteblogs($_POST['ids'])) {
        cpmessage('do_success', $_POST['mpurl']);
    } else {
        cpmessage('the_correct_choice_to_delete_the_log', $_POST['mpurl']);
    }
}
$mpurl = 'admincp.php?ac=blog';
//处理搜索
$intkeys = array('uid', 'friend', 'blogid');
$strkeys = array('username');
$randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'viewnum'), array('intval', 'replynum'));
$likekeys = array('subject');
$results = getwheres($intkeys, $strkeys, $randkeys, $likekeys, 'b.');
$wherearr = $results['wherearr'];
$mpurl .= '&' . implode('&', $results['urls']);
//限制条件2
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:31,代码来源:admincp_blog.php

示例10: showsetting

    showsetting('blog_search_user', 'users', $users, 'text');
    showsetting('blog_search_keyword', 'keywords', $keywords, 'text');
    showsetting('blog_search_lengthlimit', 'lengthlimit', $lengthlimit, 'text');
    showsetting('blog_search_view', array('viewnum1', 'viewnum2'), array('', ''), 'range');
    showsetting('blog_search_reply', array('replynum1', 'replynum2'), array('', ''), 'range');
    showsetting('blog_search_hot', array('hot1', 'hot2'), array('', ''), 'range');
    showsetting('blog_search_time', array('starttime', 'endtime'), array($starttime, $endtime), 'daterange');
    showsubmit('searchsubmit');
    showtablefooter();
    showformfooter();
    showtagfooter('div');
} else {
    $blogids = authcode($blogids, 'DECODE');
    $blogidsadd = $blogids ? explode(',', $blogids) : $_G['gp_delete'];
    include_once libfile('function/delete');
    $deletecount = count(deleteblogs($blogidsadd));
    $cpmsg = cplang('blog_succeed', array('deletecount' => $deletecount));
    ?>
<script type="text/JavaScript">alert('<?php 
    echo $cpmsg;
    ?>
');parent.$('blogforum').searchsubmit.click();</script>
<?php 
}
if (submitcheck('searchsubmit')) {
    $blogids = $blogcount = '0';
    $sql = $error = '';
    $keywords = trim($keywords);
    $users = trim($users);
    if ($users != '') {
        $uids = '-1';
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:31,代码来源:admincp_blog.php

示例11: deleteinfo

function deleteinfo($ids)
{
    global $_SGLOBAL;
    include_once S_ROOT . './source/function_delete.php';
    $deltype = array();
    $reportuser = array();
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('report') . " WHERE rid IN (" . simplode($ids) . ")");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        $value['user'] = unserialize($value['uids']);
        $reportuser[] = array_shift(array_flip($value['user']));
        $deltype[$value['idtype']][] = $value['id'];
    }
    $gid = getgroupid($_SGLOBAL['member']['experience'], $_SGLOBAL['member']['groupid']);
    //Perform the corresponding delete operations
    $i = 0;
    $_SGLOBAL['usergroup'][$gid]['managebatch'] = 1;
    foreach ($deltype as $key => $value) {
        switch ($key) {
            case 'blogid':
                $_SGLOBAL['usergroup'][$gid]['manageblog'] = 1;
                deleteblogs($value);
                break;
            case 'picid':
                $_SGLOBAL['usergroup'][$gid]['managealbum'] = 1;
                deletepics($value);
                break;
            case 'albumid':
                $_SGLOBAL['usergroup'][$gid]['managealbum'] = 1;
                deletealbums($value);
                break;
            case 'tid':
                $_SGLOBAL['usergroup'][$gid]['managethread'] = 1;
                deletethreads(0, $value);
                break;
            case 'tagid':
                $_SGLOBAL['usergroup'][$gid]['managemtag'] = 1;
                deletemtag($value);
                break;
            case 'sid':
                $_SGLOBAL['usergroup'][$gid]['manageshare'] = 1;
                deleteshares($value);
                break;
            case 'uid':
                $_SGLOBAL['usergroup'][$gid]['managedelspace'] = 1;
                foreach ($value as $uid) {
                    deletespace($uid);
                }
                break;
            case 'eventid':
                $_SGLOBAL['usergroup'][$gid]['manageevent'] = 1;
                deleteevents($value);
                break;
            case 'pid':
                $_SGLOBAL['usergroup'][$gid]['managepoll'] = 1;
                deletepolls($value);
                break;
            case 'comment':
                $_SGLOBAL['usergroup'][$gid]['managecomment'] = 1;
                deletecomments($value);
                break;
            case 'post':
                $_SGLOBAL['usergroup'][$gid]['managethread'] = 1;
                deleteposts(0, $value);
                break;
        }
        //The first reporter award
        getreward('report', 1, $reportuser[$i], '', 0);
        $i++;
    }
}
开发者ID:v998,项目名称:discuzx-en,代码行数:70,代码来源:admincp_report.php


注:本文中的deleteblogs函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。