find($id); if ($info && $info['pic']) { $table[] = ''; return Dever::table($table); } return ''; } public function upPic($id, $name, $data) { $type = Dever::param('type', $data); $act_id = Dever::param('act_id', $data); $pic = Dever::param('pic', $data); if ($pic) { if (is_string($pic)) { $pic = explode(',', $pic); } $insert['type'] = $type; $insert['act_id'] = $act_id; foreach($pic as $k => $v) { $insert['pic'] = $v; Dever::load('content/pic')->insert($insert); } } } public function baoming() { $id = Dever::input('baoming_id'); $order_db = Dever::db('content/baoming'); $order = $order_db->one($id); $order['config'] = $order_db->config['set']; $content = array(); $content[0][] = array('当前状态', Dever::status($order['config']['status'], $order['status'])); $content[0][] = array('报名时间', date('Y-m-d H:i', $order['cdate'])); if (isset($order['audit_admin']) && $order['audit_admin']) { $admin = Dever::db('manage/admin')->find($order['audit_admin']); $content[1][] = array ( array('审核人', $admin['username']), array('审核状态', Dever::status($order['config']['audit'], $order['audit'])), array('审核备注', $order['audit_desc']), ); } $result = array(); $result['基本信息'] = array ( 'type' => 'info', 'content' => $content, ); $head = array ( 'name' => '基本信息', 'btn' => $this->show_button($order, $order_table), ); $html = Dever::show($head, $result); return $html; } # 显示按钮 private function show_button($order, $order_table) { $button = array(); if ($order['status'] == 1) { list($project, $table) = explode('/', $order_table); $url = Dever::url('project/database/update?project='.$project.'&table='.$table.'&where_id='.$order['id'].'&col=audit,audit_desc', 'manage'); $button[] = array ( 'type' => 'edit', 'link' => $url, 'name' => '审核', ); } return $button; } }