Beispiel #1
0
        $group = DB::fetch(DB::query("SELECT * FROM " . tname("shopgroup") . " WHERE id = '{$_GET['id']}' LIMIT 1"));
        foreach ($types as $k => $v) {
            $group[$v . '_field'] = explode(",", $group[$v . '_field']);
        }
    }
    // 添加或更改屬性的編輯頁面
    shownav('shop', 'group_' . $_GET['op']);
    showsubmenu('menu_group_add', array(array('nav_group', 'group', '0'), array('menu_group_' . $_GET['op'], 'group&op=' . $_GET['op'], '1')));
    showtips('group_' . $_GET['op'] . '_tips');
    showformheader('group&op=' . $_GET['op']);
    showtableheader('');
    showsetting('grouptitle', 'title', $group['title'], 'text');
    foreach ($types as $k => $v) {
        $group['enable' . $v] = !isset($group['enable' . $v]) ? 1 : $group['enable' . $v];
        showsetting('enable' . $v, 'enable' . $v, $group['enable' . $v], 'radio');
        showfieldform($v);
    }
    echo '<tr><td class="td27" colspan="2">';
    showjscatefield();
    echo '</td></tr>';
    $group['enablebrandlinks'] = !isset($group['enablebrandlinks']) ? 1 : $group['enablebrandlinks'];
    showsetting('enablebrandlinks', 'enablebrandlinks', $group['enablebrandlinks'], 'radio');
    echo '<script type="text/javascript" charset="' . $_G['charset'] . '">
		$(function() {

		});

		</script>';
    foreach ($types as $k => $v) {
        $group['verify' . $v] = !isset($group['verify' . $v]) ? 0 : $group['verify' . $v];
        showsetting('verify' . $v, 'verify' . $v, $group['verify' . $v], 'radio');
Beispiel #2
0
                 $checkedall = false;
             }
             $row .= '<div class="item' . ($checked ? ' checked' : '') . '"><a class="right" title="' . lang('config') . '" href="' . $_SERVER[SCRIPT_NAME] . '?frames=yes&action=perm&do=gperm&gset=' . $topkey . '_' . $k . '" target="_blank">&nbsp;</a><label class="txt"><input name="permnew[]" value="' . $item[1] . '" class="checkbox" type="checkbox" ' . ($checked ? 'checked="checked" ' : '') . ' onclick="checkclk(this)" />' . lang($item[0]) . '</label></div>';
         }
         $row .= '</td></tr>';
         if ($topkey != 'setting') {
             showtitle('<label><input class="checkbox" type="checkbox" onclick="permcheckall(this, \'perms_' . $topkey . '\')" ' . ($checkedall ? 'checked="checked" ' : '') . '/> ' . lang('header_' . $topkey) . '</label>');
         } else {
             showtitle('founder_perm_setting');
         }
         echo $row;
     }
     if (!empty($cpgroup['cpgroupshopcats'])) {
         $group['shop_field'] = explode(",", $cpgroup['cpgroupshopcats']);
     }
     showfieldform('shop');
     showjscatefield();
     showsubmit('submit');
     showtablefooter();
     showformfooter();
     if (!empty($_GET['switch'])) {
         echo '<script type="text/javascript">showMenu({\'ctrlid\':\'cpgselect\',\'pos\':\'34\'});</script>';
     }
 } else {
     DB::delete('admincp_perm', "cpgroupid='{$id}'");
     if ($_POST['permnew']) {
         foreach ($_POST['permnew'] as $perm) {
             DB::insert('admincp_perm', array('cpgroupid' => $id, 'perm' => $perm));
         }
     }
     //if(!empty($_POST['shop_field'])) {