Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/pornstar_add.tpl.php
Строк: 284
<?php defined('_VALID') or die('Restricted Access!'); ?>
    <script type="text/javascript" src="<?php echo TPL_REL?>/js/ajaxupload.js"></script>
    <script type="text/javascript" src="<?php echo TPL_REL?>/js/jquery.Jcrop.js"></script>
    <script type="text/javascript">
    var photo_width = <?php echo $this->pcfg['photo_width']; ?>;
    var photo_height = <?php echo $this->pcfg['photo_height']; ?>;
    function updateCoords(coords)
    {
          document.getElementById("x").value = coords.x
        document.getElementById("y").value = coords.y
        document.getElementById("x2").value = coords.x2
        document.getElementById("y2").value = coords.y2
        document.getElementById("w").value = coords.w
        document.getElementById("h").value = coords.h
    };
    
    function crop_avatar(id, photo_width, photo_height) {
        var pos_width = photo_width+5;
        var pos_height = photo_height+5;
          $("#" + id).Jcrop({
              onChange: updateCoords,
            onSelect: updateCoords,
            setSelect: [ 5, 5, pos_width, pos_height],
            minSize: [photo_width, photo_height],
            bgColor: 'black',
            bgOpacity: .8,
            allowResize: false,
            allowMove: true
        });
    }
    
    $(document).ready(function() {
          new AjaxUpload('#file', {
              action: base_url + '/ajax.php?s=pornstar&d=backend',
              data: {
                  unique: '<?php echo $this->unique?>'
              },
              responseType: "json",
              onComplete: function(file, response) {
                  if (response.status == '1') {
                        $("#upload_photo_container").html('');
                        
                        var aCode = '<fieldset><legend>Crop Avatar</legend><input name="photo" type="hidden" value="' + response.code + '" />';
                        var aCode = aCode + '<input name="photo" type="hidden" id="photo" value="1" />';
                        var aCode = aCode + '<input name="x" type="hidden" id="x" value="5" />';
                        var aCode = aCode + '<input name="y" type="hidden" id="y" value="5" />';
                        var aCode = aCode + '<input name="x2" type="hidden" id="x2" value="' + response.width + '" />';
                        var aCode = aCode + '<input name="y2" type="hidden" id="y2" value="' + response.height + '" />';
                        var aCode = aCode + '<input name="w" type="hidden" id="w" value="' + response.width + '" />';
                        var aCode = aCode + '<input name="h" type="hidden" id="h" value="' + response.height + '" />';
                        var aCode = aCode + '<div style="margin-left: 210px;"><img src="' + response.code + '" alt="avatar" id="crop_image" /></div>';
                        var aCode = aCode + '</fieldset>';
                        
                      $("#upload_photo_container").html(aCode);
                      $("#upload_photo_container").show();
                          
                      crop_avatar('crop_image', response.width, response.height);
                      
                      $("#response_container").removeClass('tpRed').addClass('tpGreen');
                  } else if (response.status == '2') {
                      $("#response_container").removeClass('tpRed').addClass('tpGreen');
                  } else {
                      $("#response_container").removeClass('tpGreen').addClass('tpRed');
                  }
                  
                  $("input[id='file_path']").val(response.ext);
                  
                  $("#response_message").html(response.msg);
                  $("#response_container").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('pornstar_menu'); ?>
            <div class="content clearfix">
                <?php echo $this->fetch('pornstar_add_menu'); ?>
                <div class="tabContent clearfix">
                <form id="pornstar-add-form" method="post" enctype="multipart/form-data" action="<?php echo ADMIN_URL?>/index.php?q=pornstar/add">
                    <input name="unique" type="hidden" id="unique" value="<?php echo e($this->unique); ?>" />
                    <input name="file_path" type="hidden" id="file_path" value="" />
                    <div class="tab1">
                    <fieldset>
                        <legend>Pornstar Information</legend>
                        <div class="required">
                            <label for="name">Name</label>
                            <input name="name" type="text" id="name" class="mega" value="<?php echo e($this->pornstar['name']); ?>" />
                        </div>
                        <div class="required">
                            <label for="slug">SLUG</label>
                            <input name="slug" type="text" id="slug" class="mega" value="<?php echo e($this->pornstar['slug']); ?>" />
                        </div>
                        <div class="optional">
                            <label for="description">Description</label>
                            <textarea name="description" id="description" class="mega"><?php echo e($this->pornstar['description']); ?></textarea>
                        </div>
                        <div class="required">
                            <label for="gender">Gender</label>
                            <select name="gender" id="gender">
                                  <option value="">---</option>
                                <option value="female"<?php if ($this->pornstar['gender'] == 'female'): echo ' selected="selected"'; endif; ?>>Female</option>
                                <option value="male"<?php if ($this->pornstar['gender'] == 'male'): echo ' selected="selected"'; endif; ?>>Male</option>
                                <option value="tranny"<?php if ($this->pornstar['gender'] == 'tranny'): echo ' selected="selected"'; endif; ?>>Tranny</option>
                            </select>
                        </div>
                    </fieldset>
                    <fieldset>
                        <legend>Pornstar Bio</legend>
                        <div class="required">
                            <label for="aliases">Aliases</label>
                            <textarea name="aliases" id="aliases" class="extra" rows="2"><?php echo e($this->pornstar['aliases']); ?></textarea>
                        </div>
                        <div class="required">
                            <label for="performs">Performs</label>
                            <textarea name="performs" id="performs" class="extra" rows="2"><?php echo e($this->pornstar['performs']); ?></textarea>
                        </div>
                        <div class="required">
                            <label for="birth_date">Birth Date</label>
                            <?php echo p('date'$this->pornstar['birth_date']); ?>
                        </div>
                        <div class="required">
                            <label for="birth_location">Birth Location</label>
                            <input name="birth_location" type="text" id="birth_location" class="extra" value="<?php echo e($this->pornstar['birth_location']); ?>" />
                        </div>
                        <div class="required">
                            <label for="birth_name">Birth Name</label>
                            <input name="birth_name" type="text" id="birth_name" class="mega" value="<?php echo e($this->pornstar['birth_name']); ?>" />
                        </div>
                        <div class="required">
                            <label for="eye_color">Eye Color</label>
                            <input name="eye_color" type="text" id="eye_color" class="large" value="<?php echo e($this->pornstar['eye_color']); ?>" />
                        </div>
                        <div class="required">
                            <label for="hair_color">Hair Color</label>
                            <input name="hair_color" type="text" id="hair_color" class="large" value="<?php echo e($this->pornstar['hair_color']); ?>" />
                        </div>
                        <div class="required">
                            <label for="weight">Weight</label>
                            <input name="weight" type="text" id="weight" class="medium" value="<?php echo e($this->pornstar['weight']); ?>" />
                        </div>
                        <div class="required">
                            <label for="height">Height</label>
                            <input name="height" type="text" id="height" class="medium" value="<?php echo e($this->pornstar['height']); ?>" />
                        </div>
                        <div class="required">
                            <label for="measurements">Measurements</label>
                            <input name="measurements" type="text" id="measurements" class="extra" value="<?php echo e($this->pornstar['measurements']); ?>" />
                        </div>
                        <div class="required">
                              <label for="natural_bust">Natural Bust</label>
                              <select name="natural_bust" id="natural_bust">
                                  <option value="">---</option>
                                  <option value="yes"<?php if ($this->pornstar['natural_bust'] == 'yes'): echo ' selected="selected"'; endif; ?>>Yes</option>
                                  <option value="no"<?php if ($this->pornstar['natural_bust'] == 'no'): echo ' selected="selected"'; endif; ?>>No</option>
                              </select>
                        </div>
                        <div class="required">
                            <label for="ethnicity">Ethnicity</label>
                            <input name="ethnicity" type="text" id="ethnicity" class="mega" value="<?php echo e($this->pornstar['ethnicity']); ?>" />
                        </div>
                    </fieldset>
                    </div>
                    <div class="tab2" style="display: none;">
                        <fieldset>
                            <legend>Pornstars Links</legend>
                            <div class="required">
                                <label for="links">Links</label>
                                <textarea name="links" id="links" class="extra" rows="20"><?php echo $this->pornstar['links']; ?></textarea>
                            </div>
                        </fieldset>
                    </div>
                    <div class="tab3" style="display: none;">
                          <div id="response_container" class="toolTip tpGreen" style="display: none;">
                              <p class="clearfix"><span id="response_message"></span></p>
                              <a class="close" title="Close"></a>
                          </div>
                        <fieldset>
                            <legend>Pornstar Photo</legend>
                              <div class="required">
                                  <label for="file">File</label>
                                  <input name="file" type="file" id="file" />
                              </div>
                              <div id="upload_photo_container" style="display: none;"></div>
                        </fieldset>
                    </div>
                    <div class="submit">
                        <input name="submit_pornstar_add" type="submit" id="submit_pornstar_add" class="button butDef" value=" Add Pornstar " />
                    </div>
                </form>
                </div>
            </div>
        </div>
    </div>
    </div>
Онлайн: 0
Реклама