<?php
require_once(dirname(__FILE__)."/config.php");
if($cfg_pp_type && $cfg_pp_isopen){
	//开启通行证反向接口
	$reurl = $cfg_pp_indexurl.'/'.$cfg_pp_loginurl;
	if(isset($gourl)){
		if (strpos($cfg_pp_loginurl,'?')) $reurl .= '&forward='.rawurlencode($gourl);
		else $reurl .= '?forward='.rawurlencode($gourl);
	}
	unset($cfg_pp_indexurl,$cfg_pp_regurl);
	header('Location: '.$reurl);exit;
}
require_once(dirname(__FILE__)."/templets/login.htm");
if(isset($dsql) && $dsql) $dsql->Close();
?>