Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/video_mass_edit.tpl.php
Строк: 315
<?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() {
          $("a[id^='toggle-']").live('click', function(e) {
              e.preventDefault();
              
              var video_id = $(this).attr('id').match(/toggle-(.*)/)[1];
              var fieldset = $("fieldset[id='fieldset-" + video_id + "']");
              
              if ($(fieldset).is(':visible')) {
                  $(this).html('<img src="<?php echo TPL_REL?>/images/arrow_down.png" alt="" />');
                  $(fieldset).slideUp();
              } else {
                  $(fieldset).slideDown();
                  $(this).html('<img src="<?php echo TPL_REL?>/images/arrow_up.png" alt="" />');
              }
          });
          
        $("img[id^='video_thumb_']").click(function() {
              var array         = $(this).attr('id').split('_');
              var video_id    = array[2];
              var thumb        = array[3];
              
              $("img[id^='video_thumb_" + video_id + "_']").removeClass();
              $(this).addClass('active');
              
              $("input[id='thumb-" + video_id + "']").val(thumb);
        });          
        
        $("#settings input").click(function() {
              var name = $(this).attr('name');

              if ($(this).is(':checked')) {
                  $("div[id^='container-" + name + "-']").show();
                  $("fieldset[id^='container-" + name + "-']").show();
              } else {
                  $("div[id^='container-" + name + "-']").hide();
                  $("fieldset[id^='container-" + name + "-']").hide();
              }
        });
        
        $("#expand-ids").click(function(e) {
            e.preventDefault();
            $("#expand-container").toggle();
        });
    });
    </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->videos): ?>
                <form id="mass-edit-form" method="post" action="">
                <fieldset>
                    <legend>Updating <?php echo count($this->videos); ?> videos (<a href="#expand" id="expand-ids"><img src="<?php echo TPL_REL?>/images/arrow_inout.png" alt="" /></a>)!</legend>
                    <fieldset id="expand-container" style="display: none;">
                        <?php foreach ($this->videos as $video): ?>
                        <a href="<?php echo ADMIN_URL?>/index.php?q=video/view&amp;id=<?php echo $video['video_id']; ?>" target="_blank"><?php echo $video['video_id']; ?></a>&nbsp;
                        <input name="videos[]" type="hidden" value="<?php echo $video['video_id']; ?>" />
                        <?php endforeach; ?>
                    </fieldset>                
                    <fieldset>
                        <legend>Settings</legend>
                        <div id="settings" class="required">
                            <label for="edit">Edit: </label>
                            <input name="username" type="checkbox" id="username" class="radio" value="1" checked="checked" /> Username &nbsp;
                            <input name="title" type="checkbox" id="title" class="radio" value="1" checked="checked" /> Title &nbsp;
                            <input name="description" type="checkbox" id="description" class="radio" value="1" checked="checked" /> Description &nbsp;
                            <input name="tags" type="checkbox" id="tags" class="radio" value="1" checked="checked" /> Tags &nbsp;
                            <input name="categories" type="checkbox" id="categories" class="radio" value="1" checked="checked" /> Categories &nbsp;
                            <input name="thumb" type="checkbox" id="thumb" class="radio" value="1" checked="checked" /> Thumb &nbsp;
                            <input name="permissions" type="checkbox" id="permissions" class="radio" value="1" /> Permissions &nbsp;
                            <input name="properties" type="checkbox" id="Properties" class="radio" value="1" /> Properties &nbsp;
                        </div>
                    </fieldset>
                    <?php foreach ($this->videos as $video): ?>
                    <fieldset>
                        <legend><a href="#toggle" id="toggle-<?php echo $video['video_id']; ?>"><img src="<?php echo TPL_REL?>/images/arrow_up.png" alt="" /></a> Editing: <?php echo $video['video_id'],' : ',e(VText::truncate_chars($video['title'], 100)); ?></legend>
                        <fieldset id="fieldset-<?php echo $video['video_id']; ?>">
                            <div id="container-username-<?php echo $video['video_id']; ?>" class="required">
                                <label for="username-<?php echo $video['video_id']; ?>">Username: </label>
                                <input name="items[<?php echo $video['video_id']; ?>][username]" type="text" id="username-<?php echo $video['video_id']; ?>" class="medium" value="<?php echo e($video['username']); ?>" />
                            </div>
                            <div id="container-title-<?php echo $video['video_id']; ?>" class="required">
                                <label for="title-<?php echo $video['video_id']; ?>">Title: </label>
                                <input name="items[<?php echo $video['video_id']; ?>][title]" type="text" id="title-<?php echo $video['video_id']; ?>" class="extra" value="<?php echo e($video['title']); ?>" />
                            </div>
                            <div id="container-description-<?php echo $video['video_id']; ?>" class="required">
                                <label for="description-<?php echo $video['video_id']; ?>">Description: </label>
                                <textarea name="items[<?php echo $video['video_id']; ?>][description]" id="description-<?php echo $video['video_id']; ?>" class="extra"><?php echo e($video['description']); ?></textarea>
                            </div>
                            <div id="container-tags-<?php echo $video['video_id']; ?>" class="required">
                                <label for="tags-<?php echo $video['video_id']; ?>">Tags: </label>
                                <textarea name="items[<?php echo $video['video_id']; ?>][tags]" id="tags-<?php echo $video['video_id']; ?>" class="extra"><?php echo e($video['tags']); ?></textarea>
                            </div>
                            <div id="container-categories-<?php echo $video['video_id']; ?>" class="required">
                                <label for="categories-<?php echo $video['video_id']; ?>">Categories: </label>
                                <div class="categories">
                                    <?php echo p('categories_select'$this->categories$video['categories'], 'items['.$video['video_id'].'][categories][]'); ?>
                                </div>
                            </div>
                            <div class="clear"></div>
                            <fieldset id="container-permissions-<?php echo $video['video_id']; ?>" style="display: none;">
                                <legend>Permissions</legend>
                                <div class="required">
                                    Allow Embed: 
                                    <input name="items[<?php echo $video['video_id']; ?>][allow_embed]" type="radio" id="allow_embed_on" class="radio" value="1"<?php if ($video['allow_embed'] == '1'): echo ' checked="checked"'; endif; ?> /> Yes
                                      <input name="items[<?php echo $video['video_id']; ?>][allow_embed]" type="radio" id="allow_embed_off" class="radio" value="0"<?php if ($video['allow_embed'] == '0'): echo ' checked="checked"'; endif; ?> /> No
                                    &nbsp;&nbsp;&nbsp; Allow Rating: 
                                    <input name="items[<?php echo $video['video_id']; ?>][allow_rating]" type="radio" id="allow_rating_on" class="radio" value="1"<?php if ($video['allow_rating'] == '1'): echo ' checked="checked"'; endif; ?> /> Yes
                                      <input name="items[<?php echo $video['video_id']; ?>][allow_rating]" type="radio" id="allow_rating_off" class="radio" value="0"<?php if ($video['allow_rating'] == '0'): echo ' checked="checked"'; endif; ?> /> No
                                    &nbsp;&nbsp;&nbsp; Allow Comment: 
                                    <input name="items[<?php echo $video['video_id']; ?>][allow_comment]" type="radio" id="allow_comment_on" class="radio" value="1"<?php if ($video['allow_comment'] == '1'): echo ' checked="checked"'; endif; ?> /> Yes
                                      <input name="items[<?php echo $video['video_id']; ?>][allow_comment]" type="radio" id="allow_comment_off" class="radio" value="0"<?php if ($video['allow_comment'] == '0'): echo ' checked="checked"'; endif; ?> /> No
                                    &nbsp;&nbsp;&nbsp; Allow Download: 
                                    <input name="items[<?php echo $video['video_id']; ?>][allow_download]" type="radio" id="allow_download_on" class="radio" value="1"<?php if ($video['allow_download'] == '1'): echo ' checked="checked"'; endif; ?> /> Yes
                                      <input name="items[<?php echo $video['video_id']; ?>][allow_download]" type="radio" id="allow_download_off" class="radio" value="0"<?php if ($video['allow_download'] == '0'): echo ' checked="checked"'; endif; ?> /> No
                                </div>
                            </fieldset>
                            <fieldset id="container-properties-<?php echo $video['video_id']; ?>" style="display: none;">
                                <legend>Properties</legend>
                                <fieldset>
                                    <legend>Media Properties</legend>
                                    <div class="required">
                                        <label for="ext">Format:</label>
                                        <select name="items[<?php echo $video['video_id']; ?>][ext]" id="ext">
                                            <option value="flv"<?php if ($video['ext'] == 'flv'): echo ' selected="selected"'; endif; ?>>FLV</option>
                                            <option value="mp4"<?php if ($video['ext'] == 'mp4'): echo ' selected="selected"'; endif; ?>>MP4</option>
                                        </select>
                                    </div>
                                    <div class="required">
                                        <label for="duration">Duration:</label>
                                        <input name="items[<?php echo $video['video_id']; ?>][duration]" type="text" class="small" id="duration" value="<?php echo $video['duration']; ?>" /> <i>seconds</i>
                                    </div>
                                </fieldset>
                                <div class="optional"<?php if (!VModule::enabled('mobile')): echo ' style="display: none;"'; endif; ?>>
                                      <label for="mobile">Mobile:</label>
                                      <input name="items[<?php echo $video['video_id']; ?>][mobile]" type="radio" class="radio" value="1"<?php if ($video['mobile'] == '1'): echo ' checked="checked"'; endif; ?>> Yes
                                      <input name="items[<?php echo $video['video_id']; ?>][mobile]" type="radio" class="radio" value="0"<?php if ($video['mobile'] == '0'): echo ' checked="checked"'; endif; ?>> No
                                </div>
                                <div class="optional"<?php if (!VModule::enabled('premium')): echo ' style="display: none;"'; endif; ?>>
                                      <label for="premium">Premium:</label>
                                      <input name="items[<?php echo $video['video_id']; ?>][premium]" type="radio" class="radio" value="1"<?php if ($video['premium'] == '1'): echo ' checked="checked"'; endif; ?>> Yes
                                      <input name="items[<?php echo $video['video_id']; ?>][premium]" type="radio" class="radio" value="0"<?php if ($video['premium'] == '0'): echo ' checked="checked"'; endif; ?>> No
                                </div>
                                <div class="optional">
                                      <label for="flagged">Flagged:</label>
                                      <input name="items[<?php echo $video['video_id']; ?>][flagged]" type="radio" class="radio" value="1"<?php if ($video['flagged'] == '1'): echo ' checked="checked"'; endif; ?>> Yes
                                      <input name="items[<?php echo $video['video_id']; ?>][flagged]" type="radio" class="radio" value="0"<?php if ($video['flagged'] == '0'): echo ' checked="checked"'; endif; ?>> No
                                </div>
                                <div class="optional">
                                      <label for="locked">Locked:</label>
                                      <input name="items[<?php echo $video['video_id']; ?>][locked]" type="radio" class="radio" value="1"<?php if ($video['locked'] == '1'): echo ' checked="checked"'; endif; ?>> Yes
                                      <input name="items[<?php echo $video['video_id']; ?>][locked]" type="radio" class="radio" value="0"<?php if ($video['locked'] == '0'): echo ' checked="checked"'; endif; ?>> No
                                </div>
                                  <div class="optional">
                                      <label for="status">Status:</label>
                                      <select name="items[<?php echo $video['video_id']; ?>][status]" id="status-<?php echo $video['video_id']; ?>">
                                          <option value="0"<?php if ($video['status'] == '0'): echo ' selected="selected"'; endif; ?>>Suspended</option>
                                          <option value="1"<?php if ($video['status'] == '1'): echo ' selected="selected"'; endif; ?>>Active</option>
                                          <option value="2"<?php if ($video['status'] == '2'): echo ' selected="selected"'; endif; ?>>Approve Required</option>
                                          <option value="3"<?php if ($video['status'] == '3'): echo ' selected="selected"'; endif; ?>>Uploading</option>
                                          <option value="4"<?php if ($video['status'] == '4'): echo ' selected="selected"'; endif; ?>>Converting</option>
                                          <option value="5"<?php if ($video['status'] == '5'): echo ' selected="selected"'; endif; ?>>Grabbing</option>
                                          <option value="6"<?php if ($video['status'] == '6'): echo ' selected="selected"'; endif; ?>>Queue</option>
                                          <option value="7"<?php if ($video['status'] == '7'): echo ' selected="selected"'; endif; ?>>Failed</option>
                                      </select>
                                  </div>
                            </fieldset>
                            <fieldset id="container-thumb-<?php echo $video['video_id']; ?>">
                                <legend>Thumb</legend>
                                  <input name="items[<?php echo $video['video_id']; ?>][thumb]" type="hidden" id="thumb-<?php echo $video['video_id']; ?>" value="<?php echo $video['thumb']; ?>" />
                                  <table cellspacing="2" cellpadding="0" border="0"><tr><td>
                                  <div class="thumbs_small">
                                      <?php for ($i=1$i<=$video['thumbs']; $i++): ?>
                                      <img src="<?php echo THUMB_URL,'/',path($video['video_id']),'/',$i?>.jpg" id="video_thumb_<?php echo $video['video_id'],'_',$i?>"<?php if ($video['thumb'] == $i): echo ' class="active"'; endif; ?> alt="" width="83" />
                                      <?php endfor; ?>
                                      <div class="clear_left"></div>
                                </div>
                                </td></tr></table>
                            </fieldset>
                        </fieldset>
                    </fieldset>
                    <?php endforeach; ?>
                </fieldset>
                <div class="submit">
                    <input name="submit-edit" type="submit" id="submit-edit" class="button butDef" value=" Update Videos " />
                </div>
                </form>
                <?php else: ?>
                <div class="none">No videos found! What exactly did you click/select!?</div>
                <?php endif; ?>
            </div>
        </div>
    </div>
Онлайн: 0
Реклама