예제 #1
0
    include IP_ROOT_PATH . ATTACH_MOD_PATH . 'includes/functions_includes.' . PHP_EXT;
}
if (defined('IN_DOWNLOAD') || defined('IN_ADMIN') || defined('ATTACH_PM') || defined('ATTACH_POSTING')) {
    include IP_ROOT_PATH . ATTACH_MOD_PATH . 'includes/functions_posting.' . PHP_EXT;
    include IP_ROOT_PATH . ATTACH_MOD_PATH . 'includes/functions_delete.' . PHP_EXT;
    include IP_ROOT_PATH . ATTACH_MOD_PATH . 'includes/functions_thumbs.' . PHP_EXT;
}
if (defined('IN_ADMIN')) {
    include IP_ROOT_PATH . ATTACH_MOD_PATH . 'includes/functions_admin.' . PHP_EXT;
    include IP_ROOT_PATH . ATTACH_MOD_PATH . 'includes/functions_selects.' . PHP_EXT;
}
if (defined('ATTACH_PROFILE')) {
    include IP_ROOT_PATH . ATTACH_MOD_PATH . 'includes/functions_profile.' . PHP_EXT;
}
// Please do not change the include-order, it is valuable for proper execution.
// Functions for displaying Attachment Things
if (defined('IN_DOWNLOAD') || defined('ATTACH_DISPLAY') || defined('ATTACH_PM') || defined('ATTACH_POSTING')) {
    include IP_ROOT_PATH . ATTACH_MOD_PATH . 'displaying.' . PHP_EXT;
}
// Posting Attachments Class (HAS TO BE BEFORE PM)
if (defined('ATTACH_PM') || defined('ATTACH_POSTING')) {
    include IP_ROOT_PATH . ATTACH_MOD_PATH . 'posting_attachments.' . PHP_EXT;
}
if (defined('ATTACH_PM')) {
    // PM Attachments Class
    include IP_ROOT_PATH . ATTACH_MOD_PATH . 'pm_attachments.' . PHP_EXT;
}
/*
*/
$upload_dir = get_upload_dir(false);
예제 #2
0
function arclite_theme_settings()
{
    if (current_user_can('edit_themes')) {
        ?>

  <style type="text/css">
   #theme-settings input.radio{border:0;}
   #theme-settings label{width: 100px;display:block;float:left;}
   #theme-settings table{margin:2em 0;}
   #theme-settings th p{line-height:150%;font-weight:normal;padding:0;margin:0;}
   #theme-settings th p span{color:#999;font-weight:normal;font-style:italic;display:block}
   .support{background:#eee;padding:.6em 1em;float:right;font-style:italic;}
   #colorpicker{position:relative;}
  .farbtastic{background: #FFF; border: 1px solid #8CBDD5; position: relative; }
  .farbtastic *{cursor:crosshair;position:absolute;}
  .farbtastic,.farbtastic .wheel{height:195px;width:195px;}
  .farbtastic .color,.farbtastic .overlay{height:101px;left:47px;top:47px;width:101px; }
  .farbtastic .wheel{background: url(<?php 
        echo get_bloginfo('template_url');
        ?>
/images/admin/wheel.png) no-repeat; height: 195px; width: 195px;}
  .farbtastic .overlay{background: url(<?php 
        echo get_bloginfo('template_url');
        ?>
/images/admin/mask.png) no-repeat; }
   .farbtastic .marker{background: url(<?php 
        echo get_bloginfo('template_url');
        ?>
/images/admin/marker.png) no-repeat; height: 17px; margin: -8px 0 0 -8px; overflow: hidden; width: 17px;}

  </style>

  <script type="text/javascript" src="<?php 
        echo get_bloginfo('template_url') . '/js/admin/jquery.farbtastic.min.js';
        ?>
"></script>
  <script type="text/javascript">
  /* <![CDATA[ */

  jQuery.fn.appendVal = function(txt) {
    return this.each(function(){
      this.value += txt;
   });
  };

  // init
  jQuery(document).ready(function () {

    // enable/disable fields based on active theme settings

    jQuery('input#opt-imageless').change(function() {
     jQuery('select#opt-header,select#opt-widget_background,select#opt-content_background').attr("disabled", false);
     if(jQuery('select#opt-header').find('option:selected').attr('value')=='user-image') jQuery('#header-upload').show();
     if(jQuery('select#opt-header').find('option:selected').attr('value')=='user-color') jQuery('#header-color').show();
     if (jQuery(this).is(":checked")) {
       jQuery('select#opt-header,select#opt-widget_background,select#opt-content_background').attr("disabled", true);
       jQuery('#header-upload,#header-color').hide();
     }
    });
    jQuery("input#opt-imageless").change();


    jQuery('input#opt-jquery').change(function() {
     jQuery('input#opt-lightbox').attr("disabled", true);
     if (jQuery(this).is(":checked")) {
       jQuery('input#opt-lightbox').attr("disabled", false);
     }
    });
    jQuery("input#opt-jquery").change();

    jQuery('select#opt-header').change(function() {
     jQuery('#header-upload,#header-color').hide();
     if(jQuery(this).find('option:selected').attr('value')=='user-image') jQuery('#header-upload').show();
     if(jQuery(this).find('option:selected').attr('value')=='user-color') jQuery('#header-color').show();
    });
    jQuery("select#opt-header").change();

    jQuery('#colorpicker').farbtastic('input#opt-header_color');
	jQuery('#colorpicker').hide();
	jQuery('input#opt-header_color').focus( function() { jQuery('#colorpicker').show('fast'); });
	jQuery('input#opt-header_color').blur( function() { jQuery('#colorpicker').hide('fast'); });

  });
  /* ]]> */
  </script>

  <div id="theme-settings" class="wrap">
   <?php 
        screen_icon();
        ?>
   <h2><?php 
        _e('Arclite settings', 'arclite');
        ?>
</h2>

   <form action="<?php 
        echo admin_url('admin-post.php?action=arclite_update');
        ?>
" method="post" enctype="multipart/form-data">
   <?php 
        wp_nonce_field('theme-settings');
        ?>
   <?php 
        if (isset($_GET['updated'])) {
            ?>
   <div class="updated fade below-h2">
    <p><?php 
            printf(__('Settings saved. %s', 'arclite'), '<a href="' . user_trailingslashit(get_bloginfo('url')) . '">' . __('View site', 'arclite') . '</a>');
            ?>
</p>
   </div>
   <?php 
        }
        ?>

   <!-- theme-settings -->
   <div id="theme-settings">

      <table class="form-table" style="width: auto">

       <tr>
        <th scope="row"><p><?php 
        _e("Imageless layout", "arclite");
        ?>
<span><?php 
        _e("(no background images; reduces pages to just a few KB, with the cost of less graphic details)", "arclite");
        ?>
</span></p></th>
        <td><input name="imageless" id="opt-imageless" type="checkbox" value="1" <?php 
        checked('1', get_arclite_option('imageless'));
        ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Enable 3rd column on all pages", "arclite");
        ?>
<span><?php 
        _e("(apply the 3-column template if you only want it on certain pages)", "arclite");
        ?>
</span></p></th>
        <td><input name="threecol" id="opt-threecol" type="checkbox" value="1" <?php 
        checked('1', get_arclite_option('threecol'));
        ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Sidebar position", "arclite");
        ?>
</p></th>
        <td>
         <select name="left_sidebar" id="opt-left_sidebar">
          <option value="1" <?php 
        if (get_arclite_option('left_sidebar') == 1) {
            echo 'selected="selected" ';
        }
        ?>
><?php 
        _e('Left', 'arclite');
        ?>
</option>
          <option value="0" <?php 
        if (get_arclite_option('left_sidebar') != 1) {
            echo 'selected="selected" ';
        }
        ?>
><?php 
        _e('Right', 'arclite');
        ?>
</option>
         </select>
        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Top navigation shows", "arclite");
        ?>
</p></th>
        <td>
         <select name="navigation" id="opt-navigation">
          <option value="pages" <?php 
        if (get_arclite_option('navigation') == 'pages') {
            echo 'selected="selected" ';
        }
        ?>
><?php 
        _e('Pages', 'arclite');
        ?>
</option>
          <option value="categories" <?php 
        if (get_arclite_option('navigation') == 'categories') {
            echo 'selected="selected" ';
        }
        ?>
><?php 
        _e('Categories', 'arclite');
        ?>
</option>
         </select>
        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Exclude from main navigation", "arclite");
        ?>
<span><?php 
        _e("(Type page or category IDs. Separate with commas)", "arclite");
        ?>
</span></p></th>
        <td>
         <input class="text" type="text" size="40" name="navigation_exclude" value="<?php 
        esc_attr(print_arclite_option('navigation_exclude'));
        ?>
" />
        </td>
        </tr>

        <tr>
        <th scope="row"><p><?php 
        _e("Footer", "arclite");
        ?>
<span><?php 
        _e("Add content", 'arclite');
        ?>
</span></p></th>
        <td>
         <textarea rows="4" cols="50" name="footer_content" class="code"><?php 
        echo get_arclite_option('footer_content');
        ?>
</textarea>
        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Logo image", "arclite");
        ?>
</p></th>
        <td>


       <?php 
        if (is_writable(get_upload_dir('basedir'))) {
            ?>

        <?php 
            _e('Upload a custom logo image', 'arclite');
            ?>
<br />
        <input type="file" name="file-logo" id="file-logo" />
        <br />
        <?php 
            if (get_arclite_option('logo')) {
                ?>
        <div style="background: #000;margin-top:10px;overflow:hidden;"><img src="<?php 
                echo get_arclite_option('logo');
                ?>
" style="padding:10px;" /></div>
        <button type="submit" class="button" name="remove-logo" value="0"><?php 
                _e("Remove current image", "arclite");
                ?>
</button>
        <?php 
            }
            ?>


       <?php 
        } else {
            ?>
        <p class="error" style="padding: 4px;"><?php 
            printf(__('Can\'t upload! Directory %s is not writable!<br />Change write permissions with CHMOD 755 or 777', 'arclite'), $uploadpath['baseurl']);
            ?>
</p>
       <?php 
        }
        ?>

        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Show search", "arclite");
        ?>
</p></th>
        <td><input name="search" id="opt-search" type="checkbox" value="1" <?php 
        checked('1', get_arclite_option('search'));
        ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Show theme-default category block", "arclite");
        ?>
</p></th>
        <td><input name="sidebar_categories" id="opt-sidebar_categories" type="checkbox" value="1" <?php 
        checked('1', get_arclite_option('sidebar_categories'));
        ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Header background", "arclite");
        ?>
</p></th>
        <td>
         <select name="header" id="opt-header">
              <option <?php 
        if (get_arclite_option('header') == 'default') {
            echo 'selected="selected" ';
        }
        ?>
 value="default">Texture: Dark brown (default)</option>
              <option <?php 
        if (get_arclite_option('header') == 'green') {
            echo 'selected="selected" ';
        }
        ?>
 value="green">Texture: Dark green</option>
              <option <?php 
        if (get_arclite_option('header') == 'red') {
            echo 'selected="selected" ';
        }
        ?>
 value="red">Texture: Dark red</option>
              <option <?php 
        if (get_arclite_option('header') == 'blue') {
            echo 'selected="selected" ';
        }
        ?>
 value="blue">Texture: Dark blue</option>
              <option <?php 
        if (get_arclite_option('header') == 'field') {
            echo 'selected="selected" ';
        }
        ?>
 value="field">Texture: Green Field</option>
              <option <?php 
        if (get_arclite_option('header') == 'fire') {
            echo 'selected="selected" ';
        }
        ?>
 value="fire">Texture: Burning</option>
              <option <?php 
        if (get_arclite_option('header') == 'wall') {
            echo 'selected="selected" ';
        }
        ?>
 value="wall">Texture: Dirty Wall</option>
              <option <?php 
        if (get_arclite_option('header') == 'wood') {
            echo 'selected="selected" ';
        }
        ?>
 value="wood">Texture: Wood</option>
              <option style="color: #ed1f24" <?php 
        if (get_arclite_option('header') == 'user-image') {
            echo 'selected="selected" ';
        }
        ?>
 value="user-image"><?php 
        _e('User defined image (upload)', 'arclite');
        ?>
</option>
              <option style="color: #ed1f24" <?php 
        if (get_arclite_option('header') == 'user-color') {
            echo 'selected="selected" ';
        }
        ?>
 value="user-color"><?php 
        _e('User defined color', 'arclite');
        ?>
</option>
         </select>

         <div id="header-upload">
         <?php 
        if (is_writable(get_upload_dir('basedir'))) {
            ?>

          <?php 
            _e('Centered image (upload a 960x190 image for best fit):', 'arclite');
            ?>
<br />
          <input type="file" name="file-header1" id="file-header1" />
          <br />
          <?php 
            if (get_arclite_option('header1')) {
                ?>
          <div style="background: #000;margin-top:10px;overflow:hidden;"><img src="<?php 
                echo get_arclite_option('header1');
                ?>
" style="padding:10px;" /></div>
          <button type="submit" class="button" name="remove-header1" value="0"><?php 
                _e("Remove current image", "arclite");
                ?>
</button><br />
          <?php 
            }
            ?>
          <br />
          <?php 
            _e('Tiled image, repeats itself across the entire header (centered image will show on top of it, if specified):', 'arclite');
            ?>
<br />
          <input type="file" name="file-header2" id="file-header2" />
          <br />
          <?php 
            if (get_arclite_option('header2')) {
                ?>
          <div style="background: #000;margin-top:10px;overflow:hidden;"><img src="<?php 
                echo get_arclite_option('header2');
                ?>
" style="padding:10px;" /></div>
          <button type="submit" class="button" name="remove-header2" value="0"><?php 
                _e("Remove current image", "arclite");
                ?>
</button><br />
          <?php 
            }
            ?>

         <?php 
        } else {
            ?>
          <p class="error" style="padding: 4px;"><?php 
            printf(__('Can\'t upload! Directory %s is not writable!<br />Change write permissions with CHMOD 755 or 777', 'arclite'), $uploadpath['baseurl']);
            ?>
</p>
         <?php 
        }
        ?>
         </div>

         <div id="header-color">
           <?php 
        _e('Pick a color', 'arclite');
        ?>
<br />
           <input type="text" id="opt-header_color" name="header_color" style="background: #<?php 
        esc_attr(print_arclite_option('header_color'));
        ?>
;" value="<?php 
        esc_attr(print_arclite_option('header_color'));
        ?>
" />
           <div id="colorpicker"></div>

         </div>

        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Widget title background", "arclite");
        ?>
</p></th>
        <td>
          <select name="widget_background" id="opt-widget_background">
              <option <?php 
        if (get_arclite_option('widget_background') == 'default') {
            echo 'selected="selected" ';
        }
        ?>
 value="default">Pink (default)</option>
              <option <?php 
        if (get_arclite_option('widget_background') == 'green') {
            echo 'selected="selected" ';
        }
        ?>
 value="green">Green</option>
              <option <?php 
        if (get_arclite_option('widget_background') == 'blue') {
            echo 'selected="selected" ';
        }
        ?>
 value="blue">Blue</option>
              <option <?php 
        if (get_arclite_option('widget_background') == 'gray') {
            echo 'selected="selected" ';
        }
        ?>
 value="gray">Gray</option>
          </select>
        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Content background", "arclite");
        ?>
</p></th>
        <td>
          <select name="content_background" id="opt-content_background">
              <option <?php 
        if (get_arclite_option('content_background') == 'default') {
            echo 'selected="selected" ';
        }
        ?>
 value="default">Texture: Light brown + noise (default)</option>
              <option <?php 
        if (get_arclite_option('content_background') == 'grunge') {
            echo 'selected="selected" ';
        }
        ?>
 value="grunge">Texture: Grunge</option>
              <option <?php 
        if (get_arclite_option('content_background') == 'white') {
            echo 'selected="selected" ';
        }
        ?>
 value="white">White color</option>
          </select>
        </td>
       </tr>



       <tr>
        <th scope="row"><p><?php 
        _e("Index page/Archives show:", "arclite");
        ?>
</p></th>
        <td>
         <select name="post_preview">
          <option value="full" <?php 
        if (get_arclite_option('post_preview') == 'full') {
            echo 'selected="selected" ';
        }
        ?>
><?php 
        _e('Full posts', 'arclite');
        ?>
</option>
          <option value="excerpt" <?php 
        if (get_arclite_option('post_preview') == 'excerpt') {
            echo 'selected="selected" ';
        }
        ?>
><?php 
        _e('Excerpts only', 'arclite');
        ?>
</option>
         </select>
        </td>
       </tr>


       <tr>
        <th scope="row"><p><?php 
        _e("User CSS code", "arclite");
        ?>
<span><?php 
        _e("Modify anything related to design using simple CSS", "arclite");
        ?>
<br /><br /><span style="color: #ed1f24"><?php 
        _e("Avoid modifying theme files and use this option instead to preserve changes after update", "arclite");
        ?>
</span></span></p></th>
        <td valign="top">
         <textarea rows="10" cols="50" name="user_css" id="opt-user_css" class="code alignleft"><?php 
        echo get_arclite_option('user_css');
        ?>
</textarea>

         <div class="alignleft" style="padding: 1em;">
          <button class="button" onclick="jQuery('#opt-user_css').appendVal('.block-content{width:960px;max-width:960px;}\n');" type="button"><?php 
        _e("Set a fixed page width (960px)", "arclite");
        ?>
</button><br />
          <button class="button" onclick="jQuery('#opt-user_css').appendVal('.block-content{width:95%;max-width:95%;}\n');" type="button"><?php 
        _e("Set fluid page width (not recommended)", "arclite");
        ?>
</button><br />
          <button class="button" onclick="jQuery('#opt-user_css').appendVal('.post p.post-date,.post p.post-author{display:none;}\n');" type="button"><?php 
        _e("Hide post information bar", "arclite");
        ?>
</button><br />
          <button class="button" onclick="jQuery('#opt-user_css').appendVal('body,input,textarea,select,h1,h2,h6,.post h3,.box .titlewrap h4{font-family:Arial, Helvetica;}\n');" type="button"><?php 
        _e("Arial type fonts", "arclite");
        ?>
</button><br />
          <button class="button" onclick="jQuery('#opt-user_css').appendVal('#pagetitle{font-size:75%;}\n');" type="button"><?php 
        _e("Make text logo/headline smaller", "arclite");
        ?>
</button><br />
         </div>
        </td>
        </tr>

        <tr>
         <th scope="row"><p><?php 
        _e("Use jQuery", "arclite");
        ?>
<span><?php 
        _e("(for testing purposes only, you shouldnt change this)", "arclite");
        ?>
</span></p></th>
         <td><input id="opt-jquery" name="jquery" type="checkbox" value="1" <?php 
        checked('1', get_arclite_option('jquery'));
        ?>
 /></td>
        </tr>

        <tr>
         <th scope="row"><p><?php 
        _e("Use theme lightbox", "arclite");
        ?>
<span><?php 
        _e("(Uncheck if you're using a plugin)", "arclite");
        ?>
</span></p></th>
         <td><input id="opt-lightbox" name="lightbox" type="checkbox" value="1" <?php 
        checked('1', get_arclite_option('lightbox'));
        ?>
 /></td>
        </tr>

        <tr>
        <th scope="row"><p><?php 
        _e("Remove Arclite settings from the database after theme switch", "arclite");
        ?>
<span><?php 
        _e("Leave this unchecked if you plan to keep Arclite as your default theme", "arclite");
        ?>
</span></p></th>      <td>
         <input name="remove_settings" id="opt-remove_settings" type="checkbox" value="1" <?php 
        checked('1', get_arclite_option('remove_settings'));
        ?>
 />
        </td>
       </tr>


      </table>

   </div>
   <!-- /theme-settings -->

   <p><input type="submit" class="button-primary" name="submit" value="<?php 
        _e("Save Changes", "arclite");
        ?>
" /></p>
   </form>
   <hr />
   <div class="support">
    <form class="alignleft" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input name="cmd" type="hidden" value="_s-xclick" /> <input name="hosted_button_id" type="hidden" value="4605915" /> <input alt="Donate" name="submit" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" type="image" /> <img src="https://www.paypal.com/en_US/i/scr/pixel.gif" border="0" alt="" width="1" height="1" /></form>
     <a href="http://digitalnature.ro/projects/arclite">Arclite</a> is a free theme developed by <a href="http://digitalnature.ro">digitalnature</a>.<br />You can support this project by donating.
   </div>
   <div class="clear"></div>

  </div>
  <?php 
    }
}
 function get_upload_path()
 {
     $upload_path = get_option('upload_path');
     $upload_path = trim($upload_path);
     if (empty($upload_path) || realpath($upload_path) == false) {
         $upload_path = get_upload_dir();
     }
     return $upload_path;
 }
예제 #4
0
function mystique_theme_settings()
{
    global $is_IE;
    if (!current_user_can('switch_themes')) {
        wp_die(__('You are not authorised to perform this operation.', 'mystique'));
    }
    ?>

  <div id="mystique-settings" class="wrap clear-block">
   <form action="<?php 
    echo admin_url('admin-post.php?action=mystique_update');
    ?>
" method="post" enctype="multipart/form-data">

   <div class="clear-block">
     <?php 
    screen_icon();
    ?>
<h2 class="alignleft"><?php 
    _e('Mystique settings', 'mystique');
    ?>
</h2>
     <p class="controls alignleft"><input type="submit" class="button-primary" name="submit" value="<?php 
    _e("Save Changes", "mystique");
    ?>
" /><input type="submit" class="button-primary" name="reset" value="<?php 
    _e("Reset to Defaults", "mystique");
    ?>
" onclick="if(confirm('<?php 
    _e("Reset all theme settings to the default values? Are you sure?", "mystique");
    ?>
')) return true; else return false;" /></p>
   </div>

   <?php 
    wp_nonce_field('theme-settings');
    ?>

   <?php 
    mystique_check_update();
    ?>

   <?php 
    if (isset($_GET['updated'])) {
        ?>
   <div class="updated fade below-h2">
    <p><?php 
        printf(__('Settings saved. %s', 'mystique'), '<a href="' . user_trailingslashit(get_bloginfo('url')) . '">' . __('View site', 'mystique') . '</a>');
        ?>
</p>
   </div>
   <?php 
    } elseif (isset($_GET['error'])) {
        $errors = array(1 => __("Please upload a valid image file!", "mystique"), 2 => __("The file you uploaded doesn't seem to be a valid JPEG, PNG or GIF image", "mystique"), 3 => __("The image could not be saved on your server", "mystique"));
        ?>
   <div class="error fade below-h2">
    <p><?php 
        printf(__('Error: %s', 'mystique'), $errors[$_GET['error']]);
        ?>
</p>
   </div>
   <?php 
    }
    ?>

   <!-- tabbed content -->
   <div id="mystique-settings-tabs">

    <div class="clear-block">
     <ul class="subsubsub">
      <li class="design"><a href='#tab-design'><?php 
    _e("Design", "mystique");
    ?>
</a></li> |
      <li class="content"><a href='#tab-content'><?php 
    _e("Content", "mystique");
    ?>
</a></li> |
      <li class="nav"><a href='#tab-navigation'><?php 
    _e("Navigation", "mystique");
    ?>
</a></li> |
      <li class="seo"><a href='#tab-seo'><?php 
    _e("SEO", "mystique");
    ?>
</a></li> |
      <li class="ads"><a href='#tab-ads'><?php 
    _e("Ads", "mystique");
    ?>
</a></li> |
      <li class="adv"><a href='#tab-advanced'><?php 
    _e("Advanced", "mystique");
    ?>
</a></li> |
      <li class="usercss"><a href='#tab-css'><?php 
    _e("User CSS", "mystique");
    ?>
</a></li> |
     </ul>
    </div>

    <!-- sections -->
    <div class="sections wrap metabox-holder">

     <div class="section" id="tab-design">

      <?php 
    if ($is_IE) {
        ?>
      <p><?php 
        _e("The design settings panel is not yet supported by Internet Explorer. Sorry :(", "mystique");
        ?>
</p>
      <?php 
    } else {
        ?>

      <div id="themepreview-wrap"><div class="clear-block"><div class="loading"><?php 
        _e("Loading site preview...", "mystique");
        ?>
</div></div></div>

      <table class="form-table">
       <?php 
        $layout = get_mystique_option('layout');
        ?>
       <tr>
        <th scope="row"><p><?php 
        _e("Layout style", "mystique");
        ?>
<span><?php 
        _e("Use page templates if you want to apply these only to specific pages", "mystique");
        ?>
</span></p></th>
        <td id="layout-settings" class="clear-block">
         <div class="layout-box">
          <label for="layout-settings-col-1" class="layout col-1 <?php 
        echo mystique_selected_class('col-1', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-1" value="col-1" <?php 
        checked('col-1', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-2-left" class="layout col-2-left <?php 
        echo mystique_selected_class('col-2-left', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-2-left" value="col-2-left" <?php 
        checked('col-2-left', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-2-right" class="layout col-2-right <?php 
        echo mystique_selected_class('col-2-right', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-2-right" value="col-2-right" <?php 
        checked('col-2-right', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-3" class="layout col-3 <?php 
        echo mystique_selected_class('col-3', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-3" value="col-3" <?php 
        checked('col-3', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-3-left" class="layout col-3-left <?php 
        echo mystique_selected_class('col-3-left', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-3-left" value="col-3-left" <?php 
        checked('col-3-left', $layout);
        ?>
/>
         </div>

         <div class="layout-box">
          <label for="layout-settings-col-3-right" class="layout col-3-right <?php 
        echo mystique_selected_class('col-3-right', $layout);
        ?>
"></label>
          <input class="radio" type="radio" name="layout" id="layout-settings-col-3-right" value="col-3-right" <?php 
        checked('col-3-right', $layout);
        ?>
/>
         </div>

        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Color scheme", "mystique");
        ?>
</p></th>
        <td id="color-scheme">

         <div class="color-box">
          <label for="color-box-green" class="color_scheme green"></label>
          <input class="radio" type="radio" name="color_scheme" id="color-box-green" value="green" <?php 
        checked('green', get_mystique_option('color_scheme'));
        ?>
/>
         </div>

         <div class="color-box">
          <label for="color-box-blue" class="color_scheme blue"></label>
          <input class="radio" type="radio" name="color_scheme" id="color-box-blue" value="blue" <?php 
        checked('blue', get_mystique_option('color_scheme'));
        ?>
/>
         </div>

         <div class="color-box">
          <label for="color-box-red" class="color_scheme red"></label>
          <input class="radio" type="radio" name="color_scheme" id="color-box-red" value="red" <?php 
        checked('red', get_mystique_option('color_scheme'));
        ?>
/>
         </div>

         <div class="color-box">
          <label for="color-box-grey" class="color_scheme grey"></label>
          <input class="radio" type="radio" name="color_scheme" id="color-box-grey" value="grey" <?php 
        checked('grey', get_mystique_option('color_scheme'));
        ?>
/>
         </div>

        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Page (content) width", "mystique");
        ?>
<span><?php 
        _e("Note that fluid pages can be hard to read on large resolutions.", "mystique");
        ?>
</span></p></th>
        <td>

         <label for="opt_page_width_fixed"><input name="page_width" type="radio" id="opt_page_width_fixed" class="radio" value="fixed" <?php 
        checked('fixed', get_mystique_option('page_width'));
        ?>
 /><?php 
        printf(__("Fixed (%s)", "mystique"), '<a href="http://960.gs/" target="_blank">960gs</a>');
        ?>
</label>
         <label for="opt_page_width_fluid"><input name="page_width" type="radio" id="opt_page_width_fluid" class="radio" value="fluid" <?php 
        checked('fluid', get_mystique_option('page_width'));
        ?>
 /><?php 
        _e("Fluid (100%)/Custom", "mystique");
        ?>
</label>

        </td>
       </tr>

       <tr id="dimension_controls"<?php 
        if (get_mystique_option('layout') == 'col-1') {
            ?>
 class="hidden"<?php 
        }
        ?>
>
        <th scope="row"><p><?php 
        _e("Column sizes", "mystique");
        ?>
<span><?php 
        _e("(With 10 pixel padding between them)", "mystique");
        ?>
</span></p></th>
        <td>
         <div id="slider"></div>
         <?php 
        $dimensions = get_mystique_option('dimensions');
        foreach ($dimensions as $layout_size => $layout_types) {
            foreach ($layout_types as $layout => $values) {
                echo '<input type="hidden" id="opt_dimensions_' . $layout_size . '_' . $layout . '" name="dimensions_' . $layout_size . '_' . $layout . '" value="' . $values . '" />' . PHP_EOL;
            }
        }
        ?>
        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Font style", "mystique");
        ?>
</p></th>
        <td>
          <?php 
        $font_styles = font_styles();
        ?>

          <select name="font_style" id="opt_font_style">
           <?php 
        foreach ($font_styles as $entry => $name) {
            ?>
           <option value="<?php 
            echo $entry;
            ?>
" <?php 
            selected($entry, get_mystique_option('font_style'));
            ?>
 style='font-size:100%; font-family: <?php 
            echo $font_styles[$entry]['code'];
            ?>
;'><?php 
            echo $font_styles[$entry]['desc'];
            ?>
</option>
           <?php 
        }
        ?>
         </select>
        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Background color", "mystique");
        ?>
<span><?php 
        _e("Leave Black (#000000) to keep the default background", "mystique");
        ?>
</span></p></th>
        <td>

           <div class="color-selector clear-block" id="opt_background_color">
             <div class="preview" style="background-color: #<?php 
        echo wp_specialchars(get_mystique_option('background_color'));
        ?>
">
               <input name="background_color" type="hidden" value="<?php 
        echo wp_specialchars(get_mystique_option('background_color'));
        ?>
" />
             </div>
           </div>

        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
        _e("Custom logo image", "mystique");
        ?>
<span><?php 
        _e("Show a logo image instead of text; Upload the graphic file from your computer", "mystique");
        ?>
</span></p></th>
        <td>
          <?php 
        if (is_writable(get_upload_dir('basedir'))) {
            ?>
           <input type="file" name="file-logo" id="file-logo" />
           <?php 
            if (get_mystique_option('logo')) {
                ?>
           <button type="submit" class="button" name="remove-logo" value="0"><?php 
                _e("Remove current image", "mystique");
                ?>
</button>
           <div class="clear-block">
            <div class="image-preview"><img src="<?php 
                echo get_mystique_option('logo');
                ?>
" style="padding:10px;" /></div>
           </div>
           <?php 
            }
            ?>
         <?php 
        } else {
            ?>
         <p class="error" style="padding: 4px;"><?php 
            printf(__("Directory %s doesn't have write permissions - can't upload!", "mystique"), '<strong>' . get_upload_dir('basedir') . '</strong>');
            ?>
</p><p><?php 
            _e("Check your upload path in Settings/Misc or CHMOD this directory to 755/777.<br />Contact your host if you don't know how", "mystique");
            ?>
</p>
         <?php 
        }
        ?>
         <input type="hidden" name="logo" value="<?php 
        echo get_mystique_option('logo');
        ?>
">
         <input type="hidden" name="logo_size" value="<?php 
        echo get_mystique_option('logo_size');
        ?>
">
        </td>
       </tr>


       <tr>
        <th scope="row"><p><?php 
        _e("Custom background image", "mystique");
        ?>
<span><?php 
        _e("Upload a new background/header image to replace the default one", "mystique");
        ?>
</span></p></th>
        <td>
         <?php 
        if (is_writable(get_upload_dir('basedir'))) {
            ?>
           <input type="file" name="file-background" id="file-background" />
           <?php 
            if (get_mystique_option('background')) {
                ?>
           <button type="submit" class="button" name="remove-background" value="0"><?php 
                _e("Remove current image", "mystique");
                ?>
</button>
           <div class="clear-block">
            <div class="image-preview"><img src="<?php 
                echo get_mystique_option('background');
                ?>
" style="padding:10px;" /></div>
           </div>
           <?php 
            }
            ?>
         <?php 
        } else {
            ?>
         <p class="error" style="padding: 4px;"><?php 
            printf(__("Directory %s doesn't have write permissions - can't upload!", "mystique"), '<strong>' . get_upload_dir('basedir') . '</strong>');
            ?>
</p><p><?php 
            _e("Check your upload path in Settings/Misc or CHMOD this directory to 755/777.<br />Contact your host if you don't know how", "mystique");
            ?>
</p>
         <?php 
        }
        ?>
         <input type="hidden" name="background" value="<?php 
        echo get_mystique_option('background');
        ?>
">
        </td>
       </tr>

      </table>
     <?php 
    }
    ?>
     </div>

     <div class="section" id="tab-content">
      <table class="form-table">

       <tr>
        <th scope="row"><p><?php 
    _e("Posts (single)", "mystique");
    ?>
<span><?php 
    _e("How much information do you want to show on the single post page?", "mystique");
    ?>
</span></p></th>
        <td>
         <label for="opt_single_tags">
           <input name="post_single_tags" id="opt_single_tags" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_tags'));
    ?>
 /> <?php 
    _e("Tags", "mystique");
    ?>
         </label>
         <label for="opt_single_meta">
           <input name="post_single_meta" id="opt_single_meta" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_meta'));
    ?>
 /> <?php 
    _e("Meta", "mystique");
    ?>
         </label>
         <label for="opt_single_share">
          <input name="post_single_share" id="opt_single_share" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_share'));
    ?>
 /> <?php 
    _e("Share", "mystique");
    ?>
         </label>
         <label for="opt_single_author">
           <input name="post_single_author" id="opt_single_author" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_author'));
    ?>
 /> <?php 
    _e("About the author", "mystique");
    ?>
         </label>
         <label for="opt_single_print">
          <input name="post_single_print" id="opt_single_print" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_print'));
    ?>
 /> <?php 
    _e("Print link", "mystique");
    ?>
         </label>
         <label for="opt_single_related">
           <input name="post_single_related" id="opt_single_related" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_single_related'));
    ?>
 /> <?php 
    _e("Related posts", "mystique");
    ?>
         </label>
        </td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Post previews", "mystique");
    ?>
<span><?php 
    _e("How much info do you want to show on blog/category/archive/search pages?", "mystique");
    ?>
</span></p></th>
        <td>
         <label for="opt_post_title">
           <input name="post_title" id="opt_post_title" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_title'));
    ?>
 /> <?php 
    _e("Title", "mystique");
    ?>
         </label>
         <label for="opt_post_info">
           <input name="post_info" id="opt_post_info" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_info'));
    ?>
 /> <?php 
    _e("Info bar", "mystique");
    ?>
         </label>
         <label for="opt_post_tags">
          <input name="post_tags" id="opt_post_tags" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_tags'));
    ?>
 /> <?php 
    _e("Tags");
    ?>
         </label>
         <label for="opt_post_content" style="margin-right: 0;">
          <input name="post_content" id="opt_post_content" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_content'));
    ?>
 /> <?php 
    _e("Content", "mystique");
    ?>
         </label>
         <select name="post_content_length" id="opt_post_content_length"<?php 
    if (!get_mystique_option('post_content')) {
        ?>
 disabled="disabled"<?php 
    }
    ?>
>
           <option value="50" <?php 
    selected('50', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('max. 50 words, filtered', 'mystique');
    ?>
</option>
           <option value="100" <?php 
    selected('100', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('max. 100 words, filtered', 'mystique');
    ?>
</option>
           <option value="200" <?php 
    selected('200', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('max. 200 words, filtered', 'mystique');
    ?>
</option>
           <option value="f" <?php 
    selected('f', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('full', 'mystique');
    ?>
</option>
           <option value="ff" <?php 
    selected('ff', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('full, filtered', 'mystique');
    ?>
</option>
           <option value="e" <?php 
    selected('e', get_mystique_option('post_content_length'));
    ?>
><?php 
    _e('excerpt', 'mystique');
    ?>
</option>
         </select>
        </td>
       </tr>

       <tr>
         <th scope="row"><p><?php 
    _e("Auto generate thumbnails", "mystique");
    ?>
<span><?php 
    _e("Get the 1st image attached to a post, if no thumbnail is set manually", "mystique");
    ?>
</span></p></th>
         <td><input name="post_thumb_auto" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('post_thumb_auto'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Post thumbnail size", "mystique");
    ?>
<span><?php 
    printf(__("Note that this only works for images you upload from now on, older images will be browser-resized. You should use the %s plugin to create missing image sizes", "mystique"), '<a href="http://wordpress.org/extend/plugins/regenerate-thumbnails/" target="_blank">Regenerate Thumbnails</a>');
    ?>
</span></p></th>
        <td>
         <select name="post_thumb">
          <?php 
    $wpsize = get_option('thumbnail_size_w') . ' x ' . get_option('thumbnail_size_h');
    ?>
          <option value="48x48" <?php 
    selected('48x48', get_mystique_option('post_thumb'));
    ?>
><?php 
    _e('Very small: 48 x 48', 'mystique');
    ?>
</option>
          <option value="64x64" <?php 
    selected('64x64', get_mystique_option('post_thumb'));
    ?>
><?php 
    _e('Small: 64 x 64', 'mystique');
    ?>
</option>
          <option value="80x80" <?php 
    selected('80x80', get_mystique_option('post_thumb'));
    ?>
><?php 
    _e('Medium: 80 x 80', 'mystique');
    ?>
</option>
          <option value="100x100" <?php 
    selected('100x100', get_mystique_option('post_thumb'));
    ?>
><?php 
    _e('Larger: 100 x 100', 'mystique');
    ?>
</option>
          <option value="<?php 
    echo str_replace(" ", "", $wpsize);
    ?>
" <?php 
    selected(str_replace(" ", "", $wpsize), get_mystique_option('post_thumb'));
    ?>
><?php 
    printf(__("WP's Media setting: %s", "mystique"), $wpsize);
    ?>
</option>
         </select>
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_content");
    ?>

       <tr>
        <th scope="row"><p><?php 
    _e("Footer content", "mystique");
    ?>
<span><?php 
    if (current_user_can('unfiltered_html')) {
        _e("You can post HTML code", 'mystique');
    } else {
        _e("Only some HTML tags and attributes are allowed", 'mystique');
    }
    ?>
</span></p></th>
        <td>
         <textarea id="opt_footer_content" rows="8" cols="60" name="footer_content" class="code"><?php 
    echo wp_specialchars(get_mystique_option('footer_content'));
    ?>
</textarea>
         <br />
         <?php 
    printf(__("Use the following short codes for convenient adjustments: <br />%s", 'mystique'), '<code>[rss]</code> <code>[copyright]</code> <code>[credit]</code> <code>[ad code=#]</code> <code>[wp-link]</code> <code>[theme-link]</code> <code>[login-link]</code> <code>[blog-title]</code> <code>[xhtml]</code> <code>[css]</code> <code>[top]</code> <code>[page-rank]</code>.');
    ?>
        </td>
       </tr>

      </table>
     </div>

     <div class="section" id="tab-navigation">
      <table class="form-table">
       <tr>
        <th scope="row"><p><?php 
    _e("Top navigation shows", "mystique");
    ?>
</p></th>
        <td class="clear-block">
         <select name="navigation" id="opt_navigation" class="alignleft">
          <option value="0" <?php 
    selected('0', get_mystique_option('navigation'));
    ?>
><?php 
    _e('Nothing (disabled)', 'mystique');
    ?>
</option>
          <option value="pages" <?php 
    selected('pages', get_mystique_option('navigation'));
    ?>
><?php 
    _e('Pages', 'mystique');
    ?>
</option>
          <option value="categories" <?php 
    selected('categories', get_mystique_option('navigation'));
    ?>
><?php 
    _e('Categories', 'mystique');
    ?>
</option>
          <option value="links" <?php 
    selected('links', get_mystique_option('navigation'));
    ?>
><?php 
    _e('Links', 'mystique');
    ?>
</option>
          <?php 
    if (WP_VERSION > 2.9) {
        ?>
<option value="menus" <?php 
        selected('menus', get_mystique_option('navigation'));
        ?>
><?php 
        _e('Custom Menus', 'mystique');
        ?>
</option><?php 
    }
    ?>
         </select>
         <div class="hidden alignleft inline opt_links">
          <?php 
    $taxonomy = 'link_category';
    $args = '';
    $terms = get_terms($taxonomy, $args);
    if ($terms) {
        ?>
             <?php 
        _e("from category", "mystique");
        ?>
             <select name="navigation_links">
             <?php 
        foreach ($terms as $term) {
            if ($term->count > 0) {
                ?>
               <option value="<?php 
                echo $term->name;
                ?>
" <?php 
                selected($term->name, get_mystique_option('navigation_links'));
                ?>
><?php 
                echo $term->name;
                ?>
 (<?php 
                printf(__("%s links", "mystique"), $term->count);
                ?>
)</option>
              <?php 
            }
        }
        ?>
             </select>
             <?php 
    } else {
        ?>
             <p class="error"><?php 
        _e("No links found", "mystique");
        ?>
</p>
           <?php 
    }
    ?>
         </div>
        </td>
       </tr>

       <tr id="nav-list" <?php 
    if (!get_mystique_option('navigation')) {
        ?>
class="hidden"<?php 
    }
    ?>
>
        <th scope="row"><p><?php 
    _e("Exclude from navigation", "mystique");
    ?>
<span><?php 
    _e("Check the items you wish to hide from the main menu", "mystique");
    ?>
</span></p></th>
        <td>

          <?php 
    if (get_option('show_on_front') != 'page') {
        ?>
          <ul class="nav-exclude">
            <li><input name="exclude_home" id="opt_exclude_home" class="checkbox" type="checkbox" value="1" <?php 
        checked('1', get_mystique_option('exclude_home'));
        ?>
 /><label> <a href="<?php 
        echo get_settings('home');
        ?>
"><?php 
        _e('Home', 'mystique');
        ?>
</a> </label></li>
          </ul>
          <?php 
    }
    ?>


          <?php 
    $categories =& get_categories(array('hide_empty' => false));
    $exclude_categories = explode(',', get_mystique_option('exclude_categories'));
    $walker = new mystique_CategoryWalker('checkbox', 'ul', $exclude_categories);
    if (!empty($categories)) {
        ?>
             <ul class="hidden nav-exclude" id="category-list">
              <?php 
        echo $walker->walk($categories, 0, array('checkboxes' => true, 'count' => true));
        ?>
             </ul>
           <?php 
    }
    ?>

          <?php 
    $pages =& get_pages('sort_column=post_parent,menu_order');
    $exclude_pages = explode(',', get_mystique_option('exclude_pages'));
    $walker = new mystique_PageWalker('checkbox', 'ul', $exclude_pages);
    if (!empty($pages)) {
        ?>
             <ul class="hidden nav-exclude" id="page-list">
              <?php 
        echo $walker->walk($pages, 0, array(), 0);
        ?>
             </ul>
           <?php 
    }
    ?>

        </td>
       </tr>
       <?php 
    do_action("mystique_admin_navigation");
    ?>

      </table>
     </div>

     <div class="section" id="tab-seo">
      <table class="form-table">
       <tr>
        <th scope="row"><p><?php 
    _e("Additional site optimization for search engines", "mystique");
    ?>
<span><?php 
    _e("Uncheck if you are using a SEO plugin!", "mystique");
    ?>
</span></p></th>
        <td><input name="seo" type="checkbox" class="checkbox" id="opt_seo" value="1" <?php 
    checked('1', get_mystique_option('seo'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"></th>
        <td>
         <h3><?php 
    _e("What does this do?", "mystique");
    ?>
</h3>
         <ul style="list-style: disc">
          <li><em><?php 
    printf(__('enables canonical URLs for comments (duplicate content fix, only needed on wp < 2.9)', 'mystique'));
    ?>
</em></li>
          <li><em><?php 
    printf(__('generates unique titles for posts with multiple comment pages (prevents duplicate titles)', 'mystique'));
    ?>
</em></li>
          <li><em><?php 
    printf(__('generates a unique meta description tag for each page (no meta keywords; why? -<a %s>useless</a>)', 'mystique'), 'href="http://googlewebmastercentral.blogspot.com/2009/09/google-does-not-use-keywords-meta-tag.html" target="_blank"');
    ?>
 </em></li>
         </ul>
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_seo");
    ?>

      </table>
     </div>

     <div class="section" id="tab-ads">
      <table class="form-table">

       <tr>
        <th scope="row">
         <p><?php 
    printf(__("Advertisment blocks", "mystique"), $i);
    ?>
<span><?php 
    printf(__('Use the %s short code to insert these ads into posts, text widgets or footer', 'mystique'), '<code>[ad]</code>');
    ?>
<br /><br><?php 
    if (!current_user_can('unfiltered_html')) {
        _e("Only some HTML tags and attributes are allowed", 'mystique');
    }
    ?>
</span></p><br />
         <p><span><?php 
    _e("Example:", "mystique");
    ?>
</span></p>
         <p><code>[ad code=4 align=center]</code></p>
        </th>
        <td class="clear-block">
         <?php 
    for ($i = 1; $i <= 6; $i++) {
        ?>
         <div class="ad-code clear-block">
          <label for="opt_ad_code_<?php 
        echo $i;
        ?>
"><?php 
        printf(__("Ad code #%s:", "mystique"), $i);
        ?>
</label><br />
          <textarea rows="8" cols="40" name="ad_code_<?php 
        echo $i;
        ?>
" id="opt_ad_code_<?php 
        echo $i;
        ?>
" class="code"><?php 
        echo wp_specialchars(get_mystique_option('ad_code_' . $i));
        ?>
</textarea>

         </div>
         <?php 
    }
    ?>
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_ads");
    ?>

      </table>
     </div>

     <div class="section" id="tab-advanced">
      <table class="form-table">
       <tr>
        <th scope="row"><p><?php 
    _e("Use jQuery", "mystique");
    ?>
<span><?php 
    _e("For testing purposes only. Only uncheck if you know what you're doing!", "mystique");
    ?>
</span></p></th>
        <td><input id="opt_jquery" name="jquery" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('jquery'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Enable AJAX for comments", "mystique");
    ?>
<span><?php 
    _e("Navigate trough comment pages and post comments without refreshing (faster load, but may be incompatible with some plugins)", "mystique");
    ?>
</span></p></th>
        <td><input id="opt_ajax_comments" name="ajax_comments" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('ajax_comments'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Enable theme built-in lightbox on all image links", "mystique");
    ?>
<span><?php 
    _e("Uncheck if you prefer a lightbox plugin", "mystique");
    ?>
</span></p></th>
        <td><input id="opt_lightbox" name="lightbox" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('lightbox'));
    ?>
 /></td>
       </tr>

       <tr>
        <th scope="row"><p><?php 
    _e("Remove Mystique settings from the database after theme switch", "mystique");
    ?>
<span><?php 
    _e("Only check if you're planning to remove and change the theme", "mystique");
    ?>
</span></p></th>      <td>
         <input name="remove_settings" id="opt_remove_settings" type="checkbox" class="checkbox" value="1" <?php 
    checked('1', get_mystique_option('remove_settings'));
    ?>
 />
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_advanced");
    ?>

      </table>

      <?php 
    if (current_user_can('edit_themes')) {
        // disable this option for users that can't edit themes (usually on wpmu)
        ?>
      <hr />
      <table class="form-table">

       <tr>
        <th scope="row">
         <p><?php 
        _e("User functions", "mystique");
        ?>
<span><?php 
        _e("PHP code to add to the theme functions. Useful if you have plugins that require you to change the theme's functions.php file", "mystique");
        ?>
</span></p>
       </th>
        <td>
         <textarea rows="16" cols="60" name="functions" id="opt_functions" class="code"><?php 
        echo wp_specialchars(get_mystique_option('functions'));
        ?>
</textarea>
        </td>
       </tr>

      </table>
      <?php 
    }
    ?>
     </div>

     <div class="section" id="tab-css">
      <table class="form-table">

       <tr>
        <th scope="row"><p><?php 
    _e("CSS to add, or modify theme styles", "mystique");
    ?>
<span><?php 
    printf(__("Check %s to see existing theme classes and properties", "mystique"), '<a href="' . get_bloginfo('stylesheet_url') . '">style.css</a>');
    ?>
</span></p>
        </th>
        <td valign="top">
         <textarea rows="30" cols="80" name="user_css" id="opt_user_css" class="code"><?php 
    echo wp_specialchars(get_mystique_option('user_css'));
    ?>
</textarea>
        </td>
       </tr>

       <?php 
    do_action("mystique_admin_user_css");
    ?>

      </table>
     </div>


    </div>
    <!-- /sections -->

   </div>
   <!-- /tabbed content -->

   </form>

   <div class="support">
    <form class="alignleft" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input name="cmd" type="hidden" value="_s-xclick" /> <input name="hosted_button_id" type="hidden" value="4605915" /> <input alt="Donate" name="submit" src="<?php 
    echo THEME_URL;
    ?>
/admin/images/pp.gif" type="image" /></form>
    <a href="http://digitalnature.ro/projects/mystique"><strong>Mystique</strong></a> is a free theme designed by <a href="http://digitalnature.ro">digitalnature</a>.<br />You can support the development of more free resources by donating.
   </div>

  </div>
  <?php 
}
예제 #5
0
 function set_new_cover()
 {
     if ($this->input['id'] && $this->input['tuji_id']) {
         $sql = 'SELECT new_name FROM ' . DB_PREFIX . 'pics WHERE id=' . intval($this->input['id']);
         $r = $this->db->query_first($sql);
         $sql = 'UPDATE ' . DB_PREFIX . 'tuji SET cover_url="' . get_upload_dir(intval($this->input['tuji_id'])) . $this->settings['thumb']['prefix'] . $r['new_name'] . '" WHERE id=' . intval($this->input['tuji_id']);
         if ($this->db->query($sql)) {
             $this->addItem('success');
         }
         $this->output();
         //$this->Redirect('内容已推荐成功', '', 0, 0, "hg_recommend_call('$id')");
     }
 }