<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FileUpload.aspx.cs" Inherits="PowerEasy.Module.General.WebSite.Editor.FileUpload" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>单文件上传</title>
    <script src="../JS/jquery.pack.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 100%">
            <tr>
                <td class='tdbg' align='left'>
                    <div id='errorLocation' style="font-size: small; color: Gray;">
                    </div>
                    <div id="silverlightControlHost">
                        <pe:FileUploadControl runat="server" ID="FileUploader" Pattern="Simple" />
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <script type="text/javascript">

          var photoUrls = '';
          var thumbUrl = '';

          function DealwithUpload(paths, size, id, thumbpath) {
              if (!paths||paths=='') {
                    alert("文件未上传成功")
              }
              if (paths.indexOf('http://')!=0) {
                    paths = '<%= UploadPath %>' + paths;
                  }
               window.parent.CKEDITOR.tools.callFunction(<%=CKEditorFuncNum %>,paths,'');
              
            
          }

          function ChangeThumbField(path, thumbpath) {
            thumbUrl = thumbpath;
            
            if (photoUrls != '') {
              photoUrls += '$$$' + '<%= UploadPath %>' + path;
            }
            else {
              photoUrls += '$$$' + '<%= UploadPath %>' + path;
            }
            photoUrls += '$$$' + '<%= UploadPath %>' + thumbUrl;
            
           window.parent.CKEDITOR.tools.callFunction(<%=CKEditorFuncNum %>,photoUrls,'');
          }
    </script>
    </form>
</body>
</html>
