/var/www/hkosl.com/innoutstorage/webadmin/product_image_addform.php


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
97
98
99
100
<?php
    
require_once("check_login.php");

    
$sql        "SELECT * FROM product WHERE id = ? AND deleted = ?";
    
$parameters = array((int)$_GET['productid'], "0");
    
$row        bind_pdo($sql$parameters"selectone");

    
//plupload init
    // upload_type : 1="only jpg,png,gif" , 2="only pdf", 3="only doc, excel, ppt", 4="All";
    // max_file_size_client : for client side
    // max_file_size_server : for server side
    
$pluploader         = array(
        array(
'name' => 'proimage''upload_type' => '1''max_file_size_client' => '2mb''max_file_size_server' => 1048576'max_file_num' => 30'msg' => '圖片格式: gif,jpg,png | 大小: 每檔案最大2M | 尺寸: 寬400px; 高300px;<br>檔案名稱: 只允許字母、數字、底線。 無效的檔案名稱將會重新名命。<br><br>')
    );
    
$temp_file_location "plupload/uploads/";
?>
<!DOCTYPE html>
<html>
<head>
    <?php require_once("html_head.php"); ?>
<body>

<form action="product_image_add.php" method="post" name="addform" enctype="multipart/form-data">
    <input type="hidden" class="content" name="productid" value="<?= (int)$_GET['productid']; ?>">
    <table width="800" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td height="70" align="right" valign="middle" class="icontxt">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="50" align="center">
                            <a href="#" onClick="addform.submit()"><img src="images/iconSave.png" alt="Save" width="32" height="32" border="0"><br>
                                &nbsp;儲存&nbsp;&nbsp;</a></td>
                        <td width="50" align="center">
                            <a href="product_image_index.php?productid=<?= $_GET['productid']; ?>&msg=取消"><img src="images/iconCancel.png" alt="Cancel" width="32" height="32" border="0"><br>
                                &nbsp;取消&nbsp;&nbsp;</a></td>
                        <td>&nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td class="pagetitletxt">
                &nbsp;&nbsp;<b><img src="images/iconList.jpg" width="48" height="48" align="absmiddle"/>新增 包裝物料圖片</b></td>
        </tr>
        <tr>
            <td align="left" valign="middle"><!-- Content -->
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="120" align="right" valign="top" class='content'>產品名稱</td>
                        <td class='content' valign="top">:&nbsp;</td>
                        <td class='content'><b><?= $row['name_tc'] . " (" $row{"code"} . ")"?></b><br/><br/>
                        </td>
                    </tr>

                    <tr>
                        <td width="60" align="right" valign="top" class='content'>圖片</td>
                        <td width="5" valign="top" class='content'>:&nbsp;</td>
                        <td class='content'>
                            <!-- plupload init -->
                            <?php foreach ($pluploader as $uploader) { ?>
                                <div class="container">

                                    <span class="msg"><?= $uploader["msg"?></span>

                                    <div id="log_<?= $uploader["name"?>"></div>
                                    <div id="uploader_<?= $uploader["name"?>">
                                        <p>你的瀏覽器不支援Flash or HTML5。你可以一個一個上傳圖片。</p>
                                    </div>
                                    <br>
                                    <!-- list uploaded image -->
                                    <br>

                                    <div id="uploaded_img_<?= $uploader["name"?>">上傅圖片成功
                                        (暫存)<br><br></div>

                                    <!-- end plupload init -->

                                    <br/>

                                    <div style="clear: both"></div>

                                </div>

                                <br><br><br><br>
                            <?php ?>

                        </td>
                    </tr>

                </table>
                <!-- End Content --></td>
        </tr>
        <tr>
            <td align="left" valign="middle">&nbsp;</td>
        </tr>
    </table>
    <?php require_once("plupload/plupload_init.php"); ?>
</form>
</body>
</html>