file_upload.tpl
2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META name="GENERATOR" content="Microsoft FrontPage 4.0">
<META http-equiv="Content-Type" content="text/html; charset=shift_jis">
<META http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<TITLE>e-イベント管理メニュー</TITLE>
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
{literal}
<!--
function file_up(){
if(document.frm_sub.upfile.value == ""){
alert("ファイルを指定してください");
return false;
}
var addr = document.frm_sub.upfile.value;
if(addr.match(/\.(jpg|jpeg|gif)$/i)){
document.frm_sub.action = "file_touroku.php";
document.frm_sub.method="POST";
document.frm_sub.submit();
}else{
alert("対応してません");
return false;
}
}
function ImgSet(){
var strCheckValur;
strCheckValur="";
if (document.frm_sub.rdoSelect.length){
for(i = 0 ; i <= document.frm_sub.rdoSelect.length; i++ ){
if (document.frm_sub.rdoSelect[i].checked==true){
strCheckValur = document.frm_sub.rdoSelect[i].value;
break;
}
}
}else{
if (document.frm_sub.rdoSelect.checked==true){
strCheckValur = document.frm_sub.rdoSelect.value;
}
}
if (strCheckValur==""){
alert("ファイルを選択してください。");
}else{
//alert(window.opener.document.forms[0].cboHeader.value);
for(i=0;i<window.opener.document.forms[0].cboHeader.options.length;i++){
if(window.opener.document.forms[0].cboHeader.options[i].value == strCheckValur){
//alert(i);
window.opener.document.forms[0].cboHeader.selectedIndex = i;
break;
}
}
window.opener.document.forms[0].submit();
window.close();
}
}
//-->
{/literal}
</SCRIPT>
</HEAD>
<BODY>
<FORM METHOD="POST" name="frm_sub" enctype="multipart/form-data">
<TABLE width="100%" border="0" align="center" cellPadding=0 cellSpacing=0 class="header">
<TR>
<TD align="left" width="20%"><img src="image/titilemini.gif" alt="e-イベント" width="117" height="40"></TD>
<TD align="center"><font color="#ffffff">ファイルアップロード</font></TD>
</TR>
</TABLE>
<input type="file" name="upfile" ><input type="button" value="アップロード" onclick="file_up();" {$mode_disabled}>
<table border="1" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="center"> </td>
<td align="center">画像</td>
<td align="center">パス</td>
</tr>
{section name=idx loop=$File_Data}
<tr>
<td><input type="radio" value="{$File_Data[idx][0]}" name="rdoSelect"></td>
<td align="center"><a href="{$File_Path}{$File_Data[idx][1]}" target="_blank"><img src="{$File_Path}{$File_Data[idx][1]}" width="80" height="80" /></a></td>
<td>{$File_Path}{$File_Data[idx][1]}</td>
</tr>
{/section}
</table>
<input type="button" name="send" value="画像設定" onclick="return ImgSet();" {$mode_disabled}>
</FORM>
</BODY>
</HTML>