<?php
/*
'**************************************************************************************************
' 软件名称: 搜一次 Content Management System
' 版本编号: Version 1.X
' 官方网站: http://www.syccms.com
' 官方论坛：http://bbs.syccms.com
' 版权所有: 搜一次运营团队
' 法律顾问: 杭州市元茂律师事务所 严飞律师
' 郑重声明:
'    1、任何个人或组织不得在未经授权的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；
'    2、搜一次网络事业部保留此软件的法律追究权利
'**************************************************************************************************
*/
include "../admin_loginstate.php";
include "../../include/conn.php";
include "../../include/function.php";
include "../admin_version.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link  href="../images/style.css" rel="stylesheet" type="text/css" />
<title>文件生成</title>
<script type="text/javascript" language="javascript">var tentpath='<?php echo S_SitePath?>';</script>
<script src="../js/jquery.js"></script>
<script language="javascript" src="../js/alerts.js"></script>
<link type="text/css" href="../images/alerts.css" rel="stylesheet" media="screen">
</head>
<body>

<?php
class ui_make{
	public function main(){
		global $db;
		if(S_Webmode==1){
			$disabled="disabled";
			}
		else{
			$disabled="";
			}	
		//视频分类
		$sqlclass="select * from s_class where S_SystemID=1 ";
		$results=$db->query($sqlclass);
		if($results){
			$classstr="";
			while ($row3=$db->fetch_array($results)){
				$classstr.="<option value=".$row3['S_ID'].">".$row3['S_Name']."</option>";
				}
			}
		//新闻分类	
		$sql="select * from s_class where S_SystemID=2 ";
		$result=$db->query($sql);
		if($result){
			$newsstr="";
			while ($row=$db->fetch_array($result)){
				$newsstr.="<option value=".$row['S_ID'].">".$row['S_Name']."</option>";
				}
			}			  
			  
?>
					 <table width="100%" border="0" cellpadding="0" cellspacing="0"   class="tb_style">
                        <form method="post" name="SpanSel" action=""> 
						<tr>
							<td  height="30" colspan="4"  class="td_title">&nbsp; <strong>生成网站文件选项</strong><font color="red">&nbsp; ＊　注意:只有在静态模式下才能生成除某些选项外的文件!</font></td>
						  </tr>
                        <tr>
						  <td class="td_border" colspan="4">&nbsp;&nbsp;<input type="submit" name="input" value="生成网站首页" class="rb1"  onclick="SpanSel.action='admin_spanindex.php?type=index'" />
&nbsp;&nbsp;
<input type="submit" name="input6" value="生成视频首页" class="rb1"  onclick="SpanSel.action='admin_spanindex.php?type=vodindex'" />
&nbsp;&nbsp;
<input type="submit" name="input62" value="生成文章首页" class="rb1"  onclick="SpanSel.action='admin_spanindex.php?type=artindex'" />
 &nbsp;&nbsp;
 <input type="submit" name="" value="一键生成专题" class="rb1"  onclick="SpanSel.action='admin_spantopic.php'" <?php echo $disabled?>/>
 &nbsp;&nbsp;生成视频	： <select name="sdayv">
                            	<option value=1>1天前</option>
                                <option value=2>2天前</option>
                                <option value=3>3天前</option>
                                <option value=4>4天前</option>
                                <option value=5>5天前</option>
                            </select>
                           &nbsp; <input type="submit" value="开始生成" class="rb1"  onclick="SpanSel.action='admin_spanvideoshow.php?sel=sday'" <?php echo $disabled?>/><br />
&nbsp;
<input type="submit" name="input3" value="生成网站地图" class="rb1"  onclick="SpanSel.action='admin_spanindex.php?type=map'" />
&nbsp;&nbsp; <input type="submit" name="input22" value="生成百度地图" class="rb1"  onclick="SpanSel.action='admin_spanxml.php?SelID=1'">
&nbsp;&nbsp; <input type="submit" name="input23" value="生成谷歌地图" class="rb1"  onclick="SpanSel.action='admin_spanxml.php?SelID=2'">
&nbsp;&nbsp; <input type="submit" name="input24" value="生成RRS订阅" class="rb1"  onclick="SpanSel.action='admin_spanxml.php?SelID=3'">
 &nbsp;&nbsp;生成文章	： <select name="sdaya">
                            	<option value="1">1天前</option>
                                <option value="2">2天前</option>
                                <option value="3">3天前</option>
                                <option value="4">4天前</option>
                                <option value="5">5天前</option>
                            </select>
                           &nbsp; <input type="submit" value="开始生成" class="rb1"  onclick="SpanSel.action='admin_spanarticleshow.php?sel=sday'" <?php echo $disabled?>/>
</td>
                         </tr>

                        <tr><td colspan="4" height="10">&nbsp;</td></tr>
                        <tr>
							<td  height="30" colspan="4"  class="td_title">&nbsp;&nbsp;<strong>生成影片选项</strong></td>
						  </tr>
                        <tr>
							<td width="13%" class="td_border">&nbsp;&nbsp;分类栏目选项：</td>
							<td width="15%" class="td_border">
								
								<Select name="ClassID">
									<option value="0">所有分类</option>
									<?php echo $classstr?>
							   </Select>							
                               </td>
							<td width="17%"  height="30" class="td_border">&nbsp;<input type="submit" name="" value="&nbsp;开始生成&nbsp;" class="rb1"  onclick="SpanSel.action='admin_spanvideolist.php'"  <?php echo $disabled?>/> </td>
						    <td width="55%"  height="30" class="td_border"><input type="button" name="input4" value="生成全部视频" class="rb1"  onclick="window.location='admin_spanvideolist.php?type=spanall'"  <?php echo $disabled?>/>
                            </td>
                        </tr>
                        <tr>
							<td width="13%" class="td_border">&nbsp;&nbsp;视频内容选项：</td>
							<td width="15%" class="td_border">
								
								<Select name="ClassIDs">
									<option value="0">所有内容</option>
									<?php echo  $classstr?>
							   </Select>							</td>
							<td height="30" class="td_border">&nbsp;<input type="submit" name="" value="&nbsp;开始生成&nbsp;" class="rb1"  onclick="SpanSel.action='admin_spanvideoshow.php'"  <?php echo $disabled?>/></td>
						    <td height="30" class="td_border"><input type="submit" name="input5" value="生成当天视频" class="rb1"  onclick="SpanSel.action='admin_spanvideoshow.php?sel=today'"  <?php echo $disabled?>/>
                            </td>
                        </tr>
						
                        <tr><td colspan="4" height="10">&nbsp;</td></tr>
                        <tr>
							<td  height="30" colspan="4"  class="td_title">&nbsp; <strong>生成文章选项</strong></td>
						  </tr>
                        <tr>
							<td width="13%" class="td_border">&nbsp;&nbsp;文章分类选项：</td>
							<td width="15%" class="td_border">
								
								<Select name="NewsClassID">
									<option value="0">所有分类</option>
                                    <?php echo $newsstr?>
 							   </Select>							</td>
							<td  height="30" class="td_border">&nbsp;<input type="submit" name="" value="&nbsp;开始生成&nbsp;" class="rb1"  onclick="SpanSel.action='admin_spanarticlelist.php'"  <?php echo $disabled?>/> </td>
						    <td  height="30" class="td_border"><input type="button"  value="生成全部文章" class="rb1"  onclick="window.location='admin_spanarticlelist.php?type=spanall'"  <?php echo $disabled?>/></td>
                        </tr>
                        <tr>
							<td width="13%" class="td_border">&nbsp;&nbsp;文章内容选项：</td>
							<td width="15%" class="td_border">
								
								<Select name="NewsClassIDs">
									<option value="0">所有内容</option>
                                    <?php echo $newsstr?>
							   </Select>							</td>
							<td height="30" class="td_border">&nbsp;<input type="submit" name="" value="&nbsp;开始生成&nbsp;" class="rb1"  onclick="SpanSel.action='admin_spanarticleshow.php'"  <?php echo $disabled?>/></td>
						    <td height="30" class="td_border"><input type="submit" name="input7" value="生成当天文章" class="rb1"  onclick="SpanSel.action='admin_spanarticleshow.php?sel=today'"  <?php echo $disabled?>/></td>
                        </tr>
						
                        <tr>
							<td  height="10" colspan="4" >&nbsp;</td>
						</tr>
                       <tr>
                       		<td colspan="4">
                            	<table cellpadding="0" cellspacing="0" border="0" width="100%" >
                                	 <tr>
                                        <td  height="30" colspan="4"   class="td_title">&nbsp;&nbsp;<strong>生成Xml文件选项</strong></td>
                                      </tr>
                                    <tr>
                                        <td width="18%"  class="td_border" height="30">&nbsp;&nbsp;生成百度Xml设置：</td>
                                        <td width="21%" class="td_border" >输出:
                                        <input type="text" name="CNumber1" value="100" size="15" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>&nbsp;条</td>
                                        <td width="61%" class="td_border" ><input type="submit" name="input2" value="开始生成Xml" class="rb1"  onclick="SpanSel.action='admin_spanxml.php?SelID=1'"  /></td>
                                    </tr>
                                    <tr>
                                        <td width="18%"  class="td_border" height="30">&nbsp;&nbsp;生成GoogleXml设置：</td>
                                        <td width="21%" class="td_border" >输出:
                                        <input type="text" name="CNumber2" value="100" size="15" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>&nbsp;条</td>
                                        
                                        <td width="61%" class="td_border" ><input type="submit" name="input2" value="开始生成Xml" class="rb1"  onclick="SpanSel.action='admin_spanxml.php?SelID=2'"  /></td>
                                    </tr>
                                    <tr>
                                        <td width="18%"  class="td_border" height="30">&nbsp;&nbsp;生成Rss订阅设置：</td>
                                        <td width="21%" class="td_border" >输出:
                                        <input type="text" name="CNumber3" value="100" size="15" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>&nbsp;条</td>
                                        <td width="61%" class="td_border" ><input type="submit" name="input2" value="开始生成Xml" class="rb1"  onclick="SpanSel.action='admin_spanxml.php?SelID=3'"  /></td>
                                    </tr>
                                </table>                            </td>
                       </tr>
						</form>
</table>
<?php		
		}
	}
?> 		
        
<?php
$ui=new ui_make;
$action=SafeRequest("action","get");
switch($action){
	case 'main':
		$ui->main();
		break;
	default:
		$ui->main();
	}
?>       
<?php include "../admin_bottom.php"; ?>
</body>
</html>