/var/www/hkosl.com/innoutstorage/webadmin/contact_us_modifyform.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
<?php
    
require_once("check_login.php");

    
$contact_id = (int)$_GET["contact_id"];

    
$sql        "SELECT * FROM contact_us WHERE contact_id=? ";
    
$parameters = array($contact_id);
    
$row        bind_pdo($sql$parameters"selectone");

    
$sql99        "SELECT * FROM sys_cms_login WHERE cmsloginid=?";
    
$parameters99 = array((int)$row{'lastupby'});
    
$row99        bind_pdo($sql99$parameters99"selectone");
?>

<!DOCTYPE html>
<html>
<head>

    <?php require_once('html_head.php'?>
    <script type="text/javascript" src="editor/tinymce.min.js"></script>
    <script type="text/javascript" src="editor/tinymce_init.js"></script>
    <script>
        tinymce_init(".desc", 1000, 500);  //1.target element  2.width  3.height
    </script>

</head>
<body>

<form action="contact_us_modify.php" method="post" name="modifyform" enctype="multipart/form-data">
    <input type="hidden" name="contact_id" value="<?= $row{'contact_id'}; ?>">
    <table width="1200" 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" style="font-size: 12px;">
                            <input type="image" alt="submit" src="images/iconSave.png" width="32" height="32" border="0"><br>
                            &nbsp;儲存&nbsp;&nbsp;</td>
                        <td width="50" align="center">
                            <a href="contact_us_index.php?contact_id=<?= $contact_id ?>&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>
                <span style="float:left;" class="pagetitletxt">&nbsp;&nbsp;<b><img src="images/iconList.jpg" width="48" height="48" align="absmiddle"/>
                        修改 <?= $row{"page_tc"}; ?>
                    </b></span><span style="float:right;" class="msg">最近更新: <?= $row99{'cmsusername'} . '&nbsp;&nbsp;&nbsp;' $row{'lastupdate'}; ?></span>
            </td>
        </tr>
        <tr>
            <td align="left" valign="middle"><!-- Content -->
                <table border="0" cellpadding="0" cellspacing="0">

                    <?php foreach ($arraylangcode as $langcode => $langname) { ?>
                        <tr>
                        <td width="120" align="right" valign="top" class='content'>描述<br/>[<?= $langname?>]
                        </td>
                        <td width="5" valign="top" class='content'>:&nbsp;</td>
                        <td class='content'>
                        <?php
                        
if ($contact_id == 2) {
                            echo 
'<textarea name="desc_' $langcode '" style="width:500px; height:250px;">' $row{'desc_' $langcode} . '</textarea><br><br>';
                        } else {
                            
?>
                            <textarea class="desc" name="desc_<?= $langcode ?>"><?=$row{'desc_' $langcode}; ?></textarea>
                            <!--<textarea class="desc" name="desc_<?/*= $langcode */?>"><?/*= str_replace("\'", "'", str_replace("\r", "", preg_replace("/\n/", "", $row{'desc_' . $langcode}))); */?></textarea>-->
                            <br><span class="msg"><!--Max Width:1000px Max Height:1000px--></span><br><br>
                            </td>
                            </tr>
                        <?php }
                    } 
?>

                </table>
            </td>
        </tr>
    </table>
</form>
</body>
</html>