connection.php
2 years ago
fapiMemberLoginPage.php
2 years ago
index.php
2 years ago
levelSelection.php
2 years ago
memberList.php
2 years ago
settingsContentAdd.php
2 years ago
settingsContentRemove.php
2 years ago
settingsContentSelect.php
2 years ago
settingsElements.php
2 years ago
settingsEmails.php
2 years ago
settingsLevelNew.php
2 years ago
settingsPages.php
2 years ago
settingsSectionNew.php
2 years ago
settingsSettings.php
2 years ago
settingsUnlocking.php
2 years ago
test.php
2 years ago
connection.php
79 lines
| 1 | <?php |
| 2 | |
| 3 | global $FapiPlugin; |
| 4 | global $apiService; |
| 5 | |
| 6 | use FapiMember\Deprecated\FapiMemberTools; |
| 7 | use FapiMember\Model\Enums\Keys\OptionKey; |
| 8 | use FapiMember\Utils\AlertProvider; |
| 9 | |
| 10 | echo FapiMemberTools::heading(); |
| 11 | |
| 12 | ?> |
| 13 | <div class="page"> |
| 14 | <?php echo AlertProvider::showErrors(); ?> |
| 15 | <h3><?php echo __( 'Propojené účty FAPI:', 'fapi-member' ); ?></h3> |
| 16 | <?php echo FapiMemberTools::formStart('api_credentials_remove') ?> |
| 17 | <table class="wp-list-table widefat fixed striped table-view-list"> |
| 18 | <tr> |
| 19 | <th><?php _e( 'Uživatelské jméno (e-mail)', 'fapi-member' ); ?></th> |
| 20 | <th><?php _e( 'API klíč', 'fapi-member' ); ?></th> |
| 21 | <th class="disconnectColumn"></th> |
| 22 | </tr> |
| 23 | <?php |
| 24 | $accounts = $apiService->getApiClients(); |
| 25 | if (empty($accounts) || $accounts[0]->getConnection()->getApiKey() === null){ |
| 26 | echo '<tr> |
| 27 | <td></td> |
| 28 | <td>'.__( 'Nejsou propojeny žádné účty', 'fapi-member' ).'</td> |
| 29 | <td></td> |
| 30 | </tr>'; |
| 31 | } else { |
| 32 | foreach ($accounts as $account){ |
| 33 | echo '<tr> |
| 34 | <td>'.$account->getConnection()->getApiUser().'</td> |
| 35 | <td>'.$account->getConnection()->getApiKey().'</td> |
| 36 | <td>'. |
| 37 | '<button class ="btn outline" name="fapiRemoveCredentials" type="submit" value='.$account->getConnection()->getApiKey().'>'. |
| 38 | __( 'Smazat propojení s FAPI' , 'fapi-member' );'. |
| 39 | </button> |
| 40 | </td> |
| 41 | </tr>'; |
| 42 | } |
| 43 | } |
| 44 | ?> |
| 45 | </table> |
| 46 | </form> |
| 47 | <?php echo FapiMemberTools::formStart('api_credentials_submit') ;?> |
| 48 | <h3><?php echo __( 'Propojit účet FAPI (max. '. $FapiPlugin::CONNECTED_API_KEYS_LIMIT.')', 'fapi-member' ); ?></h3> |
| 49 | <div class="row"> |
| 50 | <label for="fapiMemberApiEmail"><?php echo __( 'Uživatelské jméno (e-mail)', 'fapi-member' ); ?></label> |
| 51 | <input type="text" name="fapiMemberApiEmail" id="fapiMemberApiEmail" placeholder="me@example.com"> |
| 52 | </div> |
| 53 | <div class="row"> |
| 54 | <label for="fapiMemberApiKey"><?php echo __( 'API klíč', 'fapi-member' ); ?></label> |
| 55 | <input type="text" name="fapiMemberApiKey" id="fapiMemberApiKey"> |
| 56 | </div> |
| 57 | <div class="row controls"> |
| 58 | <input type="submit" class="primary" name="" id="" value="<?php echo __( 'Propojit s FAPI', 'fapi-member' ); ?>"> |
| 59 | </div> |
| 60 | </form> |
| 61 | <p> |
| 62 | <?php echo __( 'Stav propojení', 'fapi-member' ); ?>: |
| 63 | <?php echo ($apiService->areApiCredentialsSet()) ? '<span class="ok">' . __( 'propojeno', 'fapi') . '</span>' : '<span class="ng">' . __('nepropojeno', 'fapi-member' ) . '</span>' ?> |
| 64 | </p> |
| 65 | |
| 66 | <h3><?php echo __( 'Propojení s Integromatem', 'fapi-member' ); ?></h3> |
| 67 | |
| 68 | <p> |
| 69 | <?php echo __( 'FAPI Member API Token', 'fapi-member' ); ?>: <span |
| 70 | id="fapi-member-token"><?php echo get_option(OptionKey::TOKEN, '') ?></span> |
| 71 | <img height="17" data-clipboard-action="copy" data-clipboard-target="#fapi-member-token" |
| 72 | class="copy-to-clipboard" |
| 73 | src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAABHElEQVRoge3YQQrCMBCF4b/iFSriRd16xiKKp9GVNLWt0sxLMsg8KK46k89MAy1o8xRdd+AoXtumqCDNMe9FKGo0xSghQ/LbG2tmL0JRo2fEVN8ZJQQaYs5oIdAQczHev7SrKWb1mVEdlzc0/9baeP7EKM/+B3AqBPnEzMZMffZbMb/Ws4pRQu5LDTJrfcvimCkhR+yYnJEe0hstSWscgCv5Y5b7fMohYMdk9S4BgXqY4hCog6kCgfKYahAoi6kKgXKYIpAt183Yc9K7Y0R0xmI5sfSc9N4LCsH2BVknYJadumCrBMRbAuItAfGWgHhLQLwlIN4SEG8JiLeo3hCtMb8xxo6IY/4I8Tc7EhBvCYi3pKeW/OtfzfzNjrwAb3YJtHLIRU8AAAAASUVORK5CYII=" |
| 74 | title="<?php echo __( 'Zkopírovat', 'fapi'); ?>" alt="<?php echo __('Zkopírovat', 'fapi-member' ); ?>"/> |
| 75 | </p> |
| 76 | </div> |
| 77 | <?php echo FapiMemberTools::help() ?> |
| 78 | </div> |
| 79 |