本文整理汇总了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')) {
示例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;
}
}
示例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');
}
示例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;
示例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;
?>
示例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;
}
}
}
示例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;
示例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));
}
}
示例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
示例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';
示例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++;
}
}