<!--<?php
# MetInfo Enterprise Content Management System 
# Copyright (C) MetInfo Co.,Ltd (http://www.metinfo.cn). All rights reserved. 
require_once template('head'); 
$classjs="<script language = 'JavaScript'>\n";
$classjs.="var classcount;\n";
$classjs.="subclass = new Array();\n";
$i=0;
foreach ($met_class1 as $key=>$val){
foreach ($met_class2[$val[id]] as $key=>$val2){
$classjs.="subclass[".$i."] = new Array('".$val2[id]."','".$val2[bigclass]."','".$val[id]."');\n";
	 $i=$i+1;
foreach($met_class3[$val2[id]] as $key=>$val3){
$classjs.="subclass[".$i."] = new Array('".$val3[id]."','".$val3[bigclass]."','".$val[id]."');\n";
	 $i=$i+1;
}
}
}
$classjs.="classcount=".$i.";\n";
$classjs.="</script>";
echo <<<EOT
-->
<title>{$lang_setflashset}</title>
</head>
$classjs
<script language="javascript" type="text/javascript">
function viewflash(flashtype,classid){
var nowurl='view'+classid;
document.getElementById(nowurl).href="../set/view.php?type=flash&lang=$lang&flashtype="+flashtype+"&classnow="+classid;
}
function flashselect(id){
var selectid='select_'+id;
document.getElementById(selectid).checked="";
}
</script>
<body>
        <form method="POST" name="myform" action="" target="_self">
		<input name="action" type="hidden" value="modify">
<table cellpadding="2" cellspacing="1" border="0" width="95%" class="table_list1">
          <tr> 
            <td colspan="9" align="center" class="list1_title">{$lang_setflashset}</td>
          </tr>
              <tr> 
                <td width="25%" align="center" class="list1_lm">{$lang_setflashcolumn}</td>
                <td width="20%" align="center" class="list1_lm">{$lang_flashMode}</td>
                <td width="10%" align="center" class="list1_lm">{$lang_setflashWidth}({$lang_setflashPixel})</td>
				<td width="10%" align="center" class="list1_lm">{$lang_setflashHeight}({$lang_setflashPixel})</td>
				<td width="20%" align="center" class="list1_lm">{$lang_setflashimg}</td>
				<td width="15%"  class="list1_lm" align="center" >{$lang_default}<input name="chkAll" class="xz" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox"></td>
              </tr>
<!--
EOT;
foreach($mod1 as $key=>$val){
$checked="";
if($met_flasharray[$val[id]][x]==$met_flasharray[10000][x] && $met_flasharray[$val[id]][y]==$met_flasharray[10000][y]&&$met_flasharray[$val[id]][type]==$met_flasharray[10000][type]&&$met_flasharray[$val[id]][imgtype]==$met_flasharray[10000][imgtype]) 
$checked="checked=checked";
$met_flash_type[$met_flasharray[$val[id]][type]]="selected='selected'";
$met_flash_imgtype[$met_flasharray[$val[id]][imgtype]]="selected='selected'";
$classnow[id]=count($met_class2[$val[id]]);
$class1class=$classnow[id]?'list1_lm11':'list1_lm111';
if($classnow[id])$nowjs[$val[id]]="onMouseDown='showclass($val[id],1)'";
echo <<<EOT
-->	
              <tr> 
                <td  align="left" class="$class1class" {$nowjs[$val[id]]}>$val[name]</td>
                <td  align="center" class="list1_lm1">
				<select name="met_flash_$val[id]_type" onChange="flashselect('$val[id]')">
				<option value="0" $met_flash_type[0]>{$lang_close}</option>
				<option value="1" $met_flash_type[1] style="color:#FF0000">{$lang_flashMode1}</option>
				<option value="2" $met_flash_type[2] style="color:#003399">{$lang_flashMode2}</option>
				<option value="3" $met_flash_type[3] style="color:#339933">{$lang_setflashMode3}</option>
				</select>
				</td>
                <td  align="center" class="list1_lm1">
				<input name="met_flash_$val[id]_x" type="text" class="input" size="3" maxlength="200" value="{$met_flasharray[$val[id]][x]}" onMouseDown="flashselect('$val[id]')"></td>
				<td  align="center" class="list1_lm1">
				<input name="met_flash_$val[id]_y" type="text" class="input" size="3" maxlength="200" value="{$met_flasharray[$val[id]][y]}" onMouseDown="flashselect('$val[id]')">
				</td>
				<td  align="center" class="list1_lm1">
						 <select name="met_flash_$val[id]_imgtype" onChange="viewflash(this.options[this.selectedIndex].value,$val[id]);flashselect('$val[id]');">
<!--
EOT;
for($i=1;$i<9;$i++){
echo <<<EOT
-->		
                      <option value="$i"   style="color:$metcolor[$i]" $met_flash_imgtype[$i]>{$lang_setflashimgtext}$i</option>
<!--
EOT;
$met_flash_imgtype[$i]="";
}
$met_flash_type[0]="";
$met_flash_type[1]="";
$met_flash_type[2]="";
$met_flash_type[3]="";


echo <<<EOT
-->		
		 </select>
【<a href="../set/view.php?type=flash&flashtype={$met_flasharray[$val[id]][imgtype]}&classnow=$val[id]&lang=$lang" id="view$val[id]" target="_blank">{$lang_preview}</a>】
				</td>
				<td  align="center" class="list1_lm1"  ><input name="met_flash_$val[id]_all" type="checkbox" {$met_flash_all[$val[id]]} value="1" $checked id="select_{$val[id]}"></td>
              </tr>
<!--
EOT;
foreach($mod2[$val[id]] as $key=>$val2){
$checked="";
if($met_flasharray[$val[id]][x]==$met_flasharray[10000][x] && $met_flasharray[$val[id]][y]==$met_flasharray[10000][y]&&$met_flasharray[$val[id]][type]==$met_flasharray[10000][type]&&$met_flasharray[$val[id]][imgtype]==$met_flasharray[10000][imgtype]) 
$checked="checked=checked";
$met_flash_type[$met_flasharray[$val2[id]][type]]="selected='selected'";
$met_flash_imgtype[$met_flasharray[$val2[id]][imgtype]]="selected='selected'";
$classnow2[id]=count($met_class3[$val2[id]]);
$class2class=$classnow2[id]?'list1_lm22':'list1_lm222';
if($classnow2[id])$nowjs[$val2[id]]="onMouseDown='showclass($val2[id],2)'";
echo <<<EOT
-->	
    			  
                <tr id="class_$val2[id]" style="display:none;"> 
                <td  align="left" class="$class2class" {$nowjs[$val2[id]]}>$val2[name]</td>
                <td  align="center" class="list1_lm2">
				<select name="met_flash_$val2[id]_type" onChange="flashselect('$val2[id]')">
				<option value="0" $met_flash_type[0]>{$lang_close}</option>
				<option value="1" $met_flash_type[1] style="color:#FF0000">{$lang_flashMode1}</option>
				<option value="2" $met_flash_type[2] style="color:#003399">{$lang_flashMode2}</option>
				<option value="3" $met_flash_type[3] style="color:#339933">{$lang_setflashMode3}</option>
				</select>
				</td>
                <td  align="center" class="list1_lm2">
				<input name="met_flash_$val2[id]_x" type="text" class="input" size="3" maxlength="200" value="{$met_flasharray[$val2[id]][x]}" onMouseDown="flashselect('$val2[id]')"></td>
				<td  align="center" class="list1_lm2">
				<input name="met_flash_$val2[id]_y" type="text" class="input" size="3" maxlength="200" value="{$met_flasharray[$val2[id]][y]}" onMouseDown="flashselect('$val2[id]')">
				</td>
				<td  align="center" class="list1_lm2">
						 <select name="met_flash_$val2[id]_imgtype" onChange="viewflash(this.options[this.selectedIndex].value,$val2[id]);flashselect('$val2[id]');">
<!--
EOT;
for($i=1;$i<9;$i++){
echo <<<EOT
-->		
                      <option value="$i" style="color:$metcolor[$i]" $met_flash_imgtype[$i]>{$lang_setflashimgtext}$i</option>
<!--
EOT;
$met_flash_imgtype[$i]="";
}
$met_flash_type[0]="";
$met_flash_type[1]="";
$met_flash_type[2]="";
$met_flash_type[3]="";
echo <<<EOT
-->		
		 </select>
	【<a href="../set/view.php?type=flash&flashtype={$met_flasharray[$val2[id]][imgtype]}&classnow=$val2[id]&lang=$lang" id="view$val2[id]" target="_blank">{$lang_preview}</a>】
				</td>
				<td  align="center" class="list1_lm2"  ><input name="met_flash_$val2[id]_all" type="checkbox" {$met_flash_all[$val[id]]} value="1" $checked id="select_{$val2[id]}"></td>
              </tr>
<!--
EOT;
foreach($mod3[$val2[id]] as $key=>$val3){
$checked="";
if($met_flasharray[$val[id]][x]==$met_flasharray[10000][x] && $met_flasharray[$val[id]][y]==$met_flasharray[10000][y]&&$met_flasharray[$val[id]][type]==$met_flasharray[10000][type]&&$met_flasharray[$val[id]][imgtype]==$met_flasharray[10000][imgtype]) 
$checked="checked=checked";
$met_flash_type[$met_flasharray[$val3[id]][type]]="selected='selected'";
$met_flash_imgtype[$met_flasharray[$val3[id]][imgtype]]="selected='selected'";
echo <<<EOT
-->	
    			  
                <tr id="class_$val3[id]"  style="display:none;"> 
                <td  align="left" class="list1_lm33">$val3[name]</td>
                <td  align="center" class="list1_lm3">
				<select name="met_flash_$val3[id]_type" onChange="flashselect('$val3[id]')">
				<option value="0" $met_flash_type[0]>{$lang_close}</option>
				<option value="1" $met_flash_type[1] style="color:#FF0000">{$lang_flashMode1}</option>
				<option value="2" $met_flash_type[2] style="color:#003399">{$lang_flashMode2}</option>
				<option value="3" $met_flash_type[3] style="color:#339933">{$lang_setflashMode3}</option>
				</select>
				</td>
                <td  align="center" class="list1_lm3">
				<input name="met_flash_$val3[id]_x" type="text" class="input" size="3" maxlength="200" value="{$met_flasharray[$val3[id]][x]}" onMouseDown="flashselect('$val3[id]')"></td>
				<td  align="center" class="list1_lm3">
				<input name="met_flash_$val3[id]_y" type="text" class="input" size="3" maxlength="200" value="{$met_flasharray[$val3[id]][y]}" onMouseDown="flashselect('$val3[id]')">
				</td>
				<td  align="center" class="list1_lm3">
						 <select name="met_flash_$val3[id]_imgtype" onChange="viewflash(this.options[this.selectedIndex].value,$val3[id]);flashselect('$val3[id]');">
<!--
EOT;
for($i=1;$i<9;$i++){
echo <<<EOT
-->		
                      <option value="$i"  style="color:$metcolor[$i]" $met_flash_imgtype[$i]>{$lang_setflashimgtext}$i</option>
<!--
EOT;
$met_flash_imgtype[$i]="";
}
$met_flash_type[0]="";
$met_flash_type[1]="";
$met_flash_type[2]="";
$met_flash_type[3]="";
echo <<<EOT
-->		
		 </select>
【<a href="../set/view.php?type=flash&flashtype={$met_flasharray[$val3[id]][imgtype]}&classnow=$val3[id]&lang=$lang" id="view$val3[id]" target="_blank">{$lang_preview}</a>】
				</td>
				<td  align="center" class="list1_lm3"  ><input name="met_flash_$val3[id]_all" type="checkbox" {$met_flash_all[$val[id]]} value="1" $checked id="select_{$val3[id]}"></td>
              </tr>


<!--
EOT;
}}}
echo <<<EOT
-->		
	
	      <tr> 
 
	      <td align="center" class="list1_title" colspan="9">
		  <input type="submit" name="Submit" value="{$lang_Submit}" class="tj" style="*padding-top:2px; *height:22px;"> </td>
          </tr>
        </form>
		<tr>
		  <td class="list1_footer" colspan="9" align="center">$foot</td>
	  </tr>
</table>
</body>
</html>
<!--
EOT;
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
?>-->