videoedit.php
4.56 KB
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
<?php
use backend\widgets\YHGImage\Common\Images as CommonImages;
?>
<div class="col-md-6">
<form id="form" method="POST" action="">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-3 control-label">视频ID: </label>
<div class="col-sm-9">
<?php echo $video->id;?>
<input type="hidden" name="id" value="<?php echo $video->id;?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">视频标题: <span class="asterisk">*</span></label>
<div class="col-sm-5">
<input type="text" name="title" class="form-control" required="required" value="<?php echo $video->title;?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">头图: <span class="asterisk">*</span></label>
<div class="col-sm-5">
<div class="col-sm-9">
<?=$uploader?>
<?php if ($video->pic):?>
<div class="file-item thumbnail upload-state-done">
<img src="<?php echo CommonImages::getImageUrl($video->pic, 200, 200)?>">
<div class="info">当前图片</div>
</div>
<?php endif;?>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">腾讯链接 </label>
<div class="col-sm-8">
<input type="text" name="url" class="form-control" value="<?php echo $video->url;?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">直播中排序: </label>
<div class="col-sm-3">
<input type="text" name="sort" class="form-control" value="<?=$video->sort?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">分享主图: </label>
<div class="col-sm-9">
<?=$sharePicUploader?>
<?php if ($video->id && $videoShare['pic']):?>
<div class="file-item thumbnail upload-state-done" id="share_pic"><img src="<?=CommonImages::getImageUrl($videoShare['pic'], 110, 110)?>"><div class="info">当前图片</div></div>
<?php endif;?>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">分享标题: </label>
<div class="col-sm-9">
<input type="text" name="share_title" class="form-control" value="<?php echo ($video->id && $videoShare['title']) ? $videoShare['title']:''?>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">分享内容: </label>
<div class="col-sm-9">
<textarea rows="5" name="share_content" class="form-control"><?php echo ($video->id && $videoShare['content']) ? $videoShare['content']:''?></textarea>
</div>
</div>
</div><!-- row -->
</div><!-- panel-body -->
<div class="panel-footer">
<div class="row">
<div class="col-sm-9 col-sm-offset-3">
<button class="btn btn-primary mr5" id="upload_button">保存</button>
<a href="/live/video" class="btn btn-dark">取消</a>
</div>
</div>
</div><!-- panel-footer -->
</div><!-- panel -->
</form>
</div>
<script>
$(function(){
$("#upload_button").on("click", function()
{
var pic = $("input[name=pic]").val();
if(pic == "")
{
alert("头图不能为空");
return false;
}
});
});
</script>