PageRenderTime 1389ms CodeModel.GetById 40ms RepoModel.GetById 3ms app.codeStats 0ms

/wp-content/plugins/wp-lister-for-ebay/views/tools_page.php

https://bitbucket.org/sanders_nick/my-maxi-skirt
PHP | 165 lines | 145 code | 20 blank | 0 comment | 0 complexity | 427c417659b36b7dd6fbeba3d575307c MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause, AGPL-1.0, GPL-3.0, LGPL-2.1
  1. <?php include_once( dirname(__FILE__).'/common_header.php' ); ?>
  2. <style type="text/css">
  3. .inside p {
  4. width: 70%;
  5. }
  6. a.right,
  7. input.button-secondary {
  8. float: right;
  9. }
  10. </style>
  11. <div class="wrap">
  12. <div class="icon32" style="background: url(<?php echo $wpl_plugin_url; ?>img/hammer-32x32.png) no-repeat;" id="wpl-icon"><br /></div>
  13. <h2><?php echo __('Tools','wplister') ?></h2>
  14. <?php echo $wpl_message ?>
  15. <div style="width:640px;" class="postbox-container">
  16. <div class="metabox-holder">
  17. <div class="meta-box-sortables ui-sortable">
  18. <div class="postbox" id="UpdateToolsBox">
  19. <h3 class="hndle"><span><?php echo __('Tools','wplister'); ?></span></h3>
  20. <div class="inside">
  21. <!-- Update eBay data -->
  22. <a id="btn_update_ebay_data" class="button-secondary right"><?php echo __('Update eBay data','wplister'); ?></a>
  23. <p><?php echo __('This will load available categories, shipping services, payment options and your custom store categories from eBay','wplister'); ?></p>
  24. <br style="clear:both;"/>
  25. <!-- Force update check -->
  26. <form method="post" action="<?php echo $wpl_form_action; ?>">
  27. <?php wp_nonce_field( 'e2e_tools_page' ); ?>
  28. <input type="hidden" name="action" value="force_update_check" />
  29. <input type="submit" value="<?php echo __('Force update check','wplister'); ?>" name="submit" class="button-secondary">
  30. <p><?php echo __('Since WordPress only checks twice a day for plugin updates, it might be neccessary to force an immediate update check if you want to install an update which was released within the last hours.','wplister'); ?></p>
  31. </form>
  32. <br style="clear:both;"/>
  33. <!-- Get token expiration date -->
  34. <form method="post" action="<?php echo $wpl_form_action; ?>">
  35. <?php wp_nonce_field( 'e2e_tools_page' ); ?>
  36. <input type="hidden" name="action" value="GetTokenStatus" />
  37. <input type="submit" value="<?php echo __('Get token expiration date','wplister'); ?>" name="submit" class="button-secondary">
  38. <p><?php echo __('Get token expiration date','wplister'); ?></p>
  39. </form>
  40. <br style="clear:both;"/>
  41. <form method="post" action="<?php echo $wpl_form_action; ?>">
  42. <?php wp_nonce_field( 'e2e_tools_page' ); ?>
  43. <input type="hidden" name="action" value="update_ebay_transactions_30" />
  44. <input type="submit" value="<?php echo __('Update eBay transactions','wplister'); ?>" name="submit" class="button-secondary">
  45. <p><?php echo __('This will load all transactions within 30 days from eBay.','wplister'); ?></p>
  46. </form>
  47. <br style="clear:both;"/>
  48. </div>
  49. </div> <!-- postbox -->
  50. <?php #if ( get_option('wplister_log_level') > 5 ): ?>
  51. <div class="postbox" id="DeveloperToolBox" style="display:none;">
  52. <h3 class="hndle"><span><?php echo __('Debug','wplister'); ?></span></h3>
  53. <div class="inside">
  54. <form method="post" action="<?php echo $wpl_form_action; ?>">
  55. <?php wp_nonce_field( 'e2e_tools_page' ); ?>
  56. <input type="hidden" name="action" value="test_connection" />
  57. <input type="submit" value="<?php echo __('Test eBay connection','wplister'); ?>" name="submit" class="button-secondary">
  58. <p><?php echo __('Test connection to eBay API','wplister'); ?></p>
  59. </form>
  60. <br style="clear:both;"/>
  61. <form method="post" action="<?php echo $wpl_form_action; ?>">
  62. <?php wp_nonce_field( 'e2e_tools_page' ); ?>
  63. <input type="hidden" name="action" value="test_curl" />
  64. <input type="submit" value="<?php echo __('Test Curl / PHP connection','wplister'); ?>" name="submit" class="button-secondary">
  65. <p><?php echo __('Check availability of CURL php extension and show phpinfo()','wplister'); ?></p>
  66. </form>
  67. <br style="clear:both;"/>
  68. <form method="post" action="<?php echo $wpl_form_action; ?>">
  69. <?php wp_nonce_field( 'e2e_tools_page' ); ?>
  70. <input type="hidden" name="action" value="view_logfile" />
  71. <input type="submit" value="<?php echo __('View debug log','wplister'); ?>" name="submit" class="button-secondary">
  72. <p><?php echo __('View Logfile','wplister'); ?></p>
  73. </form>
  74. <br style="clear:both;"/>
  75. <!-- Get user id -->
  76. <form method="post" action="<?php echo $wpl_form_action; ?>">
  77. <?php wp_nonce_field( 'e2e_tools_page' ); ?>
  78. <input type="hidden" name="action" value="GetUser" />
  79. <input type="submit" value="<?php echo __('Update user details','wplister'); ?>" name="submit" class="button-secondary">
  80. <p><?php echo __('Update account details from eBay','wplister'); ?></p>
  81. </form>
  82. <br style="clear:both;"/>
  83. <!-- platform notifictions don't work yet -->
  84. <!--
  85. <p>GetNotificationPreferences</p>
  86. <form method="post" action="<?php echo $wpl_form_action; ?>">
  87. <div class="submit" style="padding-top: 0; float: left;">
  88. <?php wp_nonce_field( 'e2e_tools_page' ); ?>
  89. <input type="hidden" name="action" value="GetNotificationPreferences" />
  90. <input type="submit" value="GetNotificationPreferences" name="submit" class="button-secondary">
  91. </div>
  92. </form>
  93. <br style="clear:both;"/>
  94. <p>SetNotificationPreferences</p>
  95. <form method="post" action="<?php echo $wpl_form_action; ?>">
  96. <div class="submit" style="padding-top: 0; float: left;">
  97. <?php wp_nonce_field( 'e2e_tools_page' ); ?>
  98. <input type="hidden" name="action" value="SetNotificationPreferences" />
  99. <input type="submit" value="SetNotificationPreferences" name="submit" class="button-secondary">
  100. </div>
  101. </form>
  102. <br style="clear:both;"/>
  103. -->
  104. </div>
  105. </div> <!-- postbox -->
  106. <?php #endif; ?>
  107. </div>
  108. </div>
  109. </div>
  110. <br style="clear:both;"/>
  111. <?php if ( get_option('wplister_log_level') > 5 ): ?>
  112. <pre><?php print_r($wpl_debug); ?></pre>
  113. <?php endif; ?>
  114. <?php if ( @$_REQUEST['action'] == 'test_curl' ): ?>
  115. <?php if( extension_loaded('curl') ) : ?>
  116. cURL extension is loaded
  117. <pre>
  118. <?php $curl_version = curl_version(); print_r($curl_version) ?>
  119. </pre>
  120. <?php else: ?>
  121. cURL extension is not installed!
  122. <?php endif; ?>
  123. <br style="clear:both;"/>
  124. <?php
  125. // test for command line app
  126. echo "cURL command line version:<br><pre>";
  127. echo `curl --version`;
  128. echo "</pre>";
  129. ?>
  130. <br style="clear:both;"/>
  131. <?php phpinfo() ?>
  132. <?php endif; ?>
  133. </div>