/var/www/hkosl.com/chineseaaedu/webadmin/content/video/video_form.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
    
include_once('../../check_login.php');
    
$titlearray = array('1'=>'首頁 > 影片');
    
ini_set('display_errors',0);
    
$id $_GET["refid"];
    if(
$id){
        
$sth1 $dbh->prepare("SELECT * FROM video WHERE refid =?");
        
$parameter = array((int)$id);
        if (!
$sth1->execute($parameter)){
            throw new 
Exception('[' $sth1->errorCode() . ']: ' print_r($sth1->errorInfo()));
        }
        
$row $sth1->fetch(PDO::FETCH_ASSOC);
        if (!
$sth1->execute($parameter)){
            throw new 
Exception('[' $sth1->errorCode() . ']: ' print_r($sth1->errorInfo()));
            
$row $sth1->fetch(PDO::FETCH_ASSOC);
            
$sql99 "SELECT * FROM sys_cms_login WHERE cmsloginid=?";
            
$sth99 $dbh->prepare($sql99);
            
$sth99->execute(array((int)$row{'lastupby'}));
            
$row99 $sth99->fetch(PDO::FETCH_ASSOC);
        }
    }
?>
<!DOCTYPE html>
<html>
    <head>
    <?php include_once('../../head.php'); ?>
    <link rel="stylesheet" type="text/css" href="../../css/menu.css"/>
    <script type="text/javascript" src="../../js/ddaccordion.js"></script>
    <script type="text/javascript" src="../../js/menuddaccordion.js"></script>
    <script type="text/javascript" src="../../js/validation.js"></script>
    <script type="text/javascript" src="../../js/jquery-ui-1.8.18.custom.min.js"></script>
    <link type="text/css" href="../../css/smoothness/jquery-ui-1.8.18.custom.css" rel="stylesheet"/>
    <script>
        $(function () {
            $("#info_date").datepicker({ dateFormat: 'yy-mm-dd'});
        });
        function save(){
            if($("#LiForm").valid()){
                $("#LiForm").submit();
            }
        }
    </script>
    </head>
    <body>
    <table width="1200" height="600" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="200" align="left" valign="top"><table width="200" border="0" cellpadding="0" cellspacing="0">
            <tr>
            <td height="70" align="left" valign="middle">&nbsp;</td>
          </tr>
            <tr>
            <td width="200" align="left" valign="top"><!-- Main Menu -->
                
                <?php require("../../menu.php");?>
                <!-- End Main Menu --></td>
          </tr>
          </table></td>
        <td align="left" valign="top">
    <form action="video_process.php" id="LiForm" method="post" name="addform" enctype="multipart/form-data">
      <? if($id){?>
      <input type="hidden" name="id" value="<?=$id?>"/>
      <? }?>
      <table width="1000" 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;"><img type="image" src="../../images/iconSave.png" width="32" height="32" border="0" onClick="save()" style="cursor:pointer;"> &nbsp;&nbsp;儲存&nbsp;&nbsp; </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"/><?=$titlearray[$id]?></b>
            <? if($id){?>
            <span style="float:right;" class="msg">最後更新:
            <?= $row99{'cmsloginname'} . '&nbsp;&nbsp;&nbsp;' $row{'lastupdate'}; ?>
            </span>
            <? }?></td>
        </tr>
        <tr>
          <td align="left" valign="middle"><!-- Content -->
            
            <div id="LiContentTable">
              <table border="0" cellpadding="0" cellspacing="0">
                <?php foreach ($arraylangcode as $langcode => $langname) { ?>
                <tr>
                  <td width="120" align="left" valign="middle" class='content'>名稱 <br>
                    [
                    <?= $langname?>
                    ] </td>
                  <td align="left" valign="middle" class='content'>:&nbsp;</td>
                  <td class='content'><input name="name_<?= $langcode?>" type="text" class="inputer required" value="<?=$row['name_'.$langcode]?>" style="width:497px;"></td>
                </tr>
                <?php ?>
                <?php foreach ($arraylangcode as $langcode => $langname) { ?>
                <tr>
                  <td width="120" align="left" valign="middle" class='content'> 內容<br>
                    [
                    <?= $langname ?>
                    ] </td>
                  <td width="5" valign="middle" class='content'>:&nbsp;</td>
                  <td class='content'><textarea class="inputer" style="width:500px; height:100px;" name="desc_<?= $langcode ?>"><?=$row['desc_'.$langcode]?></textarea></td>
                </tr>
                <?php ?>
                <tr>
                  <td width="120" align="left" valign="middle" class='content'>Youtube 連結 <br>
                    [
                    <?= $langname?>
                    ] </td>
                  <td align="left" valign="middle" class='content'>:&nbsp;</td>
                  <td class='content'>
                  <? if($row['youtubelink']){?>
                  <div><iframe width="500" height="312"  src="https://www.youtube.com/embed/<?=$row['youtubelink']?>" frameborder="0" allowfullscreen></iframe></div>
                  <? }?>
                  <input name="youtubelink" type="text" class="inputer required" value="<?=$row['youtubelink']?>" style="width:497px;">
                  <div>e.g. : https://www.youtube.com/watch?v=<b style="font-size:16px;">mic-xDdv2cI</b></div>
                  </td>
                </tr>
              </table>
            </div>
            
            <!-- End Content --></td>
        </tr>
        <tr>
          <td align="left" valign="middle">&nbsp;</td>
        </tr>
      </table>
    </form>
    </td>
    </tr>
    </table>
</body>
</html>