root/afridex/plugins/Flutter/RCCWP_SWFUpload.php @ 22

Revision 21, 2.1 kB (checked in by admin, 18 years ago)
Line 
1<?php
2class RCCWP_SWFUpload
3{
4        function Body($inputName, $fileType, $isCanvas = 0, $urlInputSize = false)
5        {
6                include_once('RCCWP_Options.php');
7
8                if (!$urlInputSize) $urlInputSize = 20;
9
10                if ($isCanvas==0) {
11                        $iframeInputSize = $urlInputSize;
12                        $iframeWidth = 380;
13                        $iframeHeight = 40;
14                }
15                else{
16                        $isCanvas = 1;
17                        $iframeWidth = 150;
18                        $iframeHeight = 60;
19                        $iframeInputSize = 3;
20                        $inputSizeParam = "&inputSize=$iframeInputSize";
21                }
22                //$iframeWidth = $iframeInputSize * 28;
23
24                $iframePath = CANVASURI."RCCWP_upload.php?input_name=".urlencode($inputName)."&type=$fileType&imageThumbID=img_thumb_$inputName&canvas=$isCanvas".$inputSizeParam ;
25                $enableSWFU = RCCWP_Options::Get('enable-swfupload') ;
26                if( $enableSWFU == 0  || $enableSWFU == ''){
27                ?>
28                        <div id='upload_iframe_<?php echo $inputName?>'>
29                        <iframe id='upload_internal_iframe_<?php echo $inputName?>' src='<?php echo $iframePath;?>' frameborder='' scrolling='no' style="border-width: 0px; height: <?php echo $iframeHeight ?>px; width: <?php echo $iframeWidth ?>px;vertical-align:top;"></iframe>
30                        </div>
31                <?php
32                }
33                ?>
34               
35                        <table border="0" style="width:100%">
36
37                                <?php
38                                if( $enableSWFU )
39                                {
40                                ?>
41                                        <tr  style="background:transparent" id="swfuploadRow_<?php echo $inputName ?>">
42                                                <td style="border-bottom-width: 0px;padding: 0px"><label for="swfupload" >Upload:</label></td>
43                                                <td style="border-bottom-width: 0px"><input type="button" value="Browse" onclick="openFile('<?php echo $inputName ?>')" class="button" /></td>
44                                        </tr>
45                                <?php
46                                }
47                                ?>
48
49                                <tr style="background:transparent">
50                                        <td style="border-bottom-width: 0px;padding: 0"><label for="upload_url" >Or URL:</label></td>
51                                        <td style="border-bottom-width: 0px">
52                                                <input id="upload_url_<?php echo $inputName ?>"
53                                                        name="upload_url_<?php echo $inputName ?>"
54                                                        type="text"
55                                                        size="<?php echo $urlInputSize ?>"
56                                                        />
57                                                <input type="button" onclick="uploadurl('<?php echo $inputName ?>','<?php echo $fileType ?>')" value="Upload" class="button" style="width:70px"/>
58                                        </td>
59                                </tr>
60
61                        </table>
62               
63                <?php
64        }
65}
66?>
Note: See TracBrowser for help on using the browser.