Changeset 2250354
- Timestamp:
- 02/26/2020 03:29:47 AM (6 years ago)
- Location:
- sudo-oauth/trunk
- Files:
-
- 5 edited
-
icon.png (modified) (previous)
-
includes/admin.php (modified) (8 diffs)
-
lib/main.js (modified) (1 diff)
-
lib/style.css (modified) (1 diff)
-
sudo-oauth.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sudo-oauth/trunk/includes/admin.php
r2250336 r2250354 22 22 ?> 23 23 <div class="wrap"> 24 <h2><?php _e(' Thông tin client kết nối với ID'); ?></h2>25 <p><?php _e('Nhập thông tin được thống nhất và cấp bởi ID'); ?></p>24 <h2><?php _e('Cấu hình Sudo Oauth'); ?></h2> 25 <p><?php _e('Nhập thông tin client name & key được cấp bởi chủ hệ thống để kết nối website. Liên hệ caotu@sudo.vn để được hỗ trợ.'); ?></p> 26 26 <?php if( isset($_GET['settings-updated']) ) { ?> 27 27 <div id="message" class="updated"> … … 32 32 <?php settings_fields( 'sudooauth-settings-group' ); ?> 33 33 <table class="form-table"> 34 <tr> 35 <th scope="row" class="check_plugin"><label for="sudooauth_option_activeplugin"><?php _e('Kích hoạt plugin'); ?></label></th> 36 <td> 37 <input type="checkbox" id="sudooauth_option_activeplugin" name="sudooauth_option_activeplugin" value="1"<?php echo get_option('sudooauth_option_activeplugin') == '1' ? ' checked="checked"' : ''; ?> /> <?php _e('Đồng ý (bỏ tick để không kích hoạt)'); ?> 38 </td> 39 </tr> 34 40 <tr> 35 41 <th scope="row"><label for="sudooauth_option_name"><?php _e('Client name'); ?></label></th> 36 <td><input type="text" id="sudooauth_option_name" name="sudooauth_option_name" value="<?php echo get_option('sudooauth_option_name') ;?>" class="regular-text"/></td>42 <td><input type="text" id="sudooauth_option_name" name="sudooauth_option_name" value="<?php echo get_option('sudooauth_option_name') != '' ? get_option('sudooauth_option_name') : 'f-p-t.com';?>" class="regular-text"/></td> 37 43 </tr> 38 44 <tr> 39 45 <th scope="row"><label for="sudooauth_option_pwd"><?php _e('Client key'); ?></label></th> 40 <td><input type="text" id="sudooauth_option_pwd" name="sudooauth_option_pwd" value="<?php echo get_option('sudooauth_option_pwd') ;?>" class="regular-text"/></td>46 <td><input type="text" id="sudooauth_option_pwd" name="sudooauth_option_pwd" value="<?php echo get_option('sudooauth_option_pwd') !='' ? get_option('sudooauth_option_pwd') : '0hsdfssy74rbfvfvdvdvfd4vg343';?>" class="regular-text"/></td> 41 47 </tr> 42 48 <tr> … … 45 51 </tr> 46 52 <tr> 47 <th scope="row"><label for="sudooauth_option_uploadfiles"><?php _e('Cho phép t hành viên từ hệ thống uploadảnh'); ?></label></th>53 <th scope="row"><label for="sudooauth_option_uploadfiles"><?php _e('Cho phép tải ảnh'); ?></label></th> 48 54 <td> 49 <input type="checkbox" id="sudooauth_option_uploadfiles" name="sudooauth_option_uploadfiles" value="1"<?php echo get_option('sudooauth_option_uploadfiles') == '1' ? ' checked="checked"' : ''; ?> /> <?php _e(' Tick để cho phép'); ?>55 <input type="checkbox" id="sudooauth_option_uploadfiles" name="sudooauth_option_uploadfiles" value="1"<?php echo get_option('sudooauth_option_uploadfiles') == '1' ? ' checked="checked"' : ''; ?> /> <?php _e('Đồng ý (bỏ tick để không kích hoạt)'); ?> 50 56 </td> 51 57 </tr> 52 58 <tr> 53 <th scope="row"><label for="sudooauth_option_limitpost"><?php _e(' Tài khoản kết nối được đăng bao nhiêu bài mộtngày'); ?></label></th>59 <th scope="row"><label for="sudooauth_option_limitpost"><?php _e('Số lượng bài được đăng / ngày'); ?></label></th> 54 60 <td> 55 61 <div class="number-input"> … … 60 66 </tr> 61 67 <tr> 62 <th scope="row"><label for="sudooauth_option_multicat"><?php _e(' Chọn danh mục tài khoản kết nối được phép postbài'); ?></label></th>68 <th scope="row"><label for="sudooauth_option_multicat"><?php _e('Danh mục được phép đăng bài'); ?></label></th> 63 69 <td> 64 70 <?php … … 72 78 <div id="side-sortables" class="metabox-holder" style="float:left; padding:5px;"> 73 79 <div class="postbox"> 74 <h3 class="hndle"><span><?php _e(' Giới hạn đa danh mục'); ?></span></h3>80 <h3 class="hndle"><span><?php _e('Nhấp để chọn'); ?></span></h3> 75 81 76 82 <div class="inside" style="padding:0 10px;"> … … 98 104 </tr> 99 105 <tr> 100 <th scope="row"><label for="sudooauth_option_link_number"><?php _e('Số l ượng link tối đa cho tài khoản liên kết viết bài sử dụng'); ?></label></th>106 <th scope="row"><label for="sudooauth_option_link_number"><?php _e('Số link tối đa trong bài'); ?></label></th> 101 107 <td> 102 108 <div class="number-input"> … … 107 113 </tr> 108 114 <tr> 109 <th scope="row"><label for="sudooauth_option_nofolow_number"><?php _e('Số lượng link tối đa sử dụngnofollow'); ?></label></th>115 <th scope="row"><label for="sudooauth_option_nofolow_number"><?php _e('Số lượng link nofollow'); ?></label></th> 110 116 <td> 111 117 <div class="number-input"> … … 116 122 </td> 117 123 </tr> 118 <tr>119 <th scope="row"><label for="sudooauth_option_activeplugin"><?php _e('Bật tắt plugin'); ?></label></th>120 <td>121 <div class="input-active">122 <input type="radio" id="sudooauth_option_activeplugin" name="sudooauth_option_activeplugin" value="1"<?php echo get_option('sudooauth_option_activeplugin') == '1' ? ' checked="checked"' : ''; ?> /> <?php _e('Tick để tắt plugin'); ?>123 <input type="radio" id="sudooauth_option_activeplugin_off" name="sudooauth_option_activeplugin" value="2"<?php echo get_option('sudooauth_option_activeplugin') == '2' ? ' checked="checked"' : ''; ?> />124 <?php _e('Tick để bật plugin'); ?>125 </div>126 <div class="check-plugin">127 <label for="sudooauth_option_activeplugin" class="<?php echo get_option('sudooauth_option_activeplugin') == '1' ? 'active' : ''; ?>"><?php _e('Đang Bật '); ?></label>128 <label for="sudooauth_option_activeplugin_off" class="<?php echo get_option('sudooauth_option_activeplugin') == '2' ? 'active' : ''; ?>"><?php _e('Đang Tắt'); ?></label>129 </div>130 </td>131 </tr>132 124 </table> 133 125 <?php submit_button(); ?> -
sudo-oauth/trunk/lib/main.js
r2250336 r2250354 18 18 $( this ).parent().find('input').val(number); 19 19 }); 20 $('.check-plugin label').on('click',function(){21 $( this ).parent().find('label').removeClass('active');22 $( this ).addClass('active');23 });24 20 }); 25 21 -
sudo-oauth/trunk/lib/style.css
r2250336 r2250354 1 #toplevel_page_sudo-oauth-includes-admin img { 2 width: 36px; 3 height: 36px; 4 object-fit: contain; 5 } 1 6 .number-input { 2 7 display: flex; -
sudo-oauth/trunk/sudo-oauth.php
r2250336 r2250354 213 213 // decative or active plugin 214 214 function deactivate_plugin_conditional() { 215 $active_plugin = get_option('sudooauth_option_activeplugin',1); 216 if(empty($active_plugin)) update_option( 'sudooauth_option_activeplugin', 2 ); 217 if($active_plugin == 1 ){ 218 if(current_user_can('sudooauth_author')): 219 global $pagenow; 220 /* Check current admin page. */ 221 if($pagenow == 'post-new.php'){ 222 wp_logout(); 223 echo '<meta http-equiv="Content-Type" content="text/html"; charset="utf-8">'; 224 echo "<center>"; 225 echo '<br /><br />Sudo Oauth hiện đang ngừng sử dụng với website này.<br /><br />Hệ thống tự động trở về trang chủ sau 5 giây!</a>'; 226 echo "</center>"; 227 header( "refresh:5;url='".home_url()."'" ); 228 exit(); 229 } 230 endif; 215 // $active_plugin = get_option('sudooauth_option_activeplugin',1); 216 if(get_option('sudooauth_option_activeplugin') != '1' ){ 217 if(current_user_can('sudooauth_author')): 218 global $pagenow; 219 /* Check current admin page. */ 220 if($pagenow == 'post-new.php'){ 221 wp_logout(); 222 echo '<meta http-equiv="Content-Type" content="text/html"; charset="utf-8">'; 223 echo "<center>"; 224 echo '<br /><br />Sudo Oauth hiện đang ngừng sử dụng với website này.<br /><br />Hệ thống tự động trở về trang chủ sau 5 giây!</a>'; 225 echo "</center>"; 226 header( "refresh:5;url='".home_url()."'" ); 227 exit(); 228 } 229 endif; 231 230 } 232 231
Note: See TracChangeset
for help on using the changeset viewer.