-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.cfm
65 lines (46 loc) · 1.54 KB
/
index.cfm
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<cfcontent type="text/html;charset=utf-8">
<html>
<head>
<title>Εικονική σκηνή </title>
</head>
<body>
<cfset templatePath = GetDirectoryFromPath(
GetCurrentTemplatePath()
) />
<cfset vrmlpath = ExpandPath( "./world.wrl" ) />
<cfif isdefined("form.upload_now")>
<cfoutput>
<cffile action="UPLOAD" filefield="file_path" destination="#templatePath#"
accept="model/vrml" nameconflict="MAKEUNIQUE">
<p align="center">
<b>
Το αρχείο #File.ServerFile# αποθηκεύτηκε στην σκηνή !
</b>
</p>
<br>
<cfset str='Inline { url "'& #File.ServerFile# & '" }'>
<cffile action="APPEND" file="#vrmlpath#" addnewline="Yes" attributes="Normal" output="#str#">
</cfoutput>
</cfif>
<br>
<br>
<p align="center">
<font size="+1"><b>Παρακαλώ εισάγετε ένα αρχείο με επέκταση wrl! </b> </font>
<cfform action="index.cfm" method="post" name="upload_form" enctype="multipart/form-data">
<cfinput type="file" name="file_path">
<cfinput type="submit" name="upload_now" value="Αποθήκευση">
<br>
<br>
<cfheader name="expires" value="#NOW()#">
<cfheader name="pragma" value="no-cache">
<cfheader name="cache-control" value="no-cache,no-store,must-revalidate">
<cfif FileExists(vrmlpath)>
<embed src="world.wrl" width="950px" height="650px">
<cfelse>
File not Exists: <cfoutput> #vrmlpath# </cfoutput>
</cfif>
</p>
</cfform>
</body>
</html>