本文整理汇总了PHP中group::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP group::delete方法的具体用法?PHP group::delete怎么用?PHP group::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类group
的用法示例。
在下文中一共展示了group::delete方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: person_rm_groups
function person_rm_groups($groups)
{
foreach ($groups as $i => $groupdata) {
$group = new group($groupdata['id']);
$group->delete();
}
}
示例2: delete
/**
Deletes one group @return boolean
@throws Exception
*/
public function delete()
{
global $__in, $__out;
try {
$group = new group();
$group->delete($__in['id']);
return dispatcher::redirect("getall", "deleted_successfully");
} catch (ValidationException $ex) {
$ex->publish_errors();
return dispatcher::redirect("getall");
} catch (Exception $ex) {
throw $ex;
}
}
示例3: msg
is_array($itemid) or msg('请选择商品');
foreach ($itemid as $v) {
$do->update($v);
}
dmsg('更新成功', $forward);
break;
case 'tohtml':
is_array($itemid) or msg('请选择商品');
foreach ($itemid as $itemid) {
tohtml('show', $module);
}
dmsg('生成成功', $forward);
break;
case 'delete':
$itemid or msg('请选择商品');
isset($recycle) ? $do->recycle($itemid) : $do->delete($itemid);
dmsg('删除成功', $forward);
break;
case 'restore':
$itemid or msg('请选择商品');
$do->restore($itemid);
dmsg('还原成功', $forward);
break;
case 'refresh':
$itemid or msg('请选择商品');
$do->refresh($itemid);
dmsg('刷新成功', $forward);
break;
case 'clear':
$do->clear();
dmsg('清空成功', $forward);
示例4: delete_many
/**
Deletes many groups.
@param arg_arr_ids array of group ids to be deleted.
@return true on success or false on failure if the the array if ids is not correct
*/
public function delete_many(array $arg_arr_ids)
{
if (!is_array($arg_arr_ids)) {
return false;
}
$group = new group();
while (list(, $id) = each($arg_arr_ids)) {
try {
$group->delete($id);
} catch (Exception $ex) {
}
}
return true;
}
示例5: group
<?php
/*
* This file is part of Infoschool - a web based school intranet.
* Copyright (C) 2004 Maikel Linke
*/
include 'var.php';
$output->secure();
$group = new group();
if (isset($_POST['id'])) {
$group->id = (int) $_POST['id'];
}
if (!$group->load() || !$group->is_head()) {
redirect('./');
}
$assured = false;
if (isset($_POST['assured'])) {
$assured = $_POST['assured'];
}
if ($assured) {
$group->delete();
redirect('group.php');
} else {
$v = $group->data;
$content = new tmpl('group_del.html', $v);
$output->out($content);
}
示例6: tpl
$all = 1;
ob_start();
}
include tpl('group_edit', $module);
if ($kw) {
$data = $content = ob_get_contents();
ob_clean();
$data = preg_replace('\'(?!((<.*?)|(<a.*?)|(<strong.*?)))(' . $kw . ')(?!(([^<>]*?)>)|([^>]*?</a>)|([^>]*?</strong>))\'si', '<span class=highlight>' . $kw . '</span>', $data);
$data = preg_replace('/<span class=highlight>/', '<a name=high></a><span class=highlight>', $data, 1);
echo $data ? $data : $content;
}
}
} else {
if ($action == 'delete') {
$groupid or msg();
$do->delete();
dmsg('删除成功', $this_forward);
} else {
if ($action == 'order') {
$do->order($listorder);
dmsg('排序成功', $forward);
} else {
$groups = array();
$result = $db->query("SELECT * FROM {$DT_PRE}member_group ORDER BY listorder ASC,groupid ASC");
while ($r = $db->fetch_array($result)) {
$r['type'] = $r['groupid'] > 7 ? '自定义' : '系统';
$groups[] = $r;
}
include tpl('group', $module);
}
}