if(strlen($Next)<=0 || !CheckSerializedData($_REQUEST['NS']))
	{
		$NS = array(
			"max_execution_time" => $max_execution_time,
			"stepped" => $stepped,
			"max_file_size" => $max_file_size
		);
		if($site_id!="")
			$NS["SITE_ID"] = $site_id;
	}
	else
		$NS = unserialize($_REQUEST['NS']);

	if (class_exists("\\Freetrix\\Main\\Application", false))
		$res = \Freetrix\Main\UrlRewriter::reindexAll(($NS["stepped"]=="Y"? $NS["max_execution_time"]:0), $NS);
	else
		$res = CUrlRewriter::ReIndexAll(($NS["stepped"]=="Y"? $NS["max_execution_time"]:0), $NS);

	if(is_array($res)):
		//$res["STAT"]=$NS["STAT"];
		//$res["STAT"][]=$res["CNT"]-$NS["CNT"];
		//$perfomance = "<br>",implode($res["STAT"],", ");
		CAdminMessage::ShowMessage(array(
			"MESSAGE"=>GetMessage("url_rewrite_mess_title"),
			"DETAILS"=>GetMessage("MURL_REINDEX_TOTAL")." <b>".$res["CNT"]."</b>",
			"HTML"=>true,
			"TYPE"=>"OK",
		));
	?>
		<input type="hidden" id="NS" name="NS" value="<?php