AdditionalOptions.class.php
2 months ago
CampaignInfo.class.php
2 months ago
Campaigns.class.php
2 months ago
ClickTracking.class.php
2 months ago
ContactForm7.class.php
2 months ago
Debugging.class.php
4 weeks ago
EDD.class.php
4 weeks ago
General.class.php
4 weeks ago
Integrations.class.php
2 months ago
LifterLMS.class.php
2 months ago
Marketpress.class.php
4 weeks ago
MemberPress.class.php
2 months ago
Membership2.class.php
2 months ago
PMPro.class.php
2 months ago
PPBuyNowButton.class.php
2 months ago
RestrictContentPro.class.php
2 months ago
S2Member.class.php
2 months ago
Signup.class.php
2 months ago
SimplePayPro.class.php
2 months ago
StripePayments.class.php
4 weeks ago
SureCart.class.php
2 months ago
WPEasyCart.class.php
2 months ago
WPPayForms.class.php
2 months ago
WishListMember.class.php
2 months ago
WooComm.class.php
4 weeks ago
General.class.php
97 lines
| 1 | <?php |
| 2 | if (!defined('ABSPATH')) exit; |
| 3 | |
| 4 | class postaffiliatepro_Form_Settings_General extends postaffiliatepro_Form_Base { |
| 5 | public function __construct() { |
| 6 | parent::__construct(postaffiliatepro::GENERAL_SETTINGS_PAGE_NAME, 'options.php'); |
| 7 | } |
| 8 | |
| 9 | protected function getTemplateFile() { |
| 10 | return WP_PLUGIN_DIR . '/postaffiliatepro/Template/GeneralSettings.xtpl'; |
| 11 | } |
| 12 | |
| 13 | protected function initForm() { |
| 14 | $this->addUrlTextBox(postaffiliatepro::PAP_URL_SETTING_NAME, 50); |
| 15 | $this->addTextBox(postaffiliatepro::PAP_MERCHANT_NAME_SETTING_NAME, 30); |
| 16 | $this->addPassword(postaffiliatepro::PAP_MERCHANT_PASSWORD_SETTING_NAME, 30); |
| 17 | $this->addTextBox(postaffiliatepro::CLICK_TRACKING_ACCOUNT_SETTING_NAME, 30, 'default1'); |
| 18 | $this->addCheckbox(postaffiliatepro::ASYNC_ENABLED); |
| 19 | $this->checkCredentails(); |
| 20 | $this->addSubmit(); |
| 21 | } |
| 22 | |
| 23 | private function checkCredentails() { |
| 24 | $this->addHtml('login_check_ok', ''); |
| 25 | $this->addHtml('installation_info', ''); |
| 26 | $this->addHtml('error', ''); |
| 27 | $this->addHtml('notice', ''); |
| 28 | $this->addHtml('initial_info', ''); |
| 29 | |
| 30 | if (!$this->isPluginSet()) { |
| 31 | $content = '<div id="generalInfoContent"> |
| 32 | <div class="column" style="padding-right: 1%;border-left: 2px solid #3333ff;"> |
| 33 | <h3>WHAT IS AFFILIATE SOFTWARE?</h3> |
| 34 | <div>Affiliate software is software that let\'s you track clicks and signups and assign them to the right affiliates |
| 35 | with the option of reports and payouts. Affiliate software is used to run an in-house affiliate program with the |
| 36 | advantage of complete customization and ability to control and manage your affiliates, commissions and setups. |
| 37 | Starting an affiliate program with affiliate software <a href="https://www.postaffiliatepro.com/">Post Affiliate Pro</a> is fairly easy even non-tech professionals. |
| 38 | </div> |
| 39 | </div> |
| 40 | <div class="column" style="padding-right: 1%;border-left: 2px solid #3399ff;"> |
| 41 | <h3>WHY START WITH AFFILIATE MARKETING?</h3> |
| 42 | <div>Affiliate marketing or partner marketing is one of the most cost effective online marketing channels. It\'s especially |
| 43 | popular with SMB, SaaS and eCommerce. Unlike PPC, with affiliate marketing, you only pay for real sales in the form of |
| 44 | affiliate commission. That way, you don\'t have to pay for advertisement which doesn\'t work. Affiliate marketing improves |
| 45 | your Page Rank and SEO by having affiliates link back to your website. |
| 46 | </div> |
| 47 | </div> |
| 48 | |
| 49 | <div class="column" style="border-left: 2px solid #33ccff;"> |
| 50 | <h3>WHY CHOOSE POST AFFILIATE PRO?</h3> |
| 51 | <div><a href="https://www.postaffiliatepro.com/">Post Affiliate Pro</a> is the #1 ranked and most reviewed affiliate |
| 52 | software on the market. It is easy to set up an operate and connects with virtually any website or payment gateway. |
| 53 | Currently, more than 30,000 businesses trust Post Affiliate Pro as their choice for affiliate software. Post Affiliate Pro |
| 54 | features rock-solid tracking, scalability and endless customization and grows with your needs. All at for an affordable |
| 55 | monthly fee. |
| 56 | </div> |
| 57 | </div></div>'; |
| 58 | $this->addHtml('initial_info', $content); |
| 59 | return; |
| 60 | } |
| 61 | |
| 62 | $session = $this->getApiSession(true); |
| 63 | $notice = false; |
| 64 | if ($session !== null && $session !== '0') { |
| 65 | $this->addHtml('login_check_ok', $this->getSectionCode('Successfully connected to your Post Affiliate Pro installation','style="color:#2B7508;"')); |
| 66 | $this->addHtml('installation_info', $this->getSectionCode('Application version: <span style="font-style:italic;">'.$this->getPapVersion().'</span>')); |
| 67 | $versionArray = explode('.',$this->getPapVersion()); |
| 68 | |
| 69 | if ($versionArray[0] < 4) { |
| 70 | $notice = true; |
| 71 | } elseif ($versionArray[0] === 4) { |
| 72 | if ($versionArray[1] < 5) { |
| 73 | $notice = true; |
| 74 | } elseif ($versionArray[1] === 5) { |
| 75 | if ($versionArray[2] < 67) { |
| 76 | $notice = true; |
| 77 | } elseif ($versionArray[2] === 67) { |
| 78 | if ($versionArray[3] < 3) { |
| 79 | $notice = true; |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | } else { |
| 85 | $this->addHtml('error', $this->getSectionCode(esc_html($this->getError()), 'style="color:#ff0000"')); |
| 86 | } |
| 87 | |
| 88 | if ($notice) { |
| 89 | $this->addHtml('notice', $this->getSectionCode('Your Post Affiliate Pro version should be <strong>4.5.67.3 or higher<strong> to enjoy full functionality. Lower versions will not work properly.')); |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | private function getSectionCode($content, $style = '') { |
| 94 | return '<table class="form-table"><tr><td '.$style.'>'.$content."</td></tr></table>\n"; |
| 95 | } |
| 96 | } |
| 97 |