Advertisement
emcniece

UAM adminSettings.php 1.2.5.0 - Allow HTML Patch

Dec 16th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 24.09 KB | None | 0 0
  1. <?php /* http://wordpress.org/support/topic/patch-html-character-entry-for-alternate-postpage-content */ ?>
  2. <?php
  3. /**
  4.  * adminSettings.php
  5.  *
  6.  * Shows the setting page at the admin panel.
  7.  *
  8.  * PHP versions 5
  9.  *
  10.  * @category  UserAccessManager
  11.  * @package   UserAccessManager
  12.  * @author    Alexander Schneider <alexanderschneider85@googlemail.com>
  13.  * @copyright 2008-2013 Alexander Schneider
  14.  * @license   http://www.gnu.org/licenses/gpl-2.0.html  GNU General Public License, version 2
  15.  * @version   SVN: $Id$
  16.  * @link      http://wordpress.org/extend/plugins/user-access-manager/
  17.  */
  18. global $oUserAccessManager;
  19. $aUamOptions = $oUserAccessManager->getAdminOptions();
  20.  
  21. if (isset($_POST['update_uam_settings'])) {
  22.     if (empty($_POST)
  23.         || !wp_verify_nonce($_POST['uamUpdateSettingsNonce'], 'uamUpdateSettings')
  24.     ) {
  25.          wp_die(TXT_UAM_NONCE_FAILURE);
  26.     }
  27.    
  28.     foreach ($aUamOptions as $sOption => $sValue) {
  29.         if (isset($_POST['uam_' . $sOption])) {
  30.             $aUamOptions[$sOption] = $_POST['uam_' . $sOption];
  31.         }
  32.     }
  33.    
  34.     update_option($oUserAccessManager->getAdminOptionsName(), $aUamOptions);
  35.    
  36.     if ($_POST['uam_lock_file'] == 'false') {
  37.         $oUserAccessManager->deleteHtaccessFiles();
  38.     } else {
  39.         $oUserAccessManager->createHtaccess();
  40.         $oUserAccessManager->createHtpasswd(true);
  41.     }
  42.    
  43.     do_action('uam_update_options', $aUamOptions);
  44.     ?>
  45.     <div class="updated">
  46.         <p><strong><?php echo TXT_UAM_UPDATE_SETTINGS; ?></strong></p>
  47.     </div>
  48.     <?php
  49. }
  50. ?>
  51.  
  52. <div class="wrap">
  53.     <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
  54.         <?php wp_nonce_field('uamUpdateSettings', 'uamUpdateSettingsNonce'); ?>
  55.         <h2><?php echo TXT_UAM_SETTINGS; ?></h2>
  56.         <h3><?php echo TXT_UAM_POST_SETTING; ?></h3>
  57.         <p><?php echo TXT_UAM_POST_SETTING_DESC; ?></p>
  58. <table class="form-table">
  59.     <tbody>
  60.         <tr valign="top">
  61.             <th scope="row"><?php echo TXT_UAM_HIDE_POST; ?></th>
  62.             <td>
  63.                 <label for="uam_hide_post_yes">
  64.                     <input type="radio" id="uam_hide_post_yes" class="uam_hide_post" name="uam_hide_post" value="true" <?php
  65. if ($aUamOptions['hide_post'] == "true") {
  66.     echo 'checked="checked"';
  67. }
  68.                     ?> />
  69.                     <?php echo TXT_UAM_YES; ?>
  70.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  71.                 <label for="uam_hide_post_no">
  72.                     <input type="radio" id="uam_hide_post_no" class="uam_hide_post" name="uam_hide_post" value="false" <?php
  73. if ($aUamOptions['hide_post'] == "false") {
  74.     echo 'checked="checked"';
  75. }
  76.                     ?> />
  77.                     <?php echo TXT_UAM_NO; ?>
  78.                 </label> <br />
  79.                 <?php echo TXT_UAM_HIDE_POST_DESC; ?>
  80.             </td>
  81.         </tr>
  82.     </tbody>
  83. </table>
  84. <table class="form-table" id="uam_post_settings">
  85.     <tbody>
  86.         <tr valign="top">
  87.             <th scope="row"><?php echo TXT_UAM_DISPLAY_POST_TITLE; ?></th>
  88.             <td>
  89.                 <label for="uam_hide_post_title_yes">
  90.                     <input type="radio" id="uam_hide_post_title_yes" name="uam_hide_post_title" value="true" <?php
  91. if ($aUamOptions['hide_post_title'] == "true") {
  92.     echo 'checked="checked"';
  93. }
  94.                     ?> />
  95.                     <?php echo TXT_UAM_YES; ?>
  96.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  97.                 <label for="uam_hide_post_title_no">
  98.                     <input type="radio" id="uam_hide_post_title_no" name="uam_hide_post_title" value="false" <?php
  99. if ($aUamOptions['hide_post_title'] == "false") {
  100.     echo 'checked="checked"';
  101. }
  102.                     ?> />
  103.                     <?php echo TXT_UAM_NO; ?>
  104.                 </label> <br />
  105.                 <?php echo TXT_UAM_DISPLAY_POST_TITLE_DESC; ?>
  106.             </td>
  107.         </tr>
  108.         <tr valign="top">
  109.             <th scope="row"><?php
  110. echo TXT_UAM_POST_TITLE; ?></th>
  111.             <td>
  112.                 <input name="uam_post_title" value="<?php echo $aUamOptions['post_title']; ?>" /> <br />
  113.                 <?php echo TXT_UAM_POST_TITLE_DESC; ?>
  114.             </td>
  115.         </tr>
  116.         <tr valign="top">
  117.             <th scope="row"><?php echo TXT_UAM_SHOW_POST_CONTENT_BEFORE_MORE; ?></th>
  118.             <td>
  119.                 <label for="uam_show_post_content_before_more_yes">
  120.                     <input type="radio" id="uam_show_post_content_before_more_yes" name="uam_show_post_content_before_more" value="true" <?php
  121. if ($aUamOptions['show_post_content_before_more'] == "true") {
  122.     echo 'checked="checked"';
  123. }
  124.                     ?> />
  125.                     <?php echo TXT_UAM_YES; ?>
  126.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  127.                 <label for="uam_show_post_content_before_more_no">
  128.                     <input type="radio" id="uam_show_post_content_before_more_no" name="uam_show_post_content_before_more" value="false" <?php
  129. if ($aUamOptions['show_post_content_before_more'] == "false") {
  130.     echo 'checked="checked"';
  131. }
  132.                     ?> />
  133.                     <?php echo TXT_UAM_NO; ?>
  134.                 </label> <br />
  135.                 <?php echo TXT_UAM_SHOW_POST_CONTENT_BEFORE_MORE_DESC; ?>
  136.             </td>
  137.         </tr>
  138.         <tr valign="top">
  139.             <th scope="row"><?php echo TXT_UAM_POST_CONTENT; ?></th>
  140.             <td>
  141.                 <textarea name="uam_post_content" style="width: 80%; height: 100px;" cols="40" rows="10"><?php
  142.                     echo apply_filters('format_to_edit', stripslashes($aUamOptions['post_content']));
  143.                 ?></textarea> <br />
  144.                 <?php echo TXT_UAM_POST_CONTENT_DESC; ?>
  145.             </td>
  146.         </tr>
  147.         <tr valign="top">
  148.             <th scope="row"><?php echo TXT_UAM_DISPLAY_POST_COMMENT; ?></th>
  149.             <td>
  150.                 <label for="uam_hide_post_comment_yes">
  151.                     <input id="uam_hide_post_comment_yes" type="radio" name="uam_hide_post_comment" value="true" <?php
  152. if ($aUamOptions['hide_post_comment'] == "true") {
  153.     echo 'checked="checked"';
  154. }
  155.                     ?> />
  156.                     <?php echo TXT_UAM_YES; ?>
  157.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  158.                 <label for="uam_hide_post_comment_no">
  159.                     <input id="uam_hide_post_comment_no" type="radio" name="uam_hide_post_comment" value="false" <?php
  160. if ($aUamOptions['hide_post_comment'] == "false") {
  161.     echo 'checked="checked"';
  162. }
  163.                     ?> />
  164.                     <?php echo TXT_UAM_NO; ?>
  165.                 </label> <br />
  166.                 <?php echo TXT_UAM_DISPLAY_POST_COMMENT_DESC; ?>
  167.             </td>
  168.         </tr>
  169.         <tr valign="top">
  170.             <th scope="row"><?php echo TXT_UAM_POST_COMMENT_CONTENT; ?></th>
  171.             <td>
  172.                 <input name="uam_post_comment_content" value="<?php echo $aUamOptions['post_comment_content']; ?>" /> <br />
  173.                 <?php echo TXT_UAM_POST_COMMENT_CONTENT_DESC; ?>
  174.             </td>
  175.         </tr>
  176.         <tr valign="top">
  177.             <th scope="row"><?php echo TXT_UAM_POST_COMMENTS_LOCKED; ?></th>
  178.             <td>
  179.                 <label for="uam_post_comments_locked_yes">
  180.                     <input id="uam_post_comments_locked_yes" type="radio" name="uam_post_comments_locked" value="true" <?php
  181. if ($aUamOptions['post_comments_locked'] == "true") {
  182.     echo 'checked="checked"';
  183. }
  184.                     ?> />
  185.                     <?php echo TXT_UAM_YES; ?>
  186.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  187.                 <label for="uam_post_comments_locked_no">
  188.                     <input id="uam_post_comments_locked_no" type="radio" name="uam_post_comments_locked" value="false" <?php
  189. if ($aUamOptions['post_comments_locked'] == "false") {
  190.     echo 'checked="checked"';
  191. }
  192.                     ?> />
  193.                     <?php echo TXT_UAM_NO; ?>
  194.                 </label> <br />
  195.                 <?php echo TXT_UAM_POST_COMMENTS_LOCKED_DESC; ?>
  196.             </td>
  197.         </tr>
  198.     </tbody>
  199. </table>
  200. <h3><?php echo TXT_UAM_PAGE_SETTING; ?></h3>
  201. <p><?php echo TXT_UAM_PAGE_SETTING_DESC; ?></p>
  202. <table class="form-table">
  203.     <tbody>
  204.         <tr>
  205.             <th><?php echo TXT_UAM_HIDE_PAGE; ?></th>
  206.             <td>
  207.                 <label for="uam_hide_page_yes">
  208.                 <input type="radio" id="uam_hide_page_yes" class="uam_hide_page" name="uam_hide_page" value="true" <?php
  209. if ($aUamOptions['hide_page'] == "true") {
  210.     echo 'checked="checked"';
  211. }
  212.                     ?> />
  213.                     <?php echo TXT_UAM_YES; ?>
  214.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  215.                 <label for="uam_hide_page_no">
  216.                     <input type="radio" id="uam_hide_page_no" class="uam_hide_page" name="uam_hide_page" value="false" <?php
  217. if ($aUamOptions['hide_page'] == "false") {
  218.     echo 'checked="checked"';
  219. }
  220.                     ?> />
  221.                     <?php echo TXT_UAM_NO; ?>
  222.                 </label> <br />
  223.                 <?php echo TXT_UAM_HIDE_PAGE_DESC; ?>
  224.             </td>
  225.         </tr>
  226.     </tbody>
  227. </table>
  228. <table class="form-table" id="uam_page_settings">
  229.     <tbody>
  230.         <tr valign="top">
  231.             <th scope="row"><?php echo TXT_UAM_DISPLAY_PAGE_TITLE; ?></th>
  232.             <td>
  233.                 <label for="uam_hide_page_title_yes">
  234.                     <input type="radio" id="uam_hide_page_title_yes" name="uam_hide_page_title" value="true" <?php
  235. if ($aUamOptions['hide_page_title'] == "true") {
  236.     echo 'checked="checked"';
  237. }
  238.                     ?> />
  239.                     <?php echo TXT_UAM_YES; ?>
  240.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  241.                 <label for="uam_hide_page_title_no">
  242.                     <input type="radio" id="uam_hide_page_title_no" name="uam_hide_page_title" value="false" <?php
  243. if ($aUamOptions['hide_page_title'] == "false") {
  244.     echo 'checked="checked"';
  245. }
  246.                     ?> />
  247.                     <?php echo TXT_UAM_NO; ?>
  248.                 </label> <br />
  249.                 <?php echo TXT_UAM_DISPLAY_PAGE_TITLE_DESC; ?>
  250.             </td>
  251.         </tr>
  252.         <tr>
  253.             <th><?php echo TXT_UAM_PAGE_TITLE; ?></th>
  254.             <td>
  255.                 <input name="uam_page_title" value="<?php echo $aUamOptions['page_title']; ?>" /> <br />
  256.                 <?php echo TXT_UAM_PAGE_TITLE_DESC; ?>
  257.             </td>
  258.         </tr>
  259.         <tr>
  260.             <th><?php echo TXT_UAM_PAGE_CONTENT; ?></th>
  261.             <td>
  262.                 <textarea name="uam_page_content" style="width: 80%; height: 100px;" cols="40" rows="10" ><?php
  263.                     echo apply_filters('format_to_edit', stripslashes($aUamOptions['page_content']));
  264.                 ?></textarea>
  265.                 <br />
  266.                 <?php echo TXT_UAM_PAGE_CONTENT_DESC; ?>
  267.             </td>
  268.         </tr>
  269.         <tr valign="top">
  270.             <th scope="row"><?php echo TXT_UAM_DISPLAY_PAGE_COMMENT; ?></th>
  271.             <td>
  272.                 <label for="uam_hide_page_comment_yes">
  273.                     <input id="uam_hide_page_comment_yes" type="radio" name="uam_hide_page_comment" value="true" <?php
  274. if ($aUamOptions['hide_page_comment'] == "true") {
  275.     echo 'checked="checked"';
  276. }
  277.                     ?> />
  278.                     <?php echo TXT_UAM_YES; ?>
  279.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  280.                 <label for="uam_hide_page_comment_no">
  281.                     <input id="uam_hide_page_comment_no" type="radio" name="uam_hide_page_comment" value="false" <?php
  282. if ($aUamOptions['hide_page_comment'] == "false") {
  283.     echo 'checked="checked"';
  284. }
  285.                     ?> />
  286.                     <?php echo TXT_UAM_NO; ?>
  287.                 </label> <br />
  288.                 <?php echo TXT_UAM_DISPLAY_PAGE_COMMENT_DESC; ?>
  289.             </td>
  290.         </tr>
  291.         <tr valign="top">
  292.             <th scope="row"><?php echo TXT_UAM_PAGE_COMMENT_CONTENT; ?></th>
  293.             <td>
  294.                 <input name="uam_page_comment_content" value="<?php echo $aUamOptions['page_comment_content']; ?>" /> <br />
  295.                 <?php echo TXT_UAM_PAGE_COMMENT_CONTENT_DESC; ?>
  296.             </td>
  297.         </tr>
  298.         <tr valign="top">
  299.             <th scope="row"><?php echo TXT_UAM_PAGE_COMMENTS_LOCKED; ?></th>
  300.             <td>
  301.                 <label for="uam_page_comments_locked_yes">
  302.                     <input id="uam_page_comments_locked_yes" type="radio" name="uam_page_comments_locked" value="true" <?php
  303. if ($aUamOptions['page_comments_locked'] == "true") {
  304.     echo 'checked="checked"';
  305. }
  306.                     ?> />
  307.                     <?php echo TXT_UAM_YES; ?>
  308.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  309.                 <label for="uam_page_comments_locked_no">
  310.                     <input id="uam_page_comments_locked_no" type="radio" name="uam_page_comments_locked" value="false" <?php
  311. if ($aUamOptions['page_comments_locked'] == "false") {
  312.     echo 'checked="checked"';
  313. }
  314.                     ?> />
  315.                     <?php echo TXT_UAM_NO; ?>
  316.                 </label> <br />
  317.                 <?php echo TXT_UAM_PAGE_COMMENTS_LOCKED_DESC; ?>
  318.             </td>
  319.         </tr>
  320.     </tbody>
  321. </table>
  322. <h3><?php echo TXT_UAM_FILE_SETTING; ?></h3>
  323. <p><?php echo TXT_UAM_FILE_SETTING_DESC; ?></p>
  324. <table class="form-table">
  325.     <tbody>
  326.         <tr>
  327.             <th><?php echo TXT_UAM_LOCK_FILE; ?></th>
  328.             <td>
  329.                 <label for="uam_lock_file_yes">
  330.                     <input type="radio" id="uam_lock_file_yes" class="uam_lock_file" name="uam_lock_file" value="true" <?php
  331. if ($aUamOptions['lock_file'] == "true") {
  332.     echo 'checked="checked"';
  333. }                  
  334.                     ?> />
  335.                     <?php echo TXT_UAM_YES; ?>
  336.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  337.                 <label for="uam_lock_file_no">
  338.                     <input type="radio" id="uam_lock_file_no" class="uam_lock_file" name="uam_lock_file" value="false" <?php
  339. if ($aUamOptions['lock_file'] == "false") {
  340.     echo 'checked="checked"';
  341. }
  342.                     ?> />
  343.                     <?php echo TXT_UAM_NO; ?>
  344.                 </label> <br />
  345.                 <?php echo TXT_UAM_LOCK_FILE_DESC; ?>
  346.             </td>
  347.         </tr>
  348.     </tbody>
  349. </table>
  350. <table class="form-table" id="uam_file_settings">
  351.     <tbody>
  352. <?php
  353. $sPermanentLinkStructure = get_option('permalink_structure');
  354.            
  355. if (empty($sPermanentLinkStructure)) {
  356.     ?>
  357.         <tr>
  358.             <th><?php
  359.     echo TXT_UAM_DOWNLOAD_FILE_TYPE; ?></th>
  360.             <td>
  361.                 <label for="uam_lock_file_types_all">
  362.                     <input type="radio" id="uam_lock_file_types_all" name="uam_lock_file_types" value="all" <?php
  363.     if ($aUamOptions['lock_file_types'] == "all") {
  364.         echo 'checked="checked"';
  365.     }                   ?> />
  366.                     <?php echo TXT_UAM_ALL; ?>
  367.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  368.                 <label for="uam_lock_file_types_selected">
  369.                     <input type="radio" id="uam_lock_file_types_selected" name="uam_lock_file_types" value="selected" <?php
  370.     if ($aUamOptions['lock_file_types'] == "selected") {
  371.         echo 'checked="checked"';
  372.     }
  373.                     ?> />
  374.                     <?php echo TXT_UAM_SELECTED_FILE_TYPES; ?>
  375.                 </label>
  376.                 <input name="uam_locked_file_types" value="<?php echo $aUamOptions['locked_file_types']; ?>" />
  377.                 <label for="uam_lock_file_types_not_selected">
  378.                     <input type="radio" id="uam_lock_file_types_not_selected" name="uam_lock_file_types" value="not_selected" <?php
  379.     if ($aUamOptions['lock_file_types'] == "not_selected") {
  380.         echo 'checked="checked"';
  381.     }
  382.                     ?> />
  383.                     <?php echo TXT_UAM_NOT_SELECTED_FILE_TYPES; ?>
  384.                 </label>
  385.                 <input name="uam_not_locked_file_types" value="<?php echo $aUamOptions['not_locked_file_types']; ?>" /> <br />
  386.                 <?php echo TXT_UAM_DOWNLOAD_FILE_TYPE_DESC; ?>
  387.             </td>
  388.         </tr>
  389.         <tr>
  390.             <th><?php echo TXT_UAM_FILE_PASS_TYPE; ?></th>
  391.             <td>
  392.                 <label for="uam_file_pass_type_admin">
  393.                     <input type="radio" id="uam_file_pass_type_admin" name="uam_file_pass_type" value="admin" <?php
  394.     if ($aUamOptions['file_pass_type'] == "admin") {
  395.         echo 'checked="checked"';
  396.     }
  397.                     ?> />
  398.                     <?php echo TXT_UAM_CURRENT_LOGGEDIN_ADMIN_PASS; ?>
  399.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  400.                 <label for="uam_file_pass_type_random">
  401.                     <input type="radio" id="uam_file_pass_type_random" name="uam_file_pass_type" value="random" <?php
  402.     if ($aUamOptions['file_pass_type'] == "random") {
  403.         echo 'checked="checked"';
  404.     }
  405.                     ?> />
  406.                     <?php echo TXT_UAM_RANDOM_PASS; ?>
  407.                 </label> <br />
  408.                 <?php echo TXT_UAM_FILE_PASS_TYPE_DESC; ?>
  409.             </td>
  410.         </tr>
  411.     <?php
  412. }
  413. ?>
  414.         <tr>
  415.             <th><?php echo TXT_UAM_DOWNLOAD_TYPE; ?></th>
  416.             <td>
  417.                 <label for="uam_download_type_normal">
  418.                     <input type="radio" id="uam_download_type_normal" name="uam_download_type" value="normal" <?php
  419. if ($aUamOptions['download_type'] == "normal") {
  420.     echo 'checked="checked"';
  421. }
  422.                     ?> />
  423.                     <?php echo TXT_UAM_NORMAL; ?>
  424.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  425.                 <label for="uam_download_type_fopen">
  426.                     <input type="radio" id="uam_download_type_fopen" name="uam_download_type" value="fopen" <?php
  427. if ($aUamOptions['download_type'] == "fopen") {
  428.     echo 'checked="checked"';
  429. }
  430.                     ?> />
  431.                     <?php echo TXT_UAM_FOPEN; ?>
  432.                 </label> <br />
  433.                 <?php echo TXT_UAM_DOWNLOAD_TYPE_DESC; ?>
  434.             </td>
  435.         </tr>
  436.     </tbody>
  437. </table>
  438. <h3><?php echo TXT_UAM_AUTHOR_SETTING; ?></h3>
  439. <p><?php echo TXT_UAM_AUTHOR_SETTING_DESC; ?></p>
  440. <table class="form-table">
  441.     <tbody>
  442.         <tr>
  443.             <th><?php echo TXT_UAM_AUTHORS_HAS_ACCESS_TO_OWN; ?></th>
  444.             <td>
  445.                 <label for="uam_authors_has_access_to_own_yes">
  446.                     <input type="radio" id="uam_authors_has_access_to_own_yes" name="uam_authors_has_access_to_own" value="true" <?php
  447. if ($aUamOptions['authors_has_access_to_own'] == "true") {
  448.     echo 'checked="checked"';
  449. }
  450.                     ?> />
  451.                     <?php echo TXT_UAM_YES; ?>
  452.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  453.                 <label for="uam_authors_has_access_to_own_no">
  454.                     <input type="radio" id="uam_authors_has_access_to_own_no" name="uam_authors_has_access_to_own" value="false" <?php
  455. if ($aUamOptions['authors_has_access_to_own'] == "false") {
  456.     echo 'checked="checked"';
  457. }
  458.                     ?> />
  459.                     <?php echo TXT_UAM_NO; ?>
  460.                 </label> <br />
  461.                 <?php echo TXT_UAM_AUTHORS_HAS_ACCESS_TO_OWN_DESC; ?></td>
  462.         </tr>
  463.         <tr>
  464.             <th><?php echo TXT_UAM_AUTHORS_CAN_ADD_POSTS_TO_GROUPS; ?></th>
  465.             <td>
  466.                 <label for="uam_authors_can_add_posts_to_groups_yes">
  467.                     <input type="radio" id="uam_authors_can_add_posts_to_groups_yes" name="uam_authors_can_add_posts_to_groups" value="true" <?php
  468. if ($aUamOptions['authors_can_add_posts_to_groups'] == "true") {
  469.     echo 'checked="checked"';
  470. }
  471.                     ?> />
  472.                     <?php echo TXT_UAM_YES; ?>
  473.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  474.                 <label for="uam_authors_can_add_posts_to_groups_no">
  475.                     <input type="radio" id="uam_authors_can_add_posts_to_groups_no" name="uam_authors_can_add_posts_to_groups" value="false" <?php
  476. if ($aUamOptions['authors_can_add_posts_to_groups'] == "false") {
  477.     echo 'checked="checked"';
  478. }
  479.                     ?> />
  480.                     <?php echo TXT_UAM_NO; ?>
  481.                 </label> <br />
  482.                 <?php echo TXT_UAM_AUTHORS_CAN_ADD_POSTS_TO_GROUPS_DESC; ?></td>
  483.         </tr>
  484.         <tr>
  485.             <th><?php echo TXT_UAM_FULL_ACCESS_ROLE; ?></th>
  486.             <td>
  487.                 <select name="uam_full_access_role">
  488.                     <option value="administrator" <?php
  489. if ($aUamOptions['full_access_role'] == "administrator") {
  490.     echo 'selected="selected"';
  491. }
  492.                     ?>><?php echo TXT_UAM_ADMINISTRATOR; ?></option>
  493.                     <option value="editor" <?php
  494. if ($aUamOptions['full_access_role'] == "editor") {
  495.     echo 'selected="selected"';
  496. }
  497.                     ?>><?php echo TXT_UAM_EDITOR; ?></option>
  498.                     <option value="author" <?php
  499. if ($aUamOptions['full_access_role'] == "author") {
  500.     echo 'selected="selected"';
  501. }
  502.                     ?>><?php echo TXT_UAM_AUTHOR; ?></option>
  503.                     <option value="contributor" <?php
  504. if ($aUamOptions['full_access_role'] == "contributor") {
  505.     echo 'selected="selected"';
  506. }
  507.                     ?>><?php echo TXT_UAM_CONTRIBUTOR; ?></option>
  508.                     <option value="subscriber" <?php
  509. if ($aUamOptions['full_access_role'] == "subscriber") {
  510.     echo 'selected="selected"';
  511. }
  512.                     ?>><?php echo TXT_UAM_SUBSCRIBER; ?></option>
  513.                 </select><br />
  514.                 <?php echo TXT_UAM_FULL_ACCESS_ROLE_DESC; ?>
  515.             </td>
  516.         </tr>
  517.     </tbody>
  518. </table>
  519. <h3><?php echo TXT_UAM_OTHER_SETTING; ?></h3>
  520. <p><?php echo TXT_UAM_OTHER_SETTING_DESC; ?></p>
  521. <table class="form-table">
  522.     <tbody>
  523.         <tr>
  524.             <th><?php echo TXT_UAM_PROTECT_FEED; ?></th>
  525.             <td>
  526.                 <label for="uam_protect_feed_yes">
  527.                     <input type="radio" id="uam_protect_feed_yes" name="uam_protect_feed" value="true" <?php
  528. if ($aUamOptions['protect_feed'] == "true") {
  529.     echo 'checked="checked"';
  530. }
  531.                     ?> />
  532.                     <?php echo TXT_UAM_YES; ?>
  533.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  534.                 <label for="uam_protect_feed_no">
  535.                     <input type="radio" id="uam_protect_feed_no" name="uam_protect_feed" value="false" <?php
  536. if ($aUamOptions['protect_feed'] == "false") {
  537.     echo 'checked="checked"';
  538. }
  539.                     ?> />
  540.                 <?php echo TXT_UAM_NO; ?>
  541.                 </label> <br />
  542.                 <?php echo TXT_UAM_PROTECT_FEED_DESC; ?>
  543.             </td>
  544.         </tr>
  545.         <tr>
  546.             <th><?php echo TXT_UAM_HIDE_EMPTY_CATEGORIES; ?></th>
  547.             <td>
  548.                 <label for="uam_hide_empty_categories_yes">
  549.                     <input type="radio" id="uam_hide_empty_categories_yes" name="uam_hide_empty_categories" value="true" <?php
  550. if ($aUamOptions['hide_empty_categories'] == "true") {
  551.     echo 'checked="checked"';
  552. }
  553.                     ?> />
  554.                     <?php echo TXT_UAM_YES; ?>
  555.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  556.                 <label for="uam_hide_empty_categories_no">
  557.                     <input type="radio" id="uam_hide_empty_categories_no" name="uam_hide_empty_categories" value="false" <?php
  558. if ($aUamOptions['hide_empty_categories'] == "false") {
  559.     echo 'checked="checked"';
  560. }
  561.                     ?> />
  562.                     <?php echo TXT_UAM_NO; ?>
  563.                 </label> <br />
  564.                 <?php echo TXT_UAM_HIDE_EMPTY_CATEGORIES_DESC; ?>
  565.             </td>
  566.         </tr>
  567.         <tr>
  568.             <th><?php echo TXT_UAM_REDIRECT; ?></th>
  569.             <td>
  570.                 <label for="uam_redirect_no">
  571.                     <input type="radio" id="uam_redirect_no" name="uam_redirect" value="false" <?php
  572. if ($aUamOptions['redirect'] == "false") {
  573.     echo 'checked="checked"';
  574. }
  575.                     ?> />
  576.                     <?php echo TXT_UAM_NO; ?>
  577.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  578.                 <label for="uam_redirect_blog">
  579.                     <input type="radio" id="uam_redirect_blog" name="uam_redirect" value="blog" <?php
  580. if ($aUamOptions['redirect'] == "blog") {
  581.     echo 'checked="checked"';
  582. }
  583.                     ?> />
  584.                     <?php echo TXT_UAM_REDIRECT_TO_BLOG; ?>
  585.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  586.                 <label for="uam_redirect_custom_page">
  587.                     <input type="radio" id="uam_redirect_custom_page" name="uam_redirect" value="custom_page" <?php
  588. if ($aUamOptions['redirect'] == "custom_page") {
  589.     echo 'checked="checked"';
  590. }
  591.                     ?> />
  592.                     <?php echo TXT_UAM_REDIRECT_TO_PAGE; ?>    
  593.                 </label>
  594.                 <select name="uam_redirect_custom_page">
  595. <?php
  596. $aPages = get_pages('sort_column=menu_order');
  597. if (isset($aPages)) {
  598.     foreach ($aPages as $oPage) {
  599.         echo '<option value="' . $oPage->ID.'"';
  600.         if ($aUamOptions['redirect_custom_page'] == $oPage->ID) {
  601.             echo ' selected="selected"';
  602.         }
  603.         echo '>' . $oPage->post_title . '</option>';
  604.     }
  605. }
  606. ?>
  607.                 </select>&nbsp;&nbsp;&nbsp;&nbsp;
  608.                 <label for="uam_redirect_custom_url">
  609.                     <input type="radio" id="uam_redirect_custom_url" name="uam_redirect" value="custom_url" <?php
  610. if ($aUamOptions['redirect'] == "custom_url") {
  611.     echo 'checked="checked"';
  612. }
  613.                     ?> />
  614.                     <?php echo TXT_UAM_REDIRECT_TO_URL; ?>
  615.                 </label>
  616.                 <input name="uam_redirect_custom_url" value="<?php echo $aUamOptions['redirect_custom_url']; ?>" /> <br />
  617.                 <?php echo TXT_UAM_REDIRECT_DESC; ?>
  618.             </td>
  619.         </tr>
  620.         <tr>
  621.             <th><?php echo TXT_UAM_LOCK_RECURSIVE; ?></th>
  622.             <td>
  623.                 <label for="uam_lock_recursive_yes">
  624.                     <input type="radio" id="uam_lock_recursive_yes" name="uam_lock_recursive" value="true" <?php
  625. if ($aUamOptions['lock_recursive'] == "true") {
  626.     echo 'checked="checked"';
  627. }
  628.                     ?> />
  629.                     <?php echo TXT_UAM_YES; ?>
  630.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  631.                 <label for="uam_lock_recursive_no">
  632.                     <input type="radio" id="uam_lock_recursive_no" name="uam_lock_recursive" value="false" <?php
  633. if ($aUamOptions['lock_recursive'] == "false") {
  634.     echo 'checked="checked"';
  635. }
  636.                     ?> />
  637.                     <?php echo TXT_UAM_NO; ?>
  638.                 </label> <br />
  639.                 <?php echo TXT_UAM_LOCK_RECURSIVE_DESC; ?></td>
  640.         </tr>
  641.         <tr>
  642.             <th><?php echo TXT_UAM_BLOG_ADMIN_HINT; ?></th>
  643.             <td>
  644.                 <label for="uam_blog_admin_hint_yes">
  645.                     <input type="radio" id="uam_blog_admin_hint_yes" name="uam_blog_admin_hint" value="true" <?php
  646. if ($aUamOptions['blog_admin_hint'] == "true") {
  647.     echo 'checked="checked"';
  648. }
  649.                     ?> />
  650.                     <?php echo TXT_UAM_YES; ?>
  651.                 </label>&nbsp;&nbsp;&nbsp;&nbsp;
  652.                 <label for="uam_blog_admin_hint_no">
  653.                     <input type="radio" id="uam_blog_admin_hint_no" name="uam_blog_admin_hint" value="false" <?php
  654. if ($aUamOptions['blog_admin_hint'] == "false") {
  655.     echo 'checked="checked"';
  656. }
  657.                     ?> />
  658.                     <?php echo TXT_UAM_NO; ?>
  659.                 </label> <br />
  660.                 <?php echo TXT_UAM_BLOG_ADMIN_HINT_DESC; ?>
  661.             </td>
  662.         </tr>
  663.         <tr>
  664.             <th><?php echo TXT_UAM_BLOG_ADMIN_HINT_TEXT; ?></th>
  665.             <td>
  666.                 <input name="uam_blog_admin_hint_text" value="<?php echo $aUamOptions['blog_admin_hint_text']; ?>" /> <br />
  667.                 <?php echo TXT_UAM_BLOG_ADMIN_HINT_TEXT_DESC; ?>
  668.             </td>
  669.         </tr>
  670.     </tbody>
  671. </table>
  672. <div class="submit">
  673.     <input type="submit" name="update_uam_settings" value="<?php echo TXT_UAM_UPDATE_SETTING; ?>" />
  674. </div>
  675. </form>
  676. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement