本文整理汇总了PHP中deleteshares函数的典型用法代码示例。如果您正苦于以下问题:PHP deleteshares函数的具体用法?PHP deleteshares怎么用?PHP deleteshares使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了deleteshares函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lang
$share['title_template'] = lang('spacecp', 'share_image');
break;
case 'article':
$feed_hash_data = 'articleid' . $share['itemid'];
$share['title_template'] = lang('spacecp', 'share_article');
break;
case 'link':
$feed_hash_data = '';
break;
}
feed_add('share', '{actor} ' . $share['title_template'], array('hash_data' => $feed_hash_data), $share['body_template'], dunserialize($share['body_data']), $share['body_general'], array($share['image']), array($share['image_link']), '', '', '', 0, 0, '', $share['uid'], $share['username']);
}
updatemoderate('sid', $moderation['validate'], 2);
}
if (!empty($moderation['delete'])) {
require libfile('function/delete');
$shares = deleteshares($moderation['delete']);
$deletes = count($shares);
updatemoderate('sid', $moderation['delete'], 2);
}
if ($ignore_sids = dimplode($moderation['ignore'])) {
$ignores = C::t('home_share')->update($moderation['ignore'], array('status' => 2));
updatemoderate('sid', $moderation['ignore'], 1);
}
if ($_GET['fast']) {
echo callback_js($_GET['sid']);
exit;
} else {
cpmsg('moderate_shares_succeed', "action=moderate&operation=shares&page={$page}&filter={$filter}&dateline={$_GET['dateline']}&username={$_GET['username']}&keyword={$_GET['keyword']}&tpp={$_GET['tpp']}&showcensor={$showcensor}", 'succeed', array('validates' => $validates, 'ignores' => $ignores, 'deletes' => $deletes));
}
}
示例2: showsetting
$selected[$type] = $type ? 'selected="selected"' : '';
showsetting('share_search_icon', '', $type, "<select name='type'><option value=''>{$lang['all']}</option><option value='link' {$selected['link']}>{$lang['link']}</option>\r\n\t\t\t<option value='video' {$selected['video']}>{$lang['video']}</option><option value='music' {$selected['music']}>{$lang['music']}</option><option value='flash' {$selected['flash']}>Flash</option>\r\n\t\t\t<option value='blog' {$selected['blog']}>{$lang['blogs']}</option><option value='album' {$selected['album']}>{$lang['albums']}</option><option value='pic' {$selected['pic']}>{$lang['pics']}</option>\r\n\t\t\t<option value='space' {$selected['space']}>{$lang['members']}</option><option value='thread' {$selected['thread']}>{$lang['thread']}</option></select>");
showsetting('share_search_uid', 'uid', $uid, 'text');
showsetting('share_search_user', 'users', $users, 'text');
showsetting('share_search_sid', 'sid', $sid, 'text');
showsetting('share_search_hot', array('hot1', 'hot2'), array('', ''), 'range');
showsetting('share_search_time', array('starttime', 'endtime'), array($starttime, $endtime), 'daterange');
showsubmit('searchsubmit');
showtablefooter();
showformfooter();
showtagfooter('div');
} else {
$sids = authcode($sids, 'DECODE');
$sidsadd = $sids ? explode(',', $sids) : $_G['gp_delete'];
include_once libfile('function/delete');
$deletecount = count(deleteshares($sidsadd));
$cpmsg = cplang('share_succeed', array('deletecount' => $deletecount));
?>
<script type="text/JavaScript">alert('<?php
echo $cpmsg;
?>
');parent.$('shareforum').searchsubmit.click();</script>
<?php
}
if (submitcheck('searchsubmit', 1) || $newlist) {
$sids = $sharecount = '0';
$sql = $error = '';
$users = trim($users);
if ($users != '') {
$uids = '-1';
$query = DB::query("SELECT uid FROM " . DB::table('home_share') . " WHERE username IN ('" . str_replace(',', '\',\'', str_replace(' ', '', $users)) . "')");
示例3: exit
<?php
if (!defined('iBUAA') || !defined('IN_ADMINCP')) {
exit('Access Denied');
}
//权限
if (!($allowmanage = checkperm('manageshare'))) {
$_GET['uid'] = $_SGLOBAL['supe_uid'];
//只能操作本人的
$_GET['username'] = '';
}
if (submitcheck('batchsubmit')) {
include_once S_ROOT . './source/function_delete.php';
if (!empty($_POST['ids']) && deleteshares($_POST['ids'])) {
cpmessage('do_success', $_POST['mpurl']);
} else {
cpmessage('please_delete_the_correct_choice_to_share', $_POST['mpurl']);
}
}
$mpurl = 'admincp.php?ac=share';
//处理搜索
$intkeys = array('uid', 'sid');
$strkeys = array('username', 'type');
$randkeys = array(array('sstrtotime', 'dateline'), array('intval', 'hot'));
$likekeys = array();
$results = getwheres($intkeys, $strkeys, $randkeys, $likekeys);
$wherearr = $results['wherearr'];
$wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr);
$mpurl .= '&' . implode('&', $results['urls']);
//排序
$orders = getorders(array('dateline', 'hot'), 'sid');
示例4: deletedoings
$doings[] = $doing['doid'];
}
if ($doings) {
deletedoings($doings);
} else {
$next = 0;
$nextdeleteitem = 'share';
}
}
if ($deleteitem == 'share') {
$shares = array();
foreach (C::t('home_share')->fetch_all_by_uid($uids, $pertask) as $share) {
$shares[] = $share['sid'];
}
if ($shares) {
deleteshares($shares);
} else {
$next = 0;
$nextdeleteitem = 'feed';
}
}
if ($deleteitem == 'feed') {
C::t('home_follow_feed')->delete_by_uid($uids);
$nextdeleteitem = 'comment';
}
if ($deleteitem == 'comment') {
$comments = array();
$query = C::t('home_comment')->fetch_all_by_uid($uids, 0, $pertask);
foreach ($query as $comment) {
$comments[] = $comment['cid'];
}
示例5: 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;
}
}
}
示例6: exit
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: spacecp_share.php 22767 2011-05-20 03:23:37Z zhengqingpeng $
*/
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
$sid = intval($_GET['sid']);
if ($_GET['op'] == 'delete') {
if (submitcheck('deletesubmit')) {
require_once libfile('function/delete');
deleteshares(array($sid));
showmessage('do_success', $_GET['type'] == 'view' ? 'home.php?mod=space&quickforward=1&do=share' : dreferer(), array('sid' => $sid), array('showdialog' => 1, 'showmsg' => true, 'closetime' => true));
}
} elseif ($_GET['op'] == 'edithot') {
if (!checkperm('manageshare')) {
showmessage('no_privilege_edithot_share');
}
if ($sid) {
$query = DB::query("SELECT * FROM " . DB::table('home_share') . " WHERE sid='{$sid}'");
if (!($share = DB::fetch($query))) {
showmessage('share_does_not_exist');
}
}
if (submitcheck('hotsubmit')) {
$_POST['hot'] = intval($_POST['hot']);
DB::update('home_share', array('hot' => $_POST['hot']), array('sid' => $sid));
示例7: 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++;
}
}