Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/video_embed.tpl.php
Строк: 109
<?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">
    var thumb = 1;
    $(document).ready(function() {
          $("a[id^='add_thumb_']").click(function(e) {
              var click_id    = $(this).attr('id');
            var click_arr   = click_id.split('_');
            var type        = click_arr[2];
            if (type == 'url') {
                  var id   = 'thumb_url_' + thumb;
                var code = '<div class="required" id="thumb_url_div_' + thumb + '"><label for="' + id + '">Thumb URL:</label><input name="' + id + '" type="text" id="' + id + '" class="mega" value="" /> <a href="#remove" id="remove_thumb_url_' + thumb + '">Remove</a></div>';
            } else {
                var id   = 'thumb_file_' + thumb;
                var code = '<div class="required" id="thumb_file_div_' + thumb + '"><label for="' + id + '">Thumb:</label><input name="' + id + '" type="file" id="' + id + '" /> <a href="#remove" id="remove_thumb_file_' + thumb + '">Remove</a></div>';
            }

            thumb++;
            var div = document.createElement('div');
            $(div).html(code);
            $('#thumb_' + type + '_placeholder').before(div);
        });

        $("a[id^='remove_thumb_']").live('click', function(e) {
              var click_id    = $(this).attr('id'); 
              var click_arr   = click_id.split('_'); 
            var type        = click_arr[2];
            var nr          = click_arr[3];
            $("div[id='thumb_" + type + "_div_" + nr + "']").hide();
        });

        $("select[name='thumb_method']").change(function() {
            var thumb_method = $(this).val();
            $("div[id^='thumb_method_']").hide();
            $("div[id^='thumb_method_" + thumb_method + "']").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_add_menu'); ?>
                <form name="video-embed-form" id="video-embed-form" method="post" enctype="multipart/form-data" action="<?php echo ADMIN_URL?>/index.php?q=video/embed">
                    <fieldset>
                        <legend>Video Information</legend>
                        <div class="required">
                            <label for="username">Username</label>
                            <input name="username" type="text" id="username" class="medium" maxlength="16" value="<?php echo e($this->embed['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->embed['title']); ?>" />
                        </div>
                        <div class="required">
                              <label for="desc">Description:</label>
                            <textarea name="desc" id="desc" class="mega"><?php echo e($this->embed['description']); ?></textarea>
                        </div>
                        <div class="required">
                              <label for="tags">Tags:</label>
                            <textarea name="tags" id="tags" class="mega"><?php echo e($this->embed['tags']); ?></textarea>
                        </div>
                        <div class="required">
                              <label for="category">Category:</label>
                            <div style="width: 720px; float: right;">
                                  <?php $category explode(','$this->video['category']);
                                  foreach (
$this->categories as $cat): ?>
                                  <div style="width: 120px; float: left;"><input name="categories[]" type="checkbox" value="<?php echo $cat['cat_id']; ?>"<?php if (in_array($cat['cat_id'], $category)): echo ' checked="checked"'; endif; ?><?php echo e($cat['name']); ?></div>
                                  <?php endforeach; ?>
                                  <div class="clear_left"></div>
                            </div>
                        </div>
                        <div class="clear"></div>
                        <div class="required">
                            <label for="broadcast">Broadcast:</label>
                            <select name="broadcast" id="broadcast">
                                <option value="public"<?php if ($this->embed['broadcast'] == 'public'): echo ' selected="selected"'; endif; ?>>Public</option>
                                <option value="private"<?php if ($this->embed['broadcast'] == 'private'): echo ' selected="selected"'; endif; ?>>Private</option>
                            </select>
                        </div>                        
                        <div class="required">
                            <label for="status">Status:</label>
                            <select name="status" id="status">
                                <option value="0"<?php if ($this->embed['status'] == '0'): echo ' selected="selected"'; endif; ?>>Suspended</option>
                                <option value="1"<?php if ($this->embed['status'] == '1'): echo ' selected="selected"'; endif; ?>>Active</option>
                            </select>
                        </div>                        
                    </fieldset>
                    <fieldset>
                        <legend>Video Duration</legend>
                        <div class="required">
                              <label for="duration">Duration:</label>
                            <input name="duration" type="text" id="duration" class="small" value="<?php echo $this->embed['duration']; ?>" /> (00:00 - mm:ss)
                        </div>                        
                    </fieldset>
                    <fieldset>
                          <legend>Embed Code</legend>
                        <div class="required">
                              <label for="embed_code">Embed Code:</label>
                            <textarea name="embed_code" id="embed_code" rows="7" class="mega"><?php echo e($this->embed['embed_code']); ?></textarea>
                        </div>
                    </fieldset>
                    <fieldset>
                          <legend>Video Thumb</legend>
                          <div class="required">
                              <label for="thumb_method">Thumb Method</label>
                              <select name="thumb_method" id="thumb_method">
                                  <option value="file"<?php if ($this->embed['thumb_method'] == 'file'): echo ' selected="selected"'; endif; ?>>File</option>
                                  <option value="url"<?php if ($this->embed['thumb_method'] == 'url'): echo ' selected="selected"'; endif; ?>>URL</option>
                              </select>
                          </div>
                          <div id="thumb_method_file"<?php if ($this->embed['thumb_method'] == 'url'): echo ' style="display: none;"'; endif; ?>>
                              <div class="required">
                                  <label name="thumb_file">Thumb:</label>
                                  <input name="thumb_file" type="file" id="thumb" />
                              </div>
                              <div id="thumb_file_placeholder" class="add_more"><a href="#thumb_file" id="add_thumb_file" title="Click to add more thumb files!">Add More</a></div>
                        </div>
                          <div id="thumb_method_url"<?php if ($this->embed['thumb_method'] == 'file'): echo ' style="display: none;"'; endif; ?>>
                              <div class="required">
                                  <label for="thumb_url">Thumb URL:</label>
                                  <input name="thumb_url" type="text" id="thumb_url" class="mega" value="" />
                              </div>
                              <div id="thumb_url_placeholder" class="add_more"><a href="#thumb_url" id="add_thumb_url" title="Click to add more thumb urls!">Add More</a></div>
                        </div>
                    </fieldset>
                    <div class="submit">
                        <input name="submit_embed" type="submit" id="submit_embed" class="button butDef" value=" Embed Video " />
                    </div>
                </form>
            </div>
        </div>
    </div>
Онлайн: 0
Реклама