本文整理匯總了PHP中group::get_list方法的典型用法代碼示例。如果您正苦於以下問題:PHP group::get_list方法的具體用法?PHP group::get_list怎麽用?PHP group::get_list使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類group
的用法示例。
在下文中一共展示了group::get_list方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: msg
$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)) {
示例2: dalert
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='{$_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='{$_username}' AND status={$i}");
$nums[$i] = $r['num'];
}
}
$head_title = $L['my_group_title'];
示例3: template
$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='{$_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='{$_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');
示例4: foreach
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();