private static function save($group_id, $group_name) { if ($group_id * 1 === -1) { $group = new group(); $group->name = $group_name; $group->insert(); } else { $group = new group(); $group->id = $group_id; $group->name = $group_name; $group->update(); } }
if ($tocatid) { $db->query("UPDATE {$table} SET catid={$tocatid} WHERE `{$fromtype}` IN ({$fromids})"); dmsg('移动成功', $forward); } else { msg('请选择目标分类'); } } else { $itemid = $itemid ? implode(',', $itemid) : ''; $menuid = 6; include tpl($action); } break; case 'update': 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;
function exponent_users_groupUpdate($formvalues, $group = null) { // DEPRECATE return group::update($formvalues, $group); }
public function update_group() { $group = new group(); $group->update($this->params); expHistory::back(); }
$fid = $r['fid'] ? $r['fid'] : 0; } isset($sid) or $sid = $fid; if (!isset($tid)) { $r = $db->get_one("SELECT max(itemid) AS tid FROM {$table}_group WHERE status>2"); $tid = $r['tid'] ? $r['tid'] : 0; } require MD_ROOT . '/group.class.php'; $do = new group(); isset($num) or $num = 100; if ($fid <= $tid) { $result = $db->query("SELECT itemid FROM {$table}_group WHERE status=3 AND itemid>={$fid} ORDER BY itemid LIMIT 0,{$num} "); if ($db->affected_rows($result)) { while ($r = $db->fetch_array($result)) { $itemid = $r['itemid']; $do->update($itemid); } $itemid += 1; } else { $itemid = $fid + $num; } } else { $all ? msg('', '?moduleid=' . $moduleid . '&file=' . $file . '&action=index&all=1&one=' . $one) : dmsg('更新成功', $this_forward); } msg('ID从' . $fid . '至' . ($itemid - 1) . '商圈更新成功' . progress($sid, $fid, $tid), "?moduleid={$moduleid}&file={$file}&action={$action}&sid={$sid}&fid={$itemid}&tid={$tid}&num={$num}&all={$all}&one={$one}"); break; case 'cate': $catid or msg('请选择分类'); isset($num) or $num = 50; isset($fid) or $fid = 1; $total = max(ceil($CAT['item'] / $MOD['pagesize']), 1);
<?php // +-------------------------------------------------+ // © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net) // +-------------------------------------------------+ // $Id: update_group.inc.php,v 1.7 2013-01-03 16:06:36 dgoron Exp $ if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) { die("no access"); } if (!$libelle_resp) { $respID = 0; } $group = new group($groupID); $group->set($group_name, $respID, $lettre_rappel, $mail_rappel, $lettre_rappel_show_nomgroup); $group->update(); if ($group->id && $group->libelle) { $groupID = $group->id; include './circ/groups/show_group.inc.php'; } else { error_message($msg[919], $msg[923], 1, './circ.php?categ=groups'); } ?>
isset($sid) or $sid = $fid; if (!isset($tid)) { $r = $db->get_one("SELECT max(itemid) AS tid FROM {$table} WHERE status>2 {$sql}"); $tid = $r['tid'] ? $r['tid'] : 0; } if ($update) { require MD_ROOT . '/group.class.php'; $do = new group($moduleid); } isset($num) or $num = 100; if ($fid <= $tid) { $result = $db->query("SELECT itemid FROM {$table} WHERE status>2 AND itemid>={$fid} {$sql} ORDER BY itemid LIMIT 0,{$num} "); if ($db->affected_rows($result)) { while ($r = $db->fetch_array($result)) { $itemid = $r['itemid']; $update ? $do->update($itemid) : tohtml('show', $module); } $itemid += 1; } else { $itemid = $fid + $num; } } else { if ($update) { $all ? msg('', '?moduleid=' . $moduleid . '&file=' . $file . '&action=index&all=1&one=' . $one) : dmsg('更新成功', $this_forward); } else { if ($one) { dheader('?file=html&action=back&mid=' . $moduleid); } $all ? msg($MOD['name'] . '生成成功', $this_forward) : dmsg($MOD['name'] . '生成成功', $this_forward); } }