<?php
$menumark = 'ask';
switch ($act) {
	//#####################@ 问答列表 @#####################//
	default:
		if (isset($_p_dosubmit)) {
			$_p_info['user_id'] = $_s_user_id;
			$_p_info['user_name'] = $_s_user_name;
			$_p_info['ask_atime'] = time();
			if ($db->pe_insert('ask', pe_dbhold($_p_info))) {
				pe_success('留言提交成功,等待管理员回复!');
			}
			else {
				pe_error('留言提交失败...');
			}
		}
		$info_list = $db->pe_selectall('ask', array('user_id'=>$_s_user_id, 'order by'=>'ask_id desc'), '*', array(6, $_g_page));

		$seo = pe_seo($menutitle='我要留言');
		include(pe_tpl('ask_list.html'));
	break;
}
pe_result();
?>