Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/channel_edit.tpl.php
Строк: 352
<?php defined('_VALID') or die('Restricted Access!'); ?>
    <link href="<?php echo REL_URL?>/misc/jquery-guillotine/jquery.guillotine.css" media="all" rel="stylesheet">
    <script src="<?php echo REL_URL?>/misc/jquery-guillotine/jquery.guillotine.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function() {
        $("#name").keyup(function() {
            $("#slug").val(convertToSlug($(this).val()));
        });
        
        $("input[name='process_advanced']").click(function(e) {
            e.preventDefault();
            if ($('#edit_advanced').is(':visible')) {
                $('#edit_advanced').hide();
            } else {
                $('#edit_advanced').show();
            }
        });        
    });
    </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('channel_menu'); ?>
            <div class="content clearfix">
                <?php if ($this->channel): ?>
                <form id="channel-edit-form" method="post" enctype="multipart/form-data" action="<?php echo ADMIN_URL?>/index.php?q=channel/edit&id=<?php echo $this->channel['channel_id']; ?>">
                    <input name="scale" type="hidden" value="">
                    <input name="x" type="hidden" value="">
                    <input name="y" type="hidden" value="">
                    <input name="w" type="hidden" value="">
                    <input name="h" type="hidden" value="">                
                    <input name="c" type="hidden" value="">                
                    <fieldset>
                        <legend>Channel Information</legend>
                        <div class="required">
                              <label for="username">Username</label>
                            <input name="username" type="text" id="username" class="large" maxlength="32" value="<?php echo e($this->channel['username']); ?>" />
                        </div>
                        <div class="required">
                              <label for="network_id">Network</label>
                              <select name="network_id" id="network_id">
                                  <option value="">Select Network</option>
                                  <?php foreach ($this->networks as $network): ?>
                                  <option value="<?php echo $network['network_id']; ?>"<?php if ($this->channel['network_id'] == $network['network_id']): echo ' selected="selected"'; endif; echo '>',e($network['name']); ?></option>
                                  <?php endforeach; ?>
                              </select>
                        </div>
                        <div class="required">
                              <label for="name">Name</label>
                            <input name="name" type="text" id="name" class="mega" maxlength="100" value="<?php echo e($this->channel['name']); ?>" />
                        </div>
                        <div class="required">
                              <label for="slug">Slug</label>
                            <input name="slug" type="text" id="slug" class="mega" maxlength="100" value="<?php echo e($this->channel['slug']); ?>" />
                        </div>
                        <div class="optional">
                              <label for="description">Description</label>
                            <textarea name="description" id="description" class="mega" rows="3"><?php echo e($this->channel['description']); ?></textarea>
                        </div>
                        <div class="required">
                            <label for="url">URL</label>
                            <input name="url" type="text" id="url" class="mega" maxlength="255" value="<?php echo e($this->channel['url']); ?>" />
                        </div>                        
                    </fieldset>
                    <fieldset>
                        <legend>Channel Graphics</legend>
                        <div class="required">
                            <label for="thumb_current">Current Thumb:</label>
                            <img src="<?php echo CHANNEL_URL,'/',$this->channel['channel_id'].'.thumb.'.$this->channel['thumb'],'?',rand(1,100); ?>" alt="" />
                        </div>
                        <div class="required">
                            <label for="thumb_crop" style="float: left;">Crop Thumb:</label>
                            <div style="float: left;">
                                <div style="width: 300px; height: 200px; margin-bottom: 10px;">
                                    <img src="<?php echo CHANNEL_URL,'/',$this->channel['channel_id'].'.thumb.'.$this->channel['thumb'],'?',rand(1,100); ?>" id="thumb-crop" />
                                </div>
                                  <input id="zoom-in" type="button" class="button butDef" value="Zoom In" />
                                  <input id="fit" type="button" class="button butDef" value="Fit" />
                                  <input id="zoom-out" type="button" class="button butDef" value="Zoom Out" />
                              </div>
                              <div class="clearfix"></div>
                              <script type="text/javascript">
                              $(document).ready(function() {
                                  var picture = $('#thumb-crop');
                            
                                  picture.on('load', function() {
                                      picture.guillotine({width: 300, height: 200});
                                      picture.guillotine('fit');

                                      $("input[id='zoom-in']").click(function() {
                                          picture.guillotine('zoomIn');
                                      });

                                      $("input[id='zoom-out']").click(function() {
                                          picture.guillotine('zoomOut');
                                      });

                                      $("input[id='fit']").click(function() {
                                          picture.guillotine('fit');
                                      });

                                      $("input[id='crop']").click(function() {
                                          var data = picture.guillotine('getData');

                                          $("input[name='scale']").val(data.scale);
                                          $("input[name='x']").val(data.x);
                                          $("input[name='y']").val(data.y);
                                          $("input[name='w']").val(data.w);
                                          $("input[name='h']").val(data.h);
                                          $("input[name='c']").val('submitted');

                                          $("#channel-edit-form").submit();
                                      });
                                  });
                              });
                          </script>                              
                        </div>
                        <div class="required">
                            <label for="thumb">Thumb File:</label>
                            <input name="thumb" type="file" id="thumb" />
                        </div>
                        <div class="required">
                            <label for="logo_current">Current Logo:</label>
                            <img src="<?php echo CHANNEL_URL,'/',$this->channel['channel_id'].'.logo.'.$this->channel['logo'],'?',rand(1,100); ?>" />
                        </div>
                        <div class="required">
                            <label for="logo">Logo File:</label>
                            <input name="logo" type="file" id="logo" />
                        </div>
                    </fieldset>
                    <fieldset>
                        <legend>Channel Advertising</legend>
                        <div class="required">
                            <label for="adv_bottom_id">Bottom Advertising:</label>
                            <select name="adv_bottom_id" id="adv_bottom_id" class="large">
                                <option value="">Select Advertising</option>
                                <?php foreach ($this->advs_bottom as $adv): ?>
                                <option value="<?php echo $adv['adv_id']; ?>"<?php if ($this->channel['adv_bottom_id'] == $adv['adv_id']): echo ' selected="selected"'; endif; echo '>',e($adv['adv_name']); ?></option>
                                <?php endforeach; ?>
                            </select>
                            <span class="help-info">Advertising entries from the Channel Bottom advertising group!</span>
                        </div>
                        <div class="required">
                            <label for="adv_right_id">Right Advertising:</label>
                            <select name="adv_right_id" id="adv_right_id" class="large">
                                <option value="">Select Advertising</option>
                                <?php foreach ($this->advs_right as $adv): ?>
                                <option value="<?php echo $adv['adv_id']; ?>"<?php if ($this->channel['adv_right_id'] == $adv['adv_id']): echo ' selected="selected"'; endif; echo '>',e($adv['adv_name']); ?></option>
                                <?php endforeach; ?>
                            </select>
                            <span class="help-info">Advertising entries from the Channel Right advertising group!</span>
                        </div>
                        <div class="required">
                            <label for="adv_player_id">Player Advertising:</label>
                            <select name="adv_player_id" id="adv_player_id" class="large">
                                <option value="">Select Advertising</option>
                                <?php foreach ($this->advs_player as $adv): ?>
                                <option value="<?php echo $adv['adv_id']; ?>"<?php if ($this->channel['adv_player_id'] == $adv['adv_id']): echo ' selected="selected"'; endif; echo '>',e($adv['adv_name']); ?></option>
                                <?php endforeach; ?>
                            </select>
                            <span class="help-info">Advertising entries from the Video Player advertising group!</span>
                        </div>
                    </fieldset>
                    <div id="edit_advanced" style="display: none;">
                    <fieldset>
                        <legend>Advanced Properties</legend>
                        <div class="required">
                              <label for="total_videos">Total Videos</label>
                            <input name="total_videos" type="text" id="total_videos" class="medium" value="<?php echo $this->channel['total_videos']; ?>" />
                        </div>
                        <div class="required">
                              <label for="total_views">Total Views</label>
                            <input name="total_views" type="text" id="total_views" class="medium" value="<?php echo $this->channel['total_views']; ?>" />
                        </div>
                        <div class="required">
                              <label for="total_likes">Total Likes</label>
                            <input name="total_likes" type="text" id="total_likes" class="medium" value="<?php echo $this->channel['total_likes']; ?>" />
                        </div>
                        <div class="required">
                              <label for="total_votes">Total Votes</label>
                            <input name="total_votes" type="text" id="total_votes" class="medium" value="<?php echo $this->channel['total_votes']; ?>" />
                        </div>
                        <div class="required">
                              <label for="total_duration">Total Duration</label>
                            <input name="total_duration" type="text" id="total_duration" class="medium" value="<?php echo $this->channel['total_duration']; ?>" />
                        </div>
                        <div class="required">
                              <label for="total_size">Total Size</label>
                            <input name="total_size" type="text" id="total_size" class="medium" value="<?php echo $this->channel['total_size']; ?>" />
                        </div>
                        <div class="required">
                              <label for="total_subscribers">Total Subscribers</label>
                            <input name="total_subscribers" type="text" id="total_subscribers" class="medium" value="<?php echo $this->channel['total_subscribers']; ?>" />
                        </div>
                        <div class="required">
                              <label for="add_date">Add Date</label>
                            <input name="add_date" type="text" id="add_date" class="medium" value="<?php echo VDate::format($this->channel['add_time'], 'Y-m-d H:i:s'); ?>" />
                        </div>
                        <div class="required">
                              <label for="last_add_date">Last Add Date</label>
                            <input name="last_add_date" type="text" id="last_add_date" class="medium" value="<?php echo VDate::format($this->channel['last_add_time'], 'Y-m-d H:i:s'); ?>" />
                        </div>
                    </fieldset>
                    </div>
                    <div class="submit">
                        <input name="submit-edit-channel" type="submit" id="submit-edit-channel" class="button butDef" value=" Edit Channel " />
                        <input name="crop" type="button" id="crop" class="button butDef" value=" Crop & Update Channel " />
                        <input name="process_advanced" type="button" id="process_advanced" class="button butDef" value=" Advanced " />                        
                    </div>
                </form>
                <?php else: ?>
                <div class="none">Invalid channel!</div>
                <?php endif; ?>
            </div>
        </div>
    </div>
Онлайн: 2
Реклама