本文整理汇总了PHP中group::edit方法的典型用法代码示例。如果您正苦于以下问题:PHP group::edit方法的具体用法?PHP group::edit怎么用?PHP group::edit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类group
的用法示例。
在下文中一共展示了group::edit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit
/**
Edits an existing group.
@return boolean
@throws Exception
*/
public function edit()
{
global $__in, $__out;
if ($__in['__is_form_submitted']) {
// if form is submitted
try {
$group = new group($__in['id']);
$group->edit($__in['group']);
return dispatcher::redirect("getall", "updated_successfully");
} catch (ValidationException $ex) {
$ex->publish_errors();
$__out['group'] = $__in['group'];
$__out['group']['id'] = $__in['id'];
} catch (Exception $ex) {
throw $ex;
}
} else {
// if form is not submitted
$group = new group($__in['id']);
$__out['group'] = $group->this_to_array();
}
// end if form submitted
return true;
}
示例2: dmsg
$do->itemid = $itemid;
if ($submit) {
if ($do->pass($post)) {
if ($FD) {
fields_check($post_fields);
}
if ($CP) {
property_check($post_ppt);
}
if ($FD) {
fields_update($post_fields, $table, $do->itemid);
}
if ($CP) {
property_update($post_ppt, $moduleid, $post['catid'], $do->itemid);
}
$do->edit($post);
dmsg('修改成功', $forward);
} else {
msg($do->errmsg);
}
} else {
$item = $do->get_one();
extract($item);
$addtime = timetodate($addtime);
$totime = $totime ? timetodate($totime, 3) : '';
$menuon = array('5', '4', '2', '1', '3');
$menuid = $menuon[$status];
include tpl($action, $module);
}
break;
case 'move':
示例3: intval
//收费会员
if ($vip > 9) {
$do->vip = $vip = 9;
}
if ($vip < 1) {
$do->vip = $vip = 1;
}
$setting['fee'] = intval($setting['fee']);
if ($setting['fee'] < 1) {
$setting['fee'] = 3000;
}
} else {
$do->vip = $vip = $setting['fee'] = 0;
}
$do->listorder = intval($listorder);
$do->edit($setting);
dmsg('修改成功', '?moduleid=' . $moduleid . '&file=' . $file . '&action=edit&groupid=' . $groupid);
} else {
include load('homepage.lang');
extract($do->get_one());
$menuid = 1;
if ($kw) {
$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);