function maketopic() { $topic = be("arr", "mtopic"); if (isN($topic)) { $topic = be("get", "mtopic"); } if (isN($topic) || $topic == 0) { alertUrl("请选择专题...", "admin_makehtml.php"); } makeTopicById($topic); }
function maketopicall() { global $flag, $makeinterval, $cache; $num = be("get", "num"); if ($flag == "art") { $topicarr = $cache[3]; } else { $topicarr = $cache[2]; } $topicarrconunt = count($topicarr); if ($topicarrconunt > 0) { if (isN($num)) { $num = 0; } else { if (intval($num) > intval($topicarrconunt) - 1) { alertUrl("所有专题生成完毕", "admin_makehtml.php"); } } makeTopicById($topicarr[$num]["t_id"]); echo "<br>暂停" . $makeinterval . "秒后继续生成<script language=\"javascript\">setTimeout(\"makeNexttype();\"," . $makeinterval . "000);function makeNexttype(){location.href='?action=topicall&flag=" . $flag . "&num=" . ($num + 1) . "';}</script>"; } else { echo "<font color='red'>没有任何专题数据</font><br>"; } }