Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/photo_flagged.tpl.php
Строк: 170
<?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">
    var lang_question_suspend = "Are you sure you want to suspend this photo?";
    var lang_question_activate = "Are you sure you want to activate this photo?";
    var lang_question_delete = "Are you sure you want to delete this photo?";
    $(document).ready(function() {
        $("a[id^='manage_photo_']").click(function(e) {
            e.preventDefault();
            var click_id    = $(this).attr('id');
            var click_arr   = click_id.split('_');
            var action      = click_arr[2];
            var photo_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='photo_id']").val(photo_id);
                $("#manage_photo_form").submit();
            }
        });
    });
    </script>
    <div id="container" class="clearfix">
        <div id="page">
            <?php echo $this->fetch('photo_menu'); ?>
            <div class="content clearfix">
                <?php if ($this->photos): ?>
                <form id="manage_photo_form" method="post" action="<?php echo CURRENT_URL?>">
                    <input name="action" type="hidden" value="" />
                    <input name="photo_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>
                        </select>
                        <input name="submit_actions" type="submit" class="button butDef" value="Go!" />
                    </div>
                    <div class="box_menu_right">
                        <div class="barNav clearfix"><?php echo p('pagination'$this->paginationCURRENT_URL); ?></div>
                    </div>
                    <div class="clear"></div>
                </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>Id</h3></th>
                            <th><h3>Photo</h3></th>
                            <th><h3>Album</h3></th>
                            <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->photos);
                        foreach (
$this->photos as $photo):
                        if (
$photo['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 $photo['photo_id']; ?>">
                            <td><input name="checked[<?php echo $photo['photo_id']; ?>]" type="checkbox" id="checkbox_item_<?php echo $photo['photo_id']; ?>" /></td>
                            <td><strong><?php echo $photo['photo_id']; ?></strong></td>
                            <td><img src="<?php echo RELATIVE_URL,'/media/photos/thumbs/',$photo['photo_id'],'.jpg'?>" alt="<?php echo e($photo['caption']); ?>" id="photo-view-<?php echo $photo['photo_id'],'-',$photo['ext']; ?>" /></td>
                            <td><a href="<?php echo ADMIN_URL?>/index.php?q=photo/view&id=<?php echo $photo['album_id']; ?>"><?php echo e($photo['title']); ?></a></td>
                            <td>
                                View: <strong><?php echo $photo['total_views']; ?></strong><br />
                                Comments: <strong><?php echo $photo['total_comments']; ?></strong><br />
                                Favorites: <strong><?php echo $photo['total_favorites']; ?></strong><br /><br />
                                Rating: <strong><?php echo $photo['rating']; ?></strong><br />
                                Rated By: <strong><?php echo $photo['rated_by']; ?></strong>
                            </td>
                            <td><?php echo $photo['add_date']; ?></td>
                            <td><a href="#status" id="manage_photo_<?php echo $status,'_',$photo['photo_id']; ?>" title="Click to <?php echo $status?> this photo album!"><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=photo/photo&amp;id=<?php echo $photo['photo_id']; ?>" title="View Photo"><img src="<?php echo TPL_REL?>/images/image.png" alt="View" /></a>&nbsp;
                                <a href="<?php echo ADMIN_URL?>/index.php?q=photo/photo_edit&amp;id=<?php echo $photo['photo_id']; ?>" title="Edit Photo"><img src="<?php echo TPL_REL?>/images/image_edit.png" alt="Edit" /></a>&nbsp;
                                <a href="#delete_photo" id="manage_photo_delete_<?php echo $photo['photo_id']; ?>" title="Delete Photo" /><img src="<?php echo TPL_REL?>/images/image_delete.png" alt="Delete" /></a>&nbsp;
                            </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>
                        </select>
                        <input name="submit_actions" type="submit" class="button butDef" value="Go!" />
                    </div>
                    <div class="box_menu_right">
                        <div class="barNav clearfix"><?php echo p('pagination'$this->paginationCURRENT_URL); ?></div>
                    </div>
                    <div class="clear"></div>
                </div>                          
                <?php else: ?>
                <div class="none">No flagged photos found!</div>
                <?php endif; ?>
            </div>
        </div>
    </div>
Онлайн: 1
Реклама