Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/pornstar_manage.tpl.php
Строк: 385
<?php defined('_VALID') or die('Restricted Access!'); ?>
    <?php echo $this->fetch('errors'); ?>
    <?php echo $this->fetch('messages'); ?>
    <?php echo $this->fetch('warnings'); ?>
    <link href="<?php echo TPL_REL?>/css/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
    <script src="<?php echo TPL_REL?>/js/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript">
    var lang_question_suspend = "Are you sure you want to suspend this pornstar?";
    var lang_question_activate = "Are you sure you want to activate this pornstar?";
    var lang_question_delete = "Are you sure you want to delete this pornstar?";
    var lang_question_unassign = "Are you sure you want to remove the assigned banner from this pornstar?";
    $(document).ready(function() {
        $("a[id^='manage_model_']").click(function(e) {
            e.preventDefault();
            var click_id    = $(this).attr('id');
            var click_arr   = click_id.split('_');
            var action      = click_arr[2];
            var model_id    = click_arr[3];
            if (action == 'suspend') {
                var answer = confirm(lang_question_suspend);
            } else if (action == 'activate') {
                var answer = confirm(lang_question_activate);
            } else if (action == 'delete') {
                var answer  = confirm(lang_question_delete);
            } else if (action == 'unassign') {
                  var answer    = confirm(lang_question_unassign);
            }

            if (answer) {
                $("input[name='action']").val(action);
                $("input[name='model_id']").val(model_id);
                $("#manage_pornstar_form").submit();
            }
        });
        
        $("a[id^='remove_']").click(function(e) {
            e.preventDefault();
            var click_id    = $(this).attr('id');
            var click_arr   = click_id.split('_');
            var model_id    = click_arr[1];
            $("input[name='id']").val(model_id);
            $("#remove_ad_form").submit();
        });
        
        $("a[id^='adv_add_']").click(function(e) {
            e.preventDefault();
            
            $("input[name='id']").val($(this).attr('id').match(/adv_add_(.*)/)[1]);
            $("a[id^='assign_adv_']").css("background-image", "url('<?php echo TPL_URL?>/images/coins.png')");
            
              $("#dialog").dialog({
                  width: 600,
                  height: 350
              });
        });
        
        $("a[id^='assign_adv_']").live('click', function(e) {
            e.preventDefault();
            
            var model_id = $("input[name='id']").val();
            var adv_id     = $(this).attr('id').match(/assign_adv_(.*)/)[1];
            
            $(this).css("background-image", "url('<?php echo TPL_URL?>/images/ajax-loader.gif')");

            $.ajax({
                  url: base_url + '/ajax.php?s=assign_pornstar_adv&d=backend',
                cache: false,
                type: "POST",
                dataType: "json",
                data: { model_id: model_id, adv_id: adv_id },
                success: function(response) {
                      if (response.status == '1') {
                          $("a[id='assign_adv_" + adv_id + "']").css("background-image", "url('<?php echo TPL_URL?>/images/coins_add.png')");
                          $("span[id='adv_" + model_id + "']").html('<a href="#unassign_adv" id="manage_model_adv_' + model_id + '" title="Unassign advertising from this pornstar!"><img src="<?php echo TPL_URL?>/images/coins_delete.png" alt="" /></a>');
                      } else {
                          $("a[id='assign_adv_" + adv_id + "']").css("background-image", "url('<?php echo TPL_URL?>/images/coins.png')");
                      }

                      $("#dialog").dialog({ buttons: { "Done": function() { $(this).dialog("close"); }}});
                }
            });
        });
    }); 
    </script>
    <div id="container" class="clearfix">
        <div id="page">
            <?php echo $this->fetch('pornstar_menu'); ?>
            <div class="content clearfix">
                <?php echo $this->fetch('pornstar_manage_menu'); ?>
                <?php echo $this->fetch('pornstar_search'); ?>
                <?php if ($this->models): ?>
               <form id="manage_pornstar_form" method="post" action="<?php echo CURRENT_URL?>">
                    <input name="action" type="hidden" value="" />
                    <input name="model_id" type="hidden" value="" />
                </form>
                <form name="actionsForm" id="actionsForm" method="post" action="<?php echo CURRENT_URL?>">
                <div class="box_menu">
                    <div class="box_menu_left">
                        <select name="action" id="actions_top">
                        <option value="suspend">Suspend</option>
                        <option value="activate">Activate</option>
                        <option value="delete">Delete</option>
                        <option value="unassign">Remove Advertising</option>
                        </select>
                        <input name="submit_actions" type="submit" class="button butDef" value="Go!" />
                    </div>
                    <div class="box_menu_right">
                        <div class="barNav clearfix">Found <strong><?php echo $this->pagination['total_items']; ?></strong> pornstars, displaying page <strong><?php echo $this->pagination['page']; ?></strong> of <strong><?php echo $this->pagination['total_pages']; ?></strong> <strong>&middot;</strong> <?php echo p('pagination'$this->paginationCURRENT_URL); ?></div>
                    </div>
                    <div class="clear"></div>
                </div>
                <div id="dialog" title="Assign Video Advertising Banner" style="display: none;">
                <input name="id" type="hidden" value="" />
                  <?php if ($this->advs): ?>
                  <ul>
                  <?php foreach ($this->advs as $adv): ?>
                      <li><a href="#" id="assign_adv_<?php echo $adv['adv_id']; ?>"><?php echo e($adv['adv_name']); ?></a></li>
                  <?php endforeach; ?>
                  </ul>
                  <?php else: ?>
                  <div class="none">No advertising banners found for the Pornstar advertising group! Click <a href="<?php echo ADMIN_URL?>/index.php?q=adv/add">here</a> to add banners!</div>
                  <?php endif; ?>
                </div>
                <table cellpadding="0" cellspacing="0" border="0" id="table" class="uiTable">
                    <thead>
                        <tr>
                            <th class="nosort" style="width: 12px; text-align: center;"><input name="checkbox_all" type="checkbox" id="check_all" /></th>
                            <th><h3>Name</h3></th>
                            <th><h3>Videos</h3></th>
                            <?php if (VModule::enabled('photo')): ?>
                            <th><h3>Albums</h3></th>
                            <?php endif; ?>
                            <th><h3>Properties</h3></th>
                            <th><h3>Add Date</h3></th>
                            <th><h3>Status</h3></th>
                            <th><h3>Actions</h3></th>
                        </tr>
                    </thead>
                    <tbody>
                          <?php $count count($this->models);
                          foreach (
$this->models as $model):
                          if (
$model['status'] == '1'):
                              
$status_image 'accept.png';
                              
$status 'suspend';
                              
$alt 'Active';
                          else:
                              
$status_image 'cancel.png';
                              
$status 'activate';
                              
$alt 'Suspended';
                          endif;
                          
?>
                          <tr id="row_<?php echo $model['model_id']; ?>">
                              <td><input name="checkbox_model_<?php echo $model['model_id']; ?>" type="checkbox" id="checkbox_item_<?php echo $model['model_id']; ?>" /></td>
                              <td width="30%">
                                  <a href="<?php echo ADMIN_URL?>/index.php?q=pornstar/view&amp;id=<?php echo $model['model_id']; ?>">
                                      <strong><?php echo e($model['name']); ?></strong><br /><br />
                                      <img src="<?php echo MEDIA_URL?>/pornstars/<?php echo $model['model_id'],'.'.$model['ext']; ?>" alt="<?php echo e($model['name']); ?>" />
                                  </a>
                              </td>
                              <td>
                                  <a href="<?php echo ADMIN_URL?>/index.php?q=pornstar/videos&amp;id=<?php echo $model['model_id']; ?>"><strong><?php echo $model['total_videos']; ?></strong></a>
                              </td>
                              <?php if (VModule::enabled('photo')): ?>
                              <td>
                                  <a href="<?php echo ADMIN_URL?>/index.php?q=pornstar/photos&amp;id=<?php echo $model['model_id']; ?>"><strong><?php echo $model['total_albums']; ?></strong></a>
                              </td>
                              <?php endif; ?>
                              <td>
                                  Views: <strong><?php echo $model['total_views']; ?></strong><br />
                                  Comments: <strong><?php echo $model['total_comments']; ?></strong><br />
                                  Rating: <strong><?php echo $model['rating']; ?></strong><br />
                                  Votes: <strong><?php echo $model['rated_by']; ?></strong><br />
                                  Favorites: <strong><?php echo $model['total_favorites']; ?></strong>
                              </td>
                              <td><?php echo $model['add_date']; ?></td>
                              <td>
                                <a href="#status" id="manage_model_<?php echo $status?>_<?php echo $model['model_id']; ?>" title="Click to <?php echo $status?> this pornstar!"><img src="<?php echo TPL_REL?>/images/<?php echo $status_image?>" alt="<?php echo $alt?>" /></a>
                              </td>
                              <td>
                                  <a href="<?php echo ADMIN_URL?>/index.php?q=pornstar/view&amp;id=<?php echo $model['model_id']; ?>" title="View Pornstar"><img src="<?php echo TPL_REL?>/images/user.png" alt="View" /></a>&nbsp;
                                <a href="<?php echo ADMIN_URL?>/index.php?q=pornstar/edit&amp;id=<?php echo $model['model_id']; ?>" title="Edit Pornstar"><img src="<?php echo TPL_REL?>/images/user_edit.png" alt="Edit" /></a>&nbsp;
                                  <a href="#delete_video" id="manage_model_delete_<?php echo $model['model_id']; ?>" title="Delete Pornstar" /><img src="<?php echo TPL_REL?>/images/user_delete.png" alt="Delete" /></a>&nbsp;
                                <span id="adv_<?php echo $model['model_id']; ?>">
                                <?php if ($model['adv'] == '0'): ?>
                                <a href="#assign_adv" id="adv_add_<?php echo $model['model_id']; ?>" title="Assign a advertising banner to this pornstar!"><img src="<?php echo TPL_REL?>/images/coins_add.png" alt="" /></a>
                                <?php else: ?>
                                <a href="#unassign_adv" id="manage_model_unassign_<?php echo $model['model_id']; ?>" title="Unassign video advertising from this pornstar!"><img src="<?php echo TPL_REL?>/images/coins_delete.png" alt="" /></a>
                                <?php endif; ?>
                                </span>
                              </td>
                          </tr>
                    <?php endforeach; ?>
                    </tbody>
                </table>
                <div class="box_menu">
                    <div class="box_menu_left">
                        <select name="action" id="actions_bottom">
                        <option value="suspend">Suspend</option>
                        <option value="activate">Activate</option>
                        <option value="delete">Delete</option>
                        <option value="unassign">Remove Advertising</option>
                        </select>
                        <input name="submit_actions" type="submit" class="button butDef" value="Go!" />
                    </div>
                    <div class="box_menu_right">
                        <div class="barNav clearfix">Found <strong><?php echo $this->pagination['total_items']; ?></strong> pornatars, displaying <strong><?php echo $this->pagination['page']; ?></strong> of <strong><?php echo $this->pagination['total_pages']; ?></strong> <strong>&middot;</strong> <?php echo p('pagination'$this->paginationCURRENT_URL); ?></div>
                    </div>
                    <div class="clear"></div>
                </div>                
                
                <?php else: ?>
                <div class="none">No pornstars found!</div>
                <?php endif; ?>
            </div>
               <div class="legend">
                    <img src="<?php echo TPL_REL?>/images/user.png" alt="film_view" /> View Pornstar &nbsp;
                    <img src="<?php echo TPL_REL?>/images/user_edit.png" alt="film_edit" /> Edit Pornstar &nbsp;
                    <img src="<?php echo TPL_REL?>/images/user_delete.png" alt="film_delete" /> Delete Pornstar &nbsp;
                    <img src="<?php echo TPL_REL?>/images/coins_add.png" alt="coins_add" /> Assign Advertising &nbsp;
                    <img src="<?php echo TPL_REL?>/images/coins_delete.png" alt="coins_delete" /> Remove Advertising &nbsp;                    
                    <img src="<?php echo TPL_REL?>/images/accept.png" alt="accept" /> Active - Action Suspend &nbsp;
                    <img src="<?php echo TPL_REL?>/images/cancel.png" alt="cancel" /> Suspended - Action Activate               
              </div>
        </div>
    </div>
Онлайн: 0
Реклама