Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/video_edit.tpl.php
Строк: 357
<?php defined('_VALID') or die('Restricted Access!'); ?>
    <?php echo $this->fetch('errors'); ?>
    <?php echo $this->fetch('messages'); ?>
    <?php echo $this->fetch('warnings'); ?>
    <script type="text/javascript">
    $(document).ready(function() {
          $("img[id^='video_thumb_']").click(function() {
              var click_id = $(this).attr('id');
              $("img[id^='video_thumb_']").removeClass();
              $(this).addClass('active');
              $("input[name='thumb']").val(click_id.slice(click_id.lastIndexOf("_")+1));
        });
        
        $("a[id='preview_embed']").click(function(e) {
            e.preventDefault();
            var embed_code = $("textarea[id='embed_code']").val();
            var preview = window.open("","wildebeast","width=800,height=600,scrollbars=1,resizable=1");
            preview.document.open()
            preview.document.write(embed_code)
            preview.document.close();
        });
        
        $("input[name='process_advanced']").click(function(e) {
              e.preventDefault();
              if ($('#edit_advanced').is(':visible')) {
                  $('#edit_advanced').hide();
              } else {
                  $('#edit_advanced').show();
              }
        });

        $("input[id^='category-']").change(function() {
            var cat_id = $(this).attr('id').match(/category-(.*)/)[1];
            
            if ($(this).is(':checked')) {
                $("#subcategory-" + cat_id).slideDown();
            } else {
                $("#subcategory-" + cat_id).slideUp();
                $(".parent-" + cat_id).removeAttr("checked");
            }
        });
        
        $("input[class*='parent-']:checked").each(function(index) {
            var parent_id = $(this).attr('class').match(/checkbox parent-(.*)/)[1];
            $("#subcategory-" + parent_id).show();
        });        
    });
    </script>
    <div id="container" class="clearfix">
        <div id="page">
            <?php echo $this->fetch('video_menu'); ?>
            <div class="content clearfix">
                <?php echo $this->fetch('video_manage_menu'); ?>
                <?php if ($this->video): ?>
                <form name="video-edit-form" id="video-edit-form" method="post" action="<?php echo ADMIN_URL?>/index.php?q=video/edit&amp;id=<?php echo $this->video['video_id']; ?>">
                    <fieldset>
                        <legend>Video Information</legend>
                        <div class="required">
                            <label for="video_id">Id</label>
                            <input type="text" id="video_id" class="small invisible" maxlength="11" readonly="readonly" value="<?php echo $this->video['video_id']; ?>" />
                        </div>
                        <div class="required">
                            <label for="username">Username</label>
                            <input name="username" type="text" id="username" class="medium" maxlength="15" value="<?php echo e($this->video['username']); ?>" />
                        </div>
                        <div class="required">
                            <label for="title">Title:</label>
                            <input name="title" type="text" id="title" class="mega" maxlength="100" value="<?php echo e($this->video['title']); ?>" />
                        </div>
                        <div class="required">
                            <label for="desc">Description:</label>
                            <textarea name="desc" id="desc" class="mega"><?php echo e($this->video['description']); ?></textarea>
                        </div>
                        <div class="required">
                            <label for="tags">Tags:</label>
                            <textarea name="tags" id="tags" class="mega"><?php echo e($this->video['tags']); ?></textarea>
                        </div>        
                        <div class="required">
                            <label for="category">Categories:</label>
                            <div class="categories">
                                  <?php echo p('categories_select'$this->categories$this->video['category']); ?>
                            </div>
                        </div>
                    </fieldset>
                    <fieldset>
                        <legend>Video Permissions</legend>
                        <div class="optional">
                            <label for="type_on">Type</label>
                              <input name="type" type="radio" id="type_on" class="radio" value="public"<?php if ($this->video['type'] == 'public'): echo ' checked="checked"'; endif; ?> /> Public
                              <input name="type" type="radio" id="type_off" class="radio" value="private"<?php if ($this->video['type'] == 'private'): echo ' checked="checked"'; endif; ?> /> Private
                        </div>
                        <div class="optional">
                            <label for="allow_rating_on">Allow Rating</label>
                              <input name="allow_rating" type="radio" id="allow_rating_on" class="radio" value="1"<?php if ($this->video['allow_rating'] == '1'): echo ' checked="checked"'; endif; ?> /> Yes
                              <input name="allow_rating" type="radio" id="allow_rating_off" class="radio" value="0"<?php if ($this->video['allow_rating'] == '0'): echo ' checked="checked"'; endif; ?> /> No
                        </div> 
                        <div class="optional">
                              <label for="allow_comment_on">Allow Comment</label>
                            <input name="allow_comment" type="radio" id="allow_comment_on" class="radio" value="1"<?php if ($this->video['allow_comment'] == '1'): echo ' checked="checked"'; endif; ?> /> Yes
                            <input name="allow_comment" type="radio" id="allow_comment_off" class="radio" value="0"<?php if ($this->video['allow_comment'] == '0'): echo ' checked="checked"'; endif; ?> /> No
                        </div>
                        <div class="optional">
                              <label for="allow_download_on">Allow Download</label>
                            <input name="allow_download" type="radio" id="allow_download_on" class="radio" value="1"<?php if ($this->video['allow_download'] == '1'): echo ' checked="checked"'; endif; ?> /> Yes
                            <input name="allow_download" type="radio" id="allow_download_off" class="radio" value="0"<?php if ($this->video['allow_download'] == '0'): echo ' checked="checked"'; endif; ?> /> No
                        </div>    
                    </fieldset>
                    <fieldset>
                        <legend>Video Thumb</legend>
                        <div class="required">
                            <input name="thumb" type="hidden" id="thumb" value="<?php echo $this->video['thumb']; ?>" />
                            <table cellspacing="2" cellpadding="0" border="0"><tr><td>
                            <div class="thumbs_small">
                                  <?php for ($i=1$i<=$this->video['thumbs']; $i++): ?>
                                <img src="<?php echo THUMB_URL,'/',path($this->video['video_id']),'/',$i?>.jpg" id="video_thumb_<?php echo $i?>"<?php if ($this->video['thumb'] == $i): echo ' class="active"'; endif; ?> alt="" width="83" />
                                <?php endfor; ?>
                                <div class="clear_left"></div>
                            </div>
                            </td></tr></table>
                        </div>
                    </fieldset>
                    <fieldset>
                        <legend>Video Channel</legend>
                        <div class="required">
                            <label for="channel_id">Channel:</label>
                            <select name="channel_id" id="channel_id">
                                <option value="">-------------</option>
                                <?php foreach ($this->channels as $channel): ?>
                                <option value="<?php echo $channel['channel_id']; ?>"<?php if ($this->video['channel_id'] == $channel['channel_id']): echo ' selected="selected"'; endif; ?>><?php echo e($channel['name']); ?></option>
                                <?php endforeach; ?>
                            </select>
                        </div>
                    </fieldset>                    
                    <?php if (VF::cfg_item('module.video.multi_server') == '1'): ?>
                    <fieldset>
                        <legend>Server Options</legend>
                        <div class="required">
                            <label for="server">Server: </label>
                            <select name="server" id="server">
                                <option value="0">Main Server</option>
                                <?php foreach ($this->servers as $server): ?>
                                <option value="<?php echo $server['server_id']; ?>"<?php if ($this->video['server'] == $server['server_id']): echo ' selected="selected"'; endif; echo '>',e($server['server_name']); ?></option>
                                <?php endforeach; ?>
                            </select>
                        </div>
                    </fieldset>
                    <?php endif; ?>
                    <fieldset>
                        <legend>Video Properties</legend>
                        <?php if (VModule::enabled('mobile') && $this->video['embed_code'] == ''): ?>
                        <div class="optional">
                              <label for="mobile">Mobile:</label>
                              <input name="mobile" type="radio" id="mobile" class="radio" value="1"<?php if ($this->video['mobile'] == '1'): echo ' checked="checked"'; endif; ?>> Yes
                            <input name="mobile" type="radio" class="radio" value="0"<?php if ($this->video['mobile'] == '0'): echo ' checked="checked"'; endif; ?>> No
                        </div>                        
                        <?php endif; ?>
                        <?php if (VModule::enabled('premium')): ?>
                        <div class="optional">
                              <label for="premium">Premium:</label>
                              <input name="premium" type="radio" id="premium" class="radio" value="1"<?php if ($this->video['premium'] == '1'): echo ' checked="checked"'; endif; ?>> Yes
                            <input name="premium" type="radio" class="radio" value="0"<?php if ($this->video['premium'] == '0'): echo ' checked="checked"'; endif; ?>> No
                        </div>
                        <?php endif; ?>
                        <div class="optional">
                              <label for="flagged">Flagged:</label>
                              <input name="flagged" type="radio" id="flagged" class="radio" value="1"<?php if ($this->video['flagged'] == '1'): echo ' checked="checked"'; endif; ?>> Yes
                            <input name="flagged" type="radio" class="radio" value="0"<?php if ($this->video['flagged'] == '0'): echo ' checked="checked"'; endif; ?>> No
                        </div>
                        <div class="optional">
                              <label for="locked">Locked:</label>
                            <input name="locked" type="radio" id="locked" class="radio" value="1"<?php if ($this->video['locked'] == '1'): echo ' checked="checked"'; endif; ?>> Yes
                            <input name="locked" type="radio" class="radio" value="0"<?php if ($this->video['locked'] == '0'): echo ' checked="checked"'; endif; ?>> No
                        </div>
                        <div class="optional">
                              <label for="status">Status:</label>
                            <select name="status" id="status">
                                  <option value="0"<?php if ($this->video['status'] == '0'): echo ' selected="selected"'; endif; ?>>Suspended</option>
                                <option value="1"<?php if ($this->video['status'] == '1'): echo ' selected="selected"'; endif; ?>>Active</option>
                                <option value="2"<?php if ($this->video['status'] == '2'): echo ' selected="selected"'; endif; ?>>Approve Required</option>
                                <option value="3"<?php if ($this->video['status'] == '3'): echo ' selected="selected"'; endif; ?>>Uploading</option>
                                <option value="4"<?php if ($this->video['status'] == '4'): echo ' selected="selected"'; endif; ?>>Converting</option>
                                <option value="5"<?php if ($this->video['status'] == '5'): echo ' selected="selected"'; endif; ?>>Grabbing</option>
                                <option value="6"<?php if ($this->video['status'] == '6'): echo ' selected="selected"'; endif; ?>>Queue</option>
                                <option value="7"<?php if ($this->video['status'] == '7'): echo ' selected="selected"'; endif; ?>>Failed</option>
                                <option value="8"<?php if ($this->video['status'] == '8'): echo ' selected="selected"'; endif; ?>>Deleted</option>
                            </select>
                        </div>
                    <fieldset>
                    <div id="edit_advanced" style="display: none;">
                    <fieldset>
                          <legend>Video Date Properties</legend>
                        <div class="required">
                              <label for="add_date">Add Date:</label>
                            <input name="add_date" type="text" id="add_date" class="large" value="<?php echo date('Y-m-d H:i:s'$this->video['add_time']); ?>" /> Y-m-d h:m:s
                        </div>
                        <div class="required">
                              <label for="view_date">View Date:</label>
                            <input name="view_date" type="text" id="view_date" class="large" value="<?php echo $this->video['view_date']; ?>" /> Y-m-d h:m:s
                        </div>
                    </fieldset>                    
                    <fieldset>
                        <legend>Advanced Properties</legend>
                        <div class="required">
                              <label for="rating">Rating:</label>
                            <input name="rating" type="text" id="rating" class="tiny" maxlength="4" value="<?php echo $this->video['rating']; ?>" />
                        </div>
                        <div class="required">
                              <label for="rated_by">Rated by:</label>
                            <input name="rated_by" type="text" id="rated_by" class="small" maxlength="11" value="<?php echo $this->video['rated_by']; ?>" />
                        </div>
                        <div class="required">
                              <label for="total_views">Total Views:</label>
                            <input name="total_views" type="text" id="total_views" class="small" maxlength="20" value="<?php echo $this->video['total_views']; ?>" />
                        </div>
                        <div class="required">
                              <label for="total_comments">Total Comments:</label>
                            <input name="total_comments" type="text" id="total_comments" class="small" maxlength="11" value="<?php echo $this->video['total_comments']; ?>" />
                        </div>
                        <div class="required">
                              <label for="total_downloads">Total Downloads:</label>
                            <input name="total_downloads" type="text" id="total_downloads" class="small" maxlength="11" value="<?php echo $this->video['total_downloads']; ?>" />
                        </div>
                    </fieldset>
                    <fieldset>
                        <legend>Video Meta Fields</legend>
                        <div class="required">
                            <label for="meta_title">Meta Title</label>
                            <input name="meta_title" type="text" id="meta_title" class="extra" value="<?php echo e($this->video['meta_title']); ?>" />
                        </div>
                        <div class="required">
                            <label for="meta_desc">Meta Description</label>
                            <textarea name="meta_desc" id="meta_desc" class="extra" rows="2"><?php echo e($this->video['meta_desc']); ?></textarea>
                        </div>
                        <div class="required">
                            <label for="meta_keys">Meta Keywords</label>
                            <textarea name="meta_keys" id="meta_keys" class="extra" rows="2"><?php echo e($this->video['meta_keys']); ?></textarea>
                        </div>
                    </fieldset>
                    <fieldset>
                        <legend>Duration</legend>
                        <div class="required">
                            <label for="duration">Duration</label>
                            <input name="duration" type="text" id="duration" class="medium" value="<?php echo $this->video['duration']; ?>" />
                        </div>
                    </fieldset>
                    <?php if ($this->video['embed_code'] != ''): ?>
                    <fieldset>
                        <legend>Embed Properties</legend>
                        <div class="required">
                            <label for="embed_code">Embed Code</label>
                            <textarea name="embed_code" id="embed_code" class="mega" rows="8"><?php echo $this->video['embed_code']; ?></textarea>
                        </div>
                    </fieldset>
                    <?php else: ?>
                    <fieldset>
                        <legend>File Properties</legend>
                        <div class="required">
                            <label for="ext">Format</label>
                            <select name="ext" id="text">
                                <option value="flv"<?php if ($this->video['ext'] == 'flv'): echo ' selected="selected"'; endif; ?>>FLV</option>
                                <option value="mp4"<?php if ($this->video['ext'] == 'mp4'): echo ' selected="selected"'; endif; ?>>MP4</option>
                            </select>
                        </div>
                        <div class="required">
                            <label for="size">Size</label>
                            <input name="size" type="text" id="size" class="tiny" value="<?php echo $this->video['size']; ?>" />
                        </div>
                    </fieldset>
                    <?php endif; ?>
                    </div>
                    <div class="submit">
                        <input name="submit_edit_video" type="submit" id="submit_edit_video" class="button butDef" value=" Update Video " />
                        <input name="process_advanced" type="button" id="process_advanced" class="button butDef" value=" Advanced " />
                    </div>
                </form>
                <?php else: ?>
                <div class="none">Invalid video id! Are you sure this video exists!?</div>
                <?php endif; ?>
            </div>
        </div>
    </div>
Онлайн: 0
Реклама