public function getGrade($where, $field, $isBatch) { $memberGrade = new grade(); $gradeInfo = $memberGrade->show($where, 0, 0, $field); return $isBatch ? $gradeInfo : ($gradeInfo[0] ? $gradeInfo[0] : array()); }
<?php defined('DT_ADMIN') or exit('Access Denied'); require MD_ROOT . '/grade.class.php'; $do = new grade(); $menus = array(array('升级记录', '?moduleid=' . $moduleid . '&file=' . $file), array('审核申请', '?moduleid=' . $moduleid . '&file=' . $file . '&action=check'), array('拒绝记录', '?moduleid=' . $moduleid . '&file=' . $file . '&action=reject'), array(VIP . '管理', '?moduleid=4&file=vip')); if (in_array($action, array('', 'check', 'reject'))) { $sfields = array('按条件', '公司名', '会员名', '联系人', '电话', '手机', 'Email', 'MSN', 'QQ', 'IP', '附言', '备注', '优惠码'); $dfields = array('company', 'company', 'username', 'truename', 'telephone', 'mobile', 'email', 'msn', 'qq', 'ip', 'content', 'note', 'promo_code'); $sorder = array('结果排序方式', '申请时间降序', '申请时间升序', '受理时间降序', '受理时间升序', '付款金额降序', '付款金额升序'); $dorder = array('addtime DESC', 'addtime DESC', 'addtime ASC', 'edittime DESC', 'edittime ASC', 'amount DESC', 'amount ASC'); isset($fields) && isset($dfields[$fields]) or $fields = 0; isset($order) && isset($dorder[$order]) or $order = 0; $fields_select = dselect($sfields, 'fields', '', $fields); $order_select = dselect($sorder, 'order', '', $order); $condition = ''; if ($keyword) { $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'"; } } $menuon = array('4', '2', '1', '0'); switch ($action) { case 'edit': $itemid or msg(); $do->itemid = $itemid; if ($submit) { if ($do->edit($post)) { dmsg('操作成功', $forward); } else { msg($do->errmsg); }
<?php header("Content-type:text/html;charset=utf-8"); require_once 'application/models/institute.php'; require_once 'application/models/answer.php'; require_once 'application/models/grade.php'; // require_once 'application/models/user.php'; 有关Email验证的未测试 $ins = new institute(); $res = $ins->getAllInstitute(); print_r($res); $ins = new grade(); $res = $ins->getAllGrade(); print_r($res); /* $ins = new answer(); // $time = date('h:i:s'); $set = array( 'AID' => 5, 'UID' => 3, 'QID' => 6, 'time' => date('Y-m-d'), 'content' => 'this is content, but no character here yes that is right', 'abstract' => 'yes no character' ); $result = $ins->getMostansweredQID(1, 2); print_r($result); // $result = $ins->updateAnswer(5,$set); // $result = $ins->deleteAnswer(5); // $time1 = date('h:i:s'); // print_r($result); // echo $time . ' ' . $time1;