123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- <div class="wrap">
- <div id="icon-options-general" class="icon32"></div>
- <h2><?php echo ($this->plugintitle) ?> Plugin Configuration</h2>
- <?php if (isset($_GET['msg']) && !empty($_GET['msg'])): ?>
- <div id="<?php echo ($this->pluginname) ?>-settings_updated" class="updated settings-error">
- <p><strong><?php echo $_GET['msg']; ?></strong></p>
- </div>
- <?php endif;?>
- <hr>
- <div style="float: right;"><a href="<?php echo ($this->readme_url); ?>">Readme</a></div>
- <pre>
- Version: <?php echo ($this->version); ?> <?php echo ($this->publish_date); ?>
- <?php dags_extras();?></pre>
- <hr>
- <?php if (isset($_GET['focus'])) {
- ?>
- <?php
- if (isset($this->dagsopt['plug_' . $_GET['focus']])) {
- ?>
- <?php
- $plug = $this->dagsopt['plug_' . $_GET['focus']];
- if (method_exists($plug, 'fullscreen')) {
- echo ($plug->fullscreen());
- }
- ?>
- <?php }?>
- <?php } else {
- ?>
- <form method="post" action="" enctype="multipart/form-data">
- <table class="form-table">
- </table>
- <table class="form-table">
- <?php
- foreach ($this->dagsopt as $plugname => $plug) {
- $short = str_replace("plug_", "", $plugname);
- $vis = get_option($this->pluginname . '_' . $short, true);
- if (isset($plug->hasform) && !($plug->hasform && !$vis)) {
- ?>
- <tr valign="top">
- <td width="120"><label for="<?php echo ($this->pluginname) ?>_<?php echo ($short); ?>"><?php echo (!empty($plug->title) ? $plug->title : $short); ?></label> <?php echo ($short); ?></td>
- <td width="30">
- <input name="<?php echo ($this->pluginname) ?>_<?php echo ($short); ?>" type="checkbox" id="<?php echo ($this->pluginname) ?>_<?php echo ($short); ?>" <?php if ($vis) {
- echo 'checked';
- }
- ?> />
- </td>
- <td>
- </td>
- <td width="120"><code><?php if (method_exists($plug, "help")) {echo ($plug->help());} else {}?></code>
- </td>
- </tr>
- <?php
- } else {
- ?>
- <tr valign="top">
- <td width="120"><label for="<?php echo ($this->pluginname) ?>_<?php echo ($short); ?>"><?php echo (!empty($plug->title) ? $plug->title : $short); ?></label> ::<?php echo ($short); ?></td>
- <td width="30">
- <input name="<?php echo ($this->pluginname) ?>_<?php echo ($short); ?>" type="checkbox" id="<?php echo ($this->pluginname) ?>_<?php echo ($short); ?>" <?php if ($vis) {
- echo 'checked';
- }
- ?> />
- </td>
- <td>
- <?php if ($vis) {echo ($plug->admin_line($this->pluginname . '_' . $short));} else {}?>
- </td>
- <td width="120"><code><?php if (method_exists($plug, "help")) {echo ($plug->help());} else {}?></code>
- </td>
- </tr>
- <?php }}?>
- <tr valign="top">
- <td><label for="<?php echo ($this->pluginname) ?>_cron_enabled"><?php _e('Cron Enabled', 'dagsopt')?></label></td>
- <td >
- <input name="<?php echo ($this->pluginname) ?>_cron_enabled" type="checkbox" id="<?php echo ($this->pluginname) ?>_cron_enabled" <?php if (get_option($this->pluginname . '_cron_enabled', true)) {
- echo 'checked';
- }
- ?> />
- </td><td>
- <div style="<?php if (get_option($this->pluginname . '_cron_enabled', true)) {
- echo 'background-color:#afffaf;';
- }
- ?> ">
- <table style="<?php if (get_option($this->pluginname . '_cron_enabled') == false) {
- echo 'display: none;';
- }
- ?>" >
- <tr valign="top">
- <th scope="row"><label for="<?php echo ($this->pluginname) ?>_last_build"><?php _e('Last Build', 'dagsopt')?></label></th>
- <td >
- <?php $dd = date("j. M @ H:i", (get_option($this->pluginname . '_last_build', 0) + (60 * 60 * 2)));
- echo ($dd);?>
- </td>
- </tr>
- <tr valign="top">
- <th scope="row"><label for="<?php echo ($this->pluginname) ?>_next_build"><?php _e('Next Build', 'dagsopt')?></label></th>
- <td >
- <?php $dd = date("j. M @ H:i", (($this->next_scheduled) + (60 * 60 * 2)));
- echo ($dd);?>
- </td>
- </tr>
- <tr valign="top">
- <td scope="row"><label for="<?php echo ($this->pluginname) ?>_cron_interval"><?php _e('Cron Execution Interval', 'dagsopt')?></label></t>
- <td>
- <select name="<?php echo ($this->pluginname) ?>_cron_interval" id="<?php echo ($this->pluginname) ?>_cron_interval">
- <?php
- $selectValue = get_option($this->pluginname . '_cron_interval', 300);
- for ($counter = 300; $counter <= 7200; $counter = $counter + 300) {
- $cc = $counter / 60;
- if ($selectValue == $counter) {
- print "\n\t<option selected='selected' value='{$counter}'>{$cc} min</option>";
- } else {
- print "\n\t<option value='{$counter}'>{$cc} min</option>";
- }
- }
- ?>
- </select>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- </table>
- <p class="submit">
- <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes', 'dagsopt')?>" />
- </p>
- </form>
- <table class="form-table">
- <?php
- foreach ($this->dagsopt as $plugname => $plug) {
- $short = str_replace("plug_", "", $plugname);
- $vis = get_option($this->pluginname . '_' . $short, true);
- if (isset($plug->hasform) && $vis) {
- ?>
- <tr valign="top">
- <td width="120"><label for="<?php echo ($this->pluginname) ?>_<?php echo ($short); ?>"><?php echo ($plug->title); ?></label></td>
- <td width="300">
- </td>
- <td>
- <?php if ($vis) {echo ($plug->admin_line($this->pluginname . '_' . $short));} else {}?>
- </td>
- </tr>
- <?php }}?>
- </table>
- </div>
- <?php }?>
- <?php if (isset($_REQUEST['debug'])) {
- ?>
- <div>
- <h3>Debug</h3>
- <textarea style="width: 100%; height: 300px;">
- <?php $ttt = get_defined_vars();
- print_r($ttt);?>
- </textarea>
- <textarea style="width: 100%; height: 300px;">
- <?php $ttt = get_defined_vars();
- print_r($ttt);?>
- </textarea>
- <textarea style="width: 100%; height: 300px;">
- <?php $tt = getenv();
- print_r($tt);?>
- </textarea>
- <textarea style="width: 100%; height: 300px;">
- <?php print_r($_ENV);?>
- </textarea>
- <textarea style="width: 100%; height: 300px;">
- <?php print_r($_SERVER);?>
- </textarea>
- <textarea style="width: 100%; height: 300px;">
- </textarea>
- </div>
- <?php }?>
|