Exemplo n.º 1
0
     $itemid or msg('请选择商品');
     $do->refresh($itemid);
     dmsg('刷新成功', $forward);
     break;
 case 'clear':
     $do->clear();
     dmsg('清空成功', $forward);
     break;
 case 'level':
     $itemid or msg('请选择商品');
     $level = intval($level);
     $do->level($itemid, $level);
     dmsg('级别设置成功', $forward);
     break;
 case 'recycle':
     $lists = $do->get_list('status=0' . $condition, $dorder[$order]);
     $menuid = 5;
     include tpl('index', $module);
     break;
 case 'reject':
     if ($itemid && !$psize) {
         $do->reject($itemid);
         dmsg('拒绝成功', $forward);
     } else {
         $lists = $do->get_list('status=1' . $condition, $dorder[$order]);
         $menuid = 4;
         include tpl('index', $module);
     }
     break;
 case 'expire':
     if (isset($refresh)) {
Exemplo n.º 2
0
                set_cookie('dmsg', $L['success_edit']);
                dalert('', '', 'parent.window.location="' . $forward . '"');
            } else {
                dalert($do->errmsg);
            }
        } else {
            extract($item);
        }
        break;
    default:
        $status = isset($status) ? intval($status) : 3;
        in_array($status, array(1, 2, 3)) or $status = 3;
        $condition = "username='******'";
        $condition .= " AND status={$status}";
        if ($keyword) {
            $condition .= " AND title LIKE '%{$keyword}%'";
        }
        if ($catid) {
            $condition .= $CAT['child'] ? " AND catid IN (" . $CAT['arrchildid'] . ")" : " AND catid={$catid}";
        }
        $lists = $do->get_list($condition, 'addtime desc');
        break;
}
if ($_userid) {
    $nums = array();
    for ($i = 1; $i < 4; $i++) {
        $r = $db->get_one("SELECT COUNT(*) AS num FROM {$table}_group WHERE username='******' AND status={$i}");
        $nums[$i] = $r['num'];
    }
}
$head_title = $L['my_group_title'];
Exemplo n.º 3
0
        $dorder = array($MOD['order'], 'orders DESC', 'orders ASC', 'sales DESC', 'sales ASC', 'price DESC', 'price ASC', 'marketprice DESC', 'marketprice ASC', 'savemoney DESC', 'savemoney ASC', 'discount DESC', 'discount ASC', 'amount DESC', 'amount ASC', 'minamount DESC', 'minamount ASC', 'hits DESC', 'hits ASC');
        isset($order) && isset($dorder[$order]) or $order = 0;
        $status = isset($status) ? intval($status) : 3;
        in_array($status, array(1, 2, 3, 4)) or $status = 3;
        $process = isset($process) ? intval($process) : '-1';
        $order_select = dselect($sorder, 'order', '', $order);
        $condition = "username='******' AND status={$status}";
        if ($keyword) {
            $condition .= " AND keyword LIKE '%{$keyword}%'";
        }
        if ($catid) {
            $condition .= $CAT['child'] ? " AND catid IN (" . $CAT['arrchildid'] . ")" : " AND catid={$catid}";
        }
        if ($process > -1) {
            $condition .= " AND process={$process}";
        }
        $timetype = strpos($MOD['order'], 'add') !== false ? 'add' : '';
        $lists = $do->get_list($condition, $dorder[$order]);
        break;
}
if ($_userid) {
    $nums = array();
    for ($i = 1; $i < 5; $i++) {
        $r = $db->get_one("SELECT COUNT(*) AS num FROM {$table} WHERE username='******' AND status={$i}");
        $nums[$i] = $r['num'];
    }
    $r = $db->get_one("SELECT COUNT(*) AS num FROM {$table}_order WHERE seller='{$_username}'");
    $nums[9] = $r['num'];
}
$head_title = lang($L['module_manage'], array($MOD['name']));
include template('my_' . $module, 'member');
Exemplo n.º 4
0
    echo "</table>";
    echo "</fieldset>";
    // add new user
    echo "<p><form method='get' action='admin.php'>";
    echo "<fieldset><legend>Neuer Benutzer</legend>";
    echo form::field("text", "user", "", 30, "", "Username ", "", "new-username");
    echo "<br>";
    echo form::field("password", "password", "", 30, "", "Password ", "", "new-password");
    echo "<br>";
    echo form::field("submit", "action", "anlegen");
    echo form::field("hidden", "action", "add");
    echo "</fieldset>";
    echo "</form>";
    // ----------------------------------------------------------------------------
    // list groups
    $groupArray = group::get_list();
    echo "<fieldset><legend>Gruppen</legend>";
    echo "<table>";
    echo "<th>group</th>";
    echo "<th>rights</th>";
    foreach ($groupArray as $entry) {
        echo "<tr>";
        echo "<td>" . $entry[text] . "</td>";
        echo "<td>" . right::int2string($entry[rights], group::superuser($entry[value])) . "</td>";
        echo "</tr>";
    }
    echo "</table>";
    echo "</fieldset>";
    echo "</div>";
} else {
    form::standard();