<?php
session_start();
include "header.html";
require_once "../MessageBox.php";
include "../datasource.inc.php";
include "../Function.php";
$Message = new MessageBox;
if ( empty($_SESSION["usernumber"]) and $_SESSION["userjs"] != "1") {
    $Message->setMessage("对不起，您没有权限进入后台管理!","logout.php");
    $Message->showMessage();
}

if ($_REQUEST['action'] == 'update00') {
	$file_name0 = $_FILES['picpath0']['name'];
	$picpath0 	= $image_path.$file_name0;
	if ($file_name0) {
		copy($_FILES['picpath0']['tmp_name'],$picpath0);
	}
	$sql  = "update index_pic set picpath0='$file_name0'";

    $result  = mysql_query($sql);
    $Message->setMessage("编辑成功!","index_pic.php");
    $Message->showMessage();
}	

if ($_REQUEST['action'] == 'update01') {
	$file_name1 = $_FILES['picpath1']['name'];
	$picpath1 	= $image_path.$file_name1;
	if ($file_name1) {
		copy($_FILES['picpath1']['tmp_name'],$picpath1);
	}
	$sql  = "update index_pic set picpath1='$file_name1'";

    $result  = mysql_query($sql);
    $Message->setMessage("编辑成功!","index_pic.php");
    $Message->showMessage();
}	

if ($_REQUEST['action'] == 'update011') {
	$file_name1 = $_FILES['picpath11']['name'];
	$picpath11 	= $image_path.$file_name1;
	if ($file_name1) {
		copy($_FILES['picpath11']['tmp_name'],$picpath11);
	}
	$sql  = "update index_pic set picpath11='$file_name1'";

    $result  = mysql_query($sql);
    $Message->setMessage("编辑成功!","index_pic.php");
    $Message->showMessage();
}	

if ($_REQUEST['action'] == 'update012') {
	$file_name12 = $_FILES['picpath12']['name'];
	$picpath12 	= $image_path.$file_name12;
	if ($file_name12) {
		copy($_FILES['picpath12']['tmp_name'],$picpath12);
	}
	$sql  = "update index_pic set picpath12='$file_name12'";

    $result  = mysql_query($sql);
    $Message->setMessage("编辑成功!","index_pic.php");
    $Message->showMessage();
}	

if ($_REQUEST['action'] == 'update02') {
	$file_name2 = $_FILES['picpath2']['name'];
	$picpath2 	= $image_path.$file_name2;
	if ($file_name2) {
		copy($_FILES['picpath2']['tmp_name'],$picpath2);
	}
	$sql  = "update index_pic set picpath2='$file_name2'";

    $result  = mysql_query($sql);
    $Message->setMessage("编辑成功!","index_pic.php");
    $Message->showMessage();
}	

if ($_REQUEST['action'] == 'update03') {
	$file_name3 = $_FILES['picpath3']['name'];
	$picpath3 	= $image_path.$file_name3;
	if ($file_name3) {
		copy($_FILES['picpath3']['tmp_name'],$picpath3);
	}
	$sql  = "update index_pic set picpath3='$file_name3'";

    $result  = mysql_query($sql);
    $Message->setMessage("编辑成功!","index_pic.php");
    $Message->showMessage();
}	

if ($_REQUEST['action'] == 'update04') {
	$file_name4 = $_FILES['picpath4']['name'];
	$picpath4 	= $image_path.$file_name4;
	if ($file_name4) {
		copy($_FILES['picpath4']['tmp_name'],$picpath4);
	}
	$sql  = "update index_pic set picpath4='$file_name4'";

    $result  = mysql_query($sql);
    $Message->setMessage("编辑成功!","index_pic.php");
    $Message->showMessage();
}	

if ($_REQUEST['action'] == 'update05') {
	$file_name5 = $_FILES['picpath5']['name'];
	$picpath5 	= $image_path.$file_name5;
	if ($file_name5) {
		copy($_FILES['picpath5']['tmp_name'],$picpath5);
	}
	$sql  = "update index_pic set picpath5='$file_name5'";

    $result  = mysql_query($sql);
    $Message->setMessage("编辑成功!","index_pic.php");
    $Message->showMessage();
}	

if ($_REQUEST['action'] == 'update06') {
	$file_name6 = $_FILES['picpath6']['name'];
	$picpath6 	= $image_path.$file_name6;
	if ($file_name6) {
		copy($_FILES['picpath6']['tmp_name'],$picpath6);
	}
	$sql  = "update index_pic set picpath6='$file_name6'";

    $result  = mysql_query($sql);
    $Message->setMessage("编辑成功!","index_pic.php");
    $Message->showMessage();
}	


?>
<table width="700" border="0" cellspacing="0" cellpadding="0">
        <tr>
         <TD vAlign=top><FONT color=#565656><IMG height=14
      src="../images/closedfold.gif" width=14>&nbsp;&nbsp;您当前的位置<BR><IMG
      height=15 src="../images/bar.gif" width=15><IMG height=14
      src="../images/openfold.gif" width=14>&nbsp;&nbsp;首页图片管理</FONT></TD>
        </tr>
</table>
</center>
<center>


<p align="center">&nbsp;<b><font size="3">管理首页图片</font></b></p>
<form action="index_pic.php" enctype="multipart/form-data" method=post name=form>
<table width="600"  border=0 cellpadding=0 cellspacing=1 bgcolor=#6795B4>

  <tr height=24>
    <td width="20%" bgColor=#EBF1F5><center><b>首页BANNER图</b></center></td>
    <td width="80%" bgColor=#ffffff><input type=file size="30" name="picpath0">象素：(295*215)</td>
  </tr>
</table>  
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input type="hidden" value="update00" name="action">
<input type="submit" value="编 辑" >&nbsp;&nbsp;<input type="reset"  value="取 消">
</form>  

<form action="index_pic.php" enctype="multipart/form-data" method=post name=form>
<table width="600"  border=0 cellpadding=0 cellspacing=1 bgcolor=#6795B4>
  <tr height=24>
    <td width="20%" bgColor=#EBF1F5><center><b>首页大图一</b></center></td>
    <td width="80%" bgColor=#ffffff><input type=file size="30" name="picpath1" value="">象素：(960*400)</td>
  </tr>
</table>  
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input type="hidden" value="update01" name="action">
<input type="submit" value="编 辑" >&nbsp;&nbsp;<input type="reset"  value="取 消">
</form> 

<form action="index_pic.php" enctype="multipart/form-data" method=post name=form>
<table width="600"  border=0 cellpadding=0 cellspacing=1 bgcolor=#6795B4>
  <tr height=24>
    <td width="20%" bgColor=#EBF1F5><center><b>首页大图二</b></center></td>
    <td width="80%" bgColor=#ffffff><input type=file size="30" name="picpath11" value="">象素：(960*400)</td>
  </tr>
</table>  
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input type="hidden" value="update011" name="action">
<input type="submit" value="编 辑" >&nbsp;&nbsp;<input type="reset"  value="取 消">
</form> 

<form action="index_pic.php" enctype="multipart/form-data" method=post name=form>
<table width="600"  border=0 cellpadding=0 cellspacing=1 bgcolor=#6795B4>
  <tr height=24>
    <td width="20%" bgColor=#EBF1F5><center><b>首页大图三</b></center></td>
    <td width="80%" bgColor=#ffffff><input type=file size="30" name="picpath12" value="">象素：(960*400)</td>
  </tr>
</table>  
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input type="hidden" value="update012" name="action">
<input type="submit" value="编 辑" >&nbsp;&nbsp;<input type="reset"  value="取 消">
</form> 
 
<form action="index_pic.php" enctype="multipart/form-data" method=post name=form>
<table width="600"  border=0 cellpadding=0 cellspacing=1 bgcolor=#6795B4>

  <tr height=24>
    <td width="20%" bgColor=#EBF1F5><center><b>首页小图一</b></center></td>
    <td width="80%" bgColor=#ffffff><input type=file size="30" name="picpath2">象素：(295*215)</td>
  </tr>
</table>  
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input type="hidden" value="update02" name="action">
<input type="submit" value="编 辑" >&nbsp;&nbsp;<input type="reset"  value="取 消">
</form>  
  
<form action="index_pic.php" enctype="multipart/form-data" method=post name=form>
<table width="600"  border=0 cellpadding=0 cellspacing=1 bgcolor=#6795B4>
  
  <tr height=24>
    <td width="20%" bgColor=#EBF1F5><center><b>首页小图二</b></center></td>
    <td width="80%" bgColor=#ffffff><input type=file size="30" name="picpath3">象素：(390*105)</td>
  </tr>
</table>  
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input type="hidden" value="update03" name="action">
<input type="submit" value="编 辑" >&nbsp;&nbsp;<input type="reset"  value="取 消">
</form>  

  
<form action="index_pic.php" enctype="multipart/form-data" method=post name=form>
<table width="600"  border=0 cellpadding=0 cellspacing=1 bgcolor=#6795B4>
  
  <tr height=24>
    <td width="20%" bgColor=#EBF1F5><center><b>首页小图三</b></center></td>
    <td width="80%" bgColor=#ffffff><input type=file size="30" name="picpath4">象素：(255*105)</td>
  </tr>
</table>  
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input type="hidden" value="update04" name="action">
<input type="submit" value="编 辑" >&nbsp;&nbsp;<input type="reset"  value="取 消">
</form>  

  
<form action="index_pic.php" enctype="multipart/form-data" method=post name=form>
<table width="600"  border=0 cellpadding=0 cellspacing=1 bgcolor=#6795B4>
  
  <tr height=24>
    <td width="20%" bgColor=#EBF1F5><center><b>首页小图四</b></center></td>
    <td width="80%" bgColor=#ffffff><input type=file size="30" name="picpath5">象素：(260*105)</td>
  </tr>
</table>  
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input type="hidden" value="update05" name="action">
<input type="submit" value="编 辑" >&nbsp;&nbsp;<input type="reset"  value="取 消">
</form>  
  
<form action="index_pic.php" enctype="multipart/form-data" method=post name=form>
<table width="600"  border=0 cellpadding=0 cellspacing=1 bgcolor=#6795B4>
  
    <tr height=24>
    <td width="20%" bgColor=#EBF1F5><center><b>首页小图五</b></center></td>
    <td width="80%" bgColor=#ffffff><input type=file size="30" name="picpath6">象素：(389*105)</td>
  </tr>

</table>  
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input type="hidden" value="update06" name="action">
<input type="submit" value="编 辑" >&nbsp;&nbsp;<input type="reset"  value="取 消">
</form>  

