Вход Регистрация
Файл: adultscript-2.0.3-pro/files/admin/templates/default/tools_cron.tpl.php
Строк: 145
<?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 cron script?";
    var lang_question_activate = "Are you sure you want to activate this cron script?";
    $(document).ready(function() {
        $("a[id^='manage_cron_']").click(function(e) {
            e.preventDefault();
            var click_id    = $(this).attr('id');
            var click_arr   = click_id.split('_');
            var action      = click_arr[2];
            var user_id     = click_arr[3];
            if (action == 'suspend') {
                var answer = confirm(lang_question_suspend);
            } else if (action == 'activate') {
                var answer = confirm(lang_question_activate);
            }

            if (answer) {
                $("input[name='action']").val(action);
                $("input[name='cron_id']").val(user_id);
                $("#manage_cron_form").submit();
            }
        });
    });
    </script>
    <div id="container" class="clearfix">
        <form id="manage_cron_form" method="post" action="<?php echo CURRENT_URL?>">
            <input name="action" type="hidden" value="" />
            <input name="cron_id" type="hidden" value="" />
        </form>
        <div id="page">
            <?php echo $this->fetch('tools_cron_menu'); ?>
            <div class="content clearfix">
                <strong>Automatically generated crontabs entries. Copy one of the following into your crontab:</strong><br />
                  <?php foreach ($this->crontabs as $crontab): ?>
                  <code><?php echo e($crontab); ?></code><br />
                  <?php endforeach; ?>
              </div>
              <div class="content" style="margin-top: 5px;">
                  <?php if ($this->scripts): ?>
                <table cellpadding="0" cellspacing="0" border="0" id="table" class="uiTable">
                    <thead>
                        <tr>
                            <th><h3>Name</h3></th>
                            <th><h3>Function</h3></th>
                            <th><h3>Period</h3></th>
                            <th><h3>Last Executeds</h3></th>
                            <th><h3>Status</h3></th>
                            <th><h3>Actions</h3></th>
                        </tr>
                    </thead>
                    <tbody>
                          <?php foreach ($this->scripts as $script):
                        if (
$script['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 $script['cron_id']; ?>">
                              <td><strong><?php echo e($script['name']); ?></strong></td>
                              <td><strong><?php echo e($script['slug']); ?></strong></td>
                              <td><?php if ($script['period'] < 1440): echo VDate::seconds_to_time($script['period']*60); else: echo VDate::seconds_to_time($script['period']*60TRUE'j'),' day(s)'; endif; ?></td>
                              <td><?php if ($script['exec_time'] == '0'): echo 'never'; else: echo VDate::format($script['exec_time'], 'd M, Y h:i:s'); endif; ?></td>
                              <td>
                                  <a href="#status" id="manage_cron_<?php echo $status?>_<?php echo $script['cron_id']; ?>" title="Click to <?php echo $status?> this cron script!"><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=tools/cron/edit&amp;id=<?php echo $script['cron_id']; ?>" title="Edit Cron Script"><img src="<?php echo TPL_REL?>/images/application_edit.png" alt="Edit" /></a>&nbsp;
                                <a href="<?php echo ADMIN_URL?>/index.php?q=tools/cron/run&amp;id=<?php echo $script['cron_id']; ?>" title="Run Cron Script"><img src="<?php echo TPL_REL?>/images/arrow_rotate_clockwise.png" alt="Edit" /></a>&nbsp;
                              </td>
                          </tr>
                    <?php endforeach; ?>
                    </tbody>
                </table>
                <?php else: ?>
                <div class="none">No cron scripts found!</div>
                <?php endif; ?>
            </div>
               <div class="legend">
                    <img src="<?php echo TPL_REL?>/images/application_edit.png" alt="application_edit" /> Edit Cron Script &nbsp;
                    <img src="<?php echo TPL_REL?>/images/arrow_rotate_clockwise.png" alt="application_edit" /> Run Cron Script &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>
Онлайн: 1
Реклама