Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/video_fhg.tpl.php
Строк: 178
<?php defined('_VALID') or die('Restricted Access!'); ?>
    <style type="text/css">
        form fieldset.video {
            background: #E0E0E0;
            margin-bottom: 10px;
        }
    
        form fieldset label {
            width: 120px;
        }
        
        form fieldset label.small {
            width: 80px;
        }
    </style>
    <script type="text/javascript">
    var unique = "<?php echo $this->unique?>";
    function update_upload_progress(import_id)
    {
        $.ajax({
            url: base_url + '/ajax.php?s=fhg_scrapper_progress&d=backend',
            cache: false,
            type: "POST",
            dataType: "json",
            data: { import_id: import_id },
            success: function(response){
                $(".progress_msg").html('');
                $(".bar").css('width', response.progress + '%');
                $(".progress_msg").html(response.msg);
                setTimeout("update_upload_progress('" + import_id + "')", 3600);
            }
        });
     }
     $(document).ready(function() {
        $("input[type='checkbox']").change(function() {
            var checked = $(this).attr('checked');
            var name    = $(this).attr('name').replace('[process]', '');
            if (checked == 'checked') {
                $("#video-" + name).slideDown();
            } else {
                $("#video-" + name).slideUp();
            }
        });
        
        $("input[name='convert']").click(function() {
            var convert = $(this).val();
            if (convert == '1') {
                var inputs = $("input[name$='[convert]']");
                $(inputs).removeAttr('checked');
                jQuery.each(inputs, function() {
                    if ($(this).val() == '1') {
                        $(this).attr('checked', 'checked');
                    }
                });
            }
        });

        var import_id = $("input[name='unique']").val();
        $("input[name='submit_add']").click(function(e) {
            $.ajax({
                url: base_url + '/ajax.php?s=fhg_scrapper_progress&d=backend',
                cache: false,
                type: "POST",
                dataType: "json",
                data: { import_id: unique },
                success: function(response){
                    $("#progress_container").fadeIn();
                    setTimeout("update_upload_progress('" + import_id + "')", 1200);
                    $("#fhg-scrapper-form").submit();
                }
            });
        });
    });
    </script>
    <?php echo $this->fetch('errors'); ?>
    <?php echo $this->fetch('messages'); ?>
    <?php echo $this->fetch('warnings'); ?>
    <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 id="fhg-scrapper-form" method="post" action="<?php echo ADMIN_URL?>/index.php?q=video/fhg">
                    <?php if ($this->processed): ?>
                    <input name="submit_process" type="hidden" value="1" />
                    <input name="unique" type="hidden" value="<?php echo $this->unique?>" />
                    <fieldset>
                        <legend>Import Properties</legend>
                        <div class="required">
                              <label for="username">Username:</label>
                            <input name="username" type="text" id="username" class="large" value="<?php echo e($this->username); ?>" />
                        </div>
                        <div class="required">
                            <label for="category">Categories:</label>
                            <div class="categories" style="width: 800px;">
                                  <?php echo p('categories_select'$this->categories$this->category); ?>
                                <div class="clear-left"></div>
                                <i>Categories checked here will be assigned to all imported videos! Video can be edited later!</i>
                            </div>
                            <div class="clear"></div>
                        </div>
                        <div class="required">
                              <label for="type">Type:</label>
                              <input name="type" type="radio" id="type" class="radio" value="public"<?php if ($this->type == 'public'): echo ' checked="checked"'; endif;?> /> Public
                              <input name="type" type="radio" class="radio" value="private"<?php if ($this->type == 'private'): echo ' checked="checked"'; endif;?> /> Private
                        </div>
                        <?php if (VModule::enabled('premium')): ?>
                        <div class="required">
                              <label for="premium">Premium:</label>
                              <input name="premium" type="radio" id="premium" class="radio" value="1"<?php if ($this->premium == '1'): echo ' checked="checked"'; endif;?> /> Yes
                              <input name="premium" type="radio" class="radio" value="0"<?php if ($this->premium == '0'): echo ' checked="checked"'; endif;?> /> No
                        </div>
                        <?php endif; ?>
                          <div class="required">
                              <label for="status">Status:</label>
                              <select name="status" id="status">
                                  <?php foreach ($this->statuses as $key => $value): ?>
                                <option value="<?php echo $key?>"<?php if ($this->status == $key): echo ' selected="selected"'; endif; ?>><?php echo e($value); ?></option>
                                  <?php endforeach; ?>
                              </select>
                          </div>
                    </fieldset>
                    <fieldset>
                        <legend>Scrapped Videos</legend>
                        <?php foreach ($this->videos as $key => $video): ?>
                        <fieldset class="video">
                            <legend><input name="<?php echo $key?>[process]" type="checkbox" value="1" checked="checked" /> <?php echo $key.'.'.$video['ext']; ?></legend>
                            <input name="<?php echo $key?>[path]" type="hidden" value="<?php echo $video['path']; ?>" />
                            <input name="<?php echo $key?>[size]" type="hidden" value="<?php echo $video['size']; ?>" />
                            <input name="<?php echo $key?>[duration]" type="hidden" value="<?php echo $video['duration']; ?>" />
                            <input name="<?php echo $key?>[audio]" type="hidden" value="<?php echo $video['audio']; ?>" />
                            <input name="<?php echo $key?>[format]" type="hidden" value="<?php echo $video['format']; ?>" />
                            <input name="<?php echo $key?>[identify]" type="hidden" value="<?php echo $video['identify']; ?>" />
                            <div id="video-<?php echo $key?>">
                                <div class="left" style="width: 74%; float: left;">
                                    <div class="required">
                                          <label for="title">Title:</label>
                                          <input name="<?php echo $key?>[title]" type="text" class="large" value="<?php echo e($video['title']); ?>" />
                                      </div>
                                      <div class="required">
                                          <label for="description">Description:</label>
                                          <textarea name="<?php echo $key?>[description]" cols="60" rows="2"><?php echo e($video['description']); ?></textarea>
                                      </div>
                                      <div class="required">
                                          <label for="tags">Tags:</label>
                                          <textarea name="<?php echo $key?>[tags]" cols="60" rows="2"><?php echo e($video['tags']); ?></textarea>
                                      </div>
                                </div>
                                <div class="right" style="width: 24%; float: right;">
                                    <?php if (!empty($video['identify'])): ?>
                                    <div class="required">
                                          <label for="format" class="small">Format:</label>
                                          <?php echo $video['identify']; ?>
                                      </div>
                                      <?php endif; ?>
                                      <div class="required">
                                            <label for="convert" class="small">Convert:</label>
                                            <?php if (!empty($video['identify'])): ?>
                                            <input name="<?php echo $key?>[convert]" type="radio" class="radio" value="1" /> Yes
                                            <input name="<?php echo $key?>[convert]" type="radio" class="radio" value="0" checked="checked" /> No
                                            <?php else: ?>
                                            <input name="<?php echo $key?>[convert]" type="radio" class="radio" value="1" checked="checked" /> Yes
                                            <?php endif; ?>
                                        </div>
                                        <div class="required">
                                            <img src="<?php echo $video['thumb']; ?>" alt="" />
                                        </div>
                                </div>
                                <div class="clear"></div>
                            </div>
                        </fieldset>
                        <?php endforeach; ?>
                    </fieldset>
                    <div id="progress_container" style="display: none;">
                          <fieldset>
                              <legend>Upload FTP Import Progress</legend>
                            <div id="progress" style="width: 98%;"><div class="bar" style="width: 0;">&nbsp;</div></div>
                            <div class="progress_msg">Processing...please wait!</div>
                        </fieldset>
                    </div>                    
                    <div class="submit">
                        <input name="submit_process" type="submit" id="submit_process" class="button butDef" value=" Import Videos " />
                    </div>
                    <?php else: ?>
                    <fieldset>
                        <legend>Video Scrapper</legend>
                        <div class="required">
                            <label for="url">URL</label>
                            <input name="url" type="text" id="url" class="extra" value="<?php echo $this->url?>" />
                        </div>
                    </fieldset>
                    <div class="submit">
                        <input name="submit_url" type="submit" id="submit_url" class="button butDef" value=" Grab Videos " />
                    </div>
                    <?php endif; ?>
                </form>
            </div>
        </div>
    </div>
Онлайн: 0
Реклама