<?php
	if (!Tourists()){ header('refresh:0;url=./index.php?act=olog'); exit; }

	@ob_start();
	session_start();

	if (!empty($_POST['text'])){

		$qqarr = explode (chr(10),str_replace (chr(13).chr(10),chr(10),$_POST['text']));
		foreach ($qqarr as $key => $value){
			$temp = explode('----',$value);
			if ($temp[0] && $temp[1]){
				$right++;
				$_SESSION['AnYue_QQ_'.$key] = $temp[0];
				$_SESSION['AnYue_PW_'.$key] = $temp[1];
			}
		}

		if ($right){
			$_SESSION['qqnum'] = $right; //QQ数量
			$_SESSION['jobnum'] = '0';   //已添加QQ
			$_SESSION['truenum'] = '0'; //添加成功QQ数
			$_SESSION['falsenum'] = '0'; //添加成功QQ数
			header('Location: ./index.php?act=batch_do');
		}else{
			$AnYue_Smarty -> assign ('info','<p>很抱歉，系统 <font color="red">未能分析得到相应QQ信息</font>，请 <font color="red">检查QQ数据是否符合规则</font>！</p><p>5秒后为您 <a href="index.php?act=batch"><font color="blue">跳转页面</font></a> ！</p><meta http-equiv="refresh" content="5;url=index.php?act=batch">');
		}

	}

	$AnYue_Smarty -> display ('batch.html');

