|
20 | 20 | layout_page_header( plugin_lang_get( 'name_plugin_description_page' ) ); |
21 | 21 | layout_page_begin( 'manage_overview_page.php' ); |
22 | 22 | print_manage_menu( 'manage_plugin_page.php' ); |
| 23 | +telegrambot_print_menu_config( 'config_page' ); |
23 | 24 | ?> |
24 | 25 |
|
25 | 26 | <div class="col-md-12 col-xs-12"> |
|
85 | 86 | </td> |
86 | 87 | </tr> |
87 | 88 |
|
| 89 | + <?php |
| 90 | + $t_curl_version = curl_version(); |
| 91 | +// $t_curl_version = '7.19.7'; |
| 92 | + if( $t_curl_version['version'] >= '7.21.7' ) { ?> |
| 93 | + <tr <?php echo helper_alternate_class() ?>> |
| 94 | + <th class="category" width="5%"> |
| 95 | + <?php echo plugin_lang_get( 'proxy_address_header' ) ?> |
| 96 | + </th> |
| 97 | + <td class="center" colspan="1"> |
| 98 | + <textarea name="proxy_address" id="proxy_address" class="form-control" rows="1"><?php echo plugin_config_get( 'proxy_address' ) == NULL ? '' : plugin_config_get( 'proxy_address' ) ?></textarea> |
| 99 | + </td> |
| 100 | + </tr> |
| 101 | + <?php |
| 102 | + } else { ?> |
| 103 | + <tr <?php echo helper_alternate_class() ?>> |
| 104 | + <th class="category" width="5%"> |
| 105 | + <?php echo plugin_lang_get( 'proxy_address_header' ) ?> |
| 106 | + </th> |
| 107 | + <td class="center" colspan="1"> |
| 108 | + <textarea name="proxy_address" id="proxy_address" class="form-control" rows="1" disabled="true"><?php echo plugin_lang_get( 'ERROR_CURL_VERSION' ) ?></textarea> |
| 109 | + </td> |
| 110 | + </tr> |
| 111 | + <?php |
| 112 | + } ?> |
| 113 | + |
88 | 114 | <tr <?php echo helper_alternate_class() ?>> |
89 | 115 | <th class="category" width="5%"> |
90 | | - <?php echo plugin_lang_get( 'proxy_address_header' ) ?> |
| 116 | + <?php echo plugin_lang_get( 'debug_connection_log_path_title' ) ?> |
91 | 117 | </th> |
92 | 118 | <td class="center" colspan="1"> |
93 | | - <textarea name="proxy_address" id="proxy_address" class="form-control" rows="1"><?php echo plugin_config_get( 'proxy_address' ) == NULL ? '' : plugin_config_get( 'proxy_address' ) ?></textarea> |
| 119 | + <textarea name="debug_connection_log_path" id="debug_connection_log_path" class="form-control" rows="1"><?php echo plugin_config_get( 'debug_connection_log_path' ) ?></textarea> |
94 | 120 | </td> |
95 | 121 | </tr> |
96 | | - |
97 | | - <?php |
98 | | - $t_bot_name = plugin_config_get( 'bot_name' ); |
99 | | - $t_api_key = plugin_config_get( 'api_key' ); |
100 | | - |
101 | | - if( $t_bot_name && $t_api_key ) { |
102 | | - |
103 | | - try { |
104 | | - telegram_session_start(); |
105 | | - $t_result = Longman\TelegramBot\Request::getWebhookInfo(); |
106 | | - $t_webhook_url = $t_result->result->getUrl(); |
107 | | - } catch( Longman\TelegramBot\Exception\TelegramException $t_errors ) { |
108 | | - $t_webhook_url = $t_errors->getMessage(); |
109 | | - } |
110 | | - |
111 | | - if( $t_webhook_url ) { |
112 | | - ?> |
113 | | - |
114 | | - <tr <?php echo helper_alternate_class() ?>> |
115 | | - <td class="category" width="50%"> |
116 | | - <?php echo plugin_lang_get( 'current_config' ) ?> |
117 | | - </td> |
118 | | - |
119 | | - <td colspan="2"> |
120 | | - |
121 | | - <div class = "fallback"> |
122 | | - <!-- <pre>--> |
123 | | - <?php |
124 | | - print_r( $t_webhook_url ); |
125 | | - ?> |
126 | | - <!--</pre>--> |
127 | | - </div> |
128 | | - |
129 | | - </td> |
130 | | - </tr> |
131 | | - <?php |
132 | | - } |
133 | | - } |
134 | | - ?> |
135 | | - |
136 | | - <tr <?php echo helper_alternate_class() ?>> |
| 122 | + |
| 123 | + <tr <?php echo helper_alternate_class() ?>> |
137 | 124 | <th class="category" width="5%"> |
138 | | - <?php echo plugin_lang_get( 'account_telegram_prefs_associated_users_head' ) ?> |
| 125 | + <?php echo plugin_lang_get( 'debug_connection_enabled' ) ?> |
139 | 126 | </th> |
140 | | - <td class="left" colspan="1"> |
141 | | - |
142 | | - <p> |
143 | | - <?php |
144 | | - $t_associated_user_ids = telegram_bot_associated_all_users_get(); |
145 | | - foreach( $t_associated_user_ids as $t_user_id ) { |
146 | | - echo user_get_field( $t_user_id, 'username' ) . '</br>'; |
147 | | - } |
148 | | - ?> |
149 | | - </p> |
150 | | - |
| 127 | + <td> |
| 128 | + <label class="inline"> |
| 129 | + <input type="checkbox" class="ace" id="debug_connection_enabled" name="debug_connection_enabled" <?php check_checked( (int)plugin_config_get( 'debug_connection_enabled' ), ON ); ?> /> |
| 130 | + <span class="lbl"></span> |
| 131 | + </label> |
151 | 132 | </td> |
152 | 133 | </tr> |
153 | 134 |
|
|
0 commit comments