Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/spam.tpl.php
Строк: 180
<?php defined('_VALID') or die('Restricted Access!'); ?>
    <script type="text/javascript" src="<?php echo TPL_REL?>/js/jquery.jeditable.js"></script>
    <script type="text/javascript">
    var lang_question_spam      = "Are you sure you want to remove spam for this comment?";
    var lang_question_delete = "Are you sure you want to delete this comment?";
    $(document).ready(function() {
        $('.editable').editable(
              '<?php echo BASE_URL?>/ajax.php?s=comment_edit&d=backend', {
            loadurl   : '<?php echo BASE_URL?>/ajax.php?s=comment_load&d=backend',
            type      : 'textarea',
            cancel    : 'Cancel',
            submit    : 'Save',
            indicator : '<img src="<?php echo TPL_REL;?>/images/indicator.gif">',
            tooltip   : 'Click to edit...',
            style     : 'width: 100%; height: auto; overflow: none;'
        });
        
        $("a[id^='edit_comment_']").click(function(e) {
            e.preventDefault();
            var click_id    = $(this).attr('id');
            var split_arr   = click_id.split('_');
            $("#" + split_arr[2] + "_" + split_arr[3]).trigger('click');
        });

        $("a[id^='manage_comment_']").click(function(e) {
            e.preventDefault();
            var click_id    = $(this).attr('id');
            var click_arr   = click_id.split('_');
            var action      = click_arr[2];
            var spam_id      = click_arr[3];
            var comment_id    = click_arr[4]
            var type        = click_arr[5];
            if (action == 'spam') {
                var answer = confirm(lang_question_spam);
            } else if (action == 'delete') {
                var answer  = confirm(lang_question_delete);
            }

            if (answer) {
                $("input[name='action']").val(action);
                $("input[name='spam_id']").val(spam_id);
                $("input[name= 'comment_id']").val(comment_id);
                $("input[name='type']").val(type);
                $("#manage_spam_form").submit();
            }
        });
    }); 
    </script>
    <?php echo $this->fetch('errors'); ?>
    <?php echo $this->fetch('messages'); ?>
    <?php echo $this->fetch('warnings'); ?>
    <div id="container" class="clearfix">
        <div id="page">
            <div class="content clearfix">
                <?php if ($this->comments): ?>
               <form id="manage_spam_form" method="post" action="<?php echo CURRENT_URL?>">
                    <input name="action" type="hidden" value="" />
                    <input name="spam_id" type="hidden" value="" />
                    <input name="comment_id" type="hidden" value="" />
                    <input name="type" 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="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>Comment</h3></th>
                            <th><h3>Type</h3></th>
                            <th><h3>Reporter</h3></th>
                            <th><h3>Spam Date</h3></th>
                            <th><h3>Actions</h3></th>
                        </tr>
                    </thead>
                    <tbody>
                          <?php foreach ($this->comments as $spam): ?>
                          <tr id="row_<?php echo $spam['spam_id']; ?>">
                              <td><input name="checkbox_spam_<?php echo $spam['spam_id']; ?>" type="checkbox" id="checkbox_item_<?php echo $spam['spam_id']; ?>" /></td>
                              <td width="50%" style="padding: 2px 0;"><div id="<?php echo $spam['type'],'_',$spam['comment_id']; ?>" class="editable"><?php echo nl2br($spam['comment']); ?></div></td>
                              <td><strong><?php echo $spam['type']; ?></strong></td>
                              <td><a href="<?php echo ADMIN_URL?>/index.php?q=user/view&amp;id=<?php echo $spam['user_id']; ?>"><strong><?php echo e($spam['username']); ?></strong></a></td>
                              <td><?php echo $spam['spam_date']; ?></td>
                              <td>
                                <a href="#edit_comment" id="edit_comment_<?php echo $spam['type'],'_'$spam['comment_id']; ?>"><img src="<?php echo TPL_REL?>/images/comment_edit.png" alt="Edit" /></a>&nbsp;
                                  <a href="#delete_comment" id="manage_comment_delete_<?php echo $spam['spam_id'],'_',$spam['comment_id'],'_',$spam['type']; ?>" title="" /><img src="<?php echo TPL_REL?>/images/comment_delete.png" alt="Delete" /></a>
                                  <a href="#delete_spam" id="manage_comment_spam_<?php echo $spam['spam_id'],'_'.$spam['comment_id'],'_'.$spam['type']; ?>" title="" /><img src="<?php echo TPL_REL?>/images/delete.png" alt="Delete" /></a>
                              </td>
                          </tr>
                    <?php endforeach; ?>
                    </tbody>
                </table>
                <div class="box_menu">
                    <div class="box_menu_left">
                        <select name="action" id="actions_bottom">
                        <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>                
                </form>
                <?php else: ?>
                <div class="none">No comments marked as spam yet!</div>
                <?php endif; ?>
            </div>
               <div class="legend">
                    <img src="<?php echo TPL_REL?>/images/comment_edit.png" alt="film_edit" /> Edit Comment &nbsp;
                    <img src="<?php echo TPL_REL?>/images/comment_delete.png" alt="film_delete" /> Delete Comment &nbsp;
                    <img src="<?php echo TPL_REL?>/images/delete.png" alt="delete" /> Delete Spam &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
Реклама