<?php include 'header.tpl.php';?>
<script src="<?php echo WEB_URL?>/images/js/ajax.js"></script>
<script>
arr_article=new Array();
<?php foreach($arr_article as $item){?>
	arr_article[arr_article.length]=<?php echo $item["article_id"]?>;
<?php }?>
obj_x=parent.document.getElementById("id_body");
lng_html_len=<?php echo $int_pagesize*($get_page-1)?>;
lng_length=0;
function me_ajax(data){
	lng_length++;
	lng_html_len++;
	if(lng_length>=arr_article.length){
		<?php if($int_pages>$get_page){
			$lng_new_page=$get_page+1;
			echo "frmSet('act','html_exe');";
			echo "frmPage(".$lng_new_page.");";
		}else{
			echo 'obj_x.innerHTML="总数:'.$int_total.' 已生成:'.$int_total.'";';
			echo "alert('生成完成');";
		}?>
	}else{
		yj_ajax_get("<?php echo WEB_URL?>/index.php?apppath=<?php echo $this_app['path']?>&app=<?php echo $this_app['app']?>&id="+arr_article[lng_length]+"&ishtml=1&isajax=1",me_ajax);
		obj_x.innerHTML="总数:<?php echo $int_total;?> 已生成:"+lng_html_len+"　　<a href='<?php echo WEB_URL.$this_app['htmldir'];?>/"+arr_article[lng_length]+".html' target='_blank'><?php echo WEB_URL.$this_app['htmldir'];?>/"+arr_article[lng_length]+".html</a><br>";
	}
}

yj_ajax_get("<?php echo WEB_URL?>/index.php?apppath=<?php echo $this_app['path']?>&app=<?php echo $this_app['app']?>&id="+arr_article[lng_length]+"&ishtml=1",me_ajax);
obj_x.innerHTML="<a href='<?php echo WEB_URL.$this_app['htmldir'];?>/"+arr_article[lng_length]+".html' target='_blank'><?php echo WEB_URL.$this_app['htmldir'];?>/"+arr_article[lng_length]+".html</a><br>"+obj_x.innerHTML;
</script>
<input type="hidden" name="articleid" value="<?php echo $get_articleid?>">
<input type="hidden" name="folderid" value="<?php echo $get_folderid?>">
<?php include 'footer.tpl.php';?>		

