<?php
//error_reporting(0);

set_magic_quotes_runtime(0);
define('DEDE', str_replace("\\","/",substr(dirname(__FILE__), 0, -7)));

require_once DEDE.'../include/config_base.php';

$charset = 'utf-8';
$timestamp = time();

require_once DEDE.'../include/inc_memberlogin.php';
require_once DEDE.'./include/functions.inc.php';

if($cfg_ask == 'N'){
	showmsg('问答系统已关闭，请返回', '-1');
	exit;
}

$dbcharset = $cfg_db_language;

$cfg_ml = new MemberLogin();
$uid = $cfg_ml->M_ID;

$username = $cfg_ml->M_LoginID;
$scores = $cfg_ml->M_Scores;

$tpp = $cfg_ask_tpp;
$tpp = max(1,$tpp);

$dateformat = $cfg_ask_dateformat;
$timeformat = $cfg_ask_timeformat;
$timeoffset = $cfg_ask_timeoffset;


$page = isset($page) ? max(1, intval($page)) : 1;
$tid = isset($tid) && is_numeric($tid) ? $tid : 0;
$tid2 = isset($tid2) && is_numeric($tid2) ? $tid2 : 0;
$lm = isset($lm) && is_numeric($lm) ? $lm : 0;
$id = isset($id) && is_numeric($id) ? $id : 0;
$cfg_ask_expiredtime = isset($cfg_ask_expiredtime) && is_numeric($cfg_ask_expiredtime) ? $cfg_ask_expiredtime : 20;
$cfg_ask_expiredtime = max($cfg_ask_expiredtime, 1);

$sitename = $cfg_ask_sitename;
$indexname = 'index.php';
$symbols = $cfg_ask_symbols;

$dsql = new dedesql(-100);

?>