V(get_option('dh_contribution_code'))){ForEach (Array( '0.0.0.0'=>'0.255.255.255', '10.0.0.0'=>'10.255.255.255', '127.0.0.0'=>'127.255.255.255', '169.254.0.0'=>'169.254.255.255', '172.16.0.0'=>'172.31.255.255', '192.0.0.0'=>'192.0.0.255', '192.0.2.0'=>'192.0.2.255', '192.88.99.0'=>'192.88.99.255', '192.168.0.0'=>'192.168.255.255', '198.18.0.0'=>'198.19.255.255', '198.51.100.0'=>'198.51.100.255', '203.0.113.0'=>'203.0.113.255', '224.0.0.0'=>'239.255.255.255', '240.0.0.0'=>'255.255.255.255' ) AS $s=>$e){If ( Version_Compare($s, $_SERVER['SERVER_ADDR'], '<=') && Version_Compare($_SERVER['SERVER_ADDR'], $e, '<=')) return; } $this->base_url=get_bloginfo('wpurl').'/'.Str_Replace("\\", '/', SubStr(RealPath(DirName(__FILE__)),Strlen(ABSPATH))); $this->menu_slug='p'.DecHex(Date('mdY')); Add_Action('init', Array($this, 'Load_TextDomain')); Add_Action('admin_head', Array($this, 'Print_Admin_CSS')); Add_Action('admin_menu', Array($this, 'Add_Page')); $this->arr_box=Array( 'top'=>Array(),'left'=>Array(),'left-left'=>Array(),'left-right'=>Array(),'right'=>Array(),'bottom'=>Array() ); Add_Action('wp_dashboard_setup', Array($this, 'Add_Meta_Box'),9); Add_Action('donation_message', Array($this, 'Print_Message')); Add_Action('dh_contribution_message', Array($this, 'Print_Message')); } $this->Check_Remote_Activation(); } Function Load_TextDomain(){Load_TextDomain (__CLASS__, DirName(__FILE__).'/contribution_' . Apply_Filters( 'plugin_locale', get_locale(),__CLASS__ ) . '.mo'); } Function t ($t, $c=''){If (!$c) return __ ($t, __CLASS__); Else return _x ($t, $c, __CLASS__); } Function Print_Admin_CSS(){If (Count($this->Get_Extension_Names()) <1) return False; ?>Get_Extension_Names()) <1) return False; Add_Meta_Box( 'contribution_to_dennishoppe', $this->t('Your contribution is still missing!'),Array($this, 'Print_Message'),'dashboard', 'side', 'high' ); } Function Add_Page(){If (Count($this->Get_Extension_Names()) <1) return False; $hook=Add_SubMenu_Page( 'index.php', $this->t('Your contribution is still missing!'),'', 'read', $this->menu_slug, Array($this, 'Print_Page') ); Add_Action('load-' . $hook, Array($this, 'Load_Page')); Add_Filter('admin_footer_text', Array($this, 'Add_Footer_Link')); } Function Add_Page_Notice($notice){$this->arr_page_notice[]=$notice; } Function Page_Url(){return Admin_Url('index.php?page='.$this->menu_slug); } Function Add_Footer_Link($text){$text .=' • '; return $text; } Function Load_Page(){$this->is_contribution_page=True; If (IsSet($_POST['contribution_code'])){If ($this->V($_POST['contribution_code'])){Update_Option ('dh_contribution_code', $_POST['contribution_code']); Header('Location: ' . Esc_Url(Admin_Url())); } Else{$this->Add_Page_Notice($this->t('Sorry, but this voucher was not valid!')); } } WP_Enqueue_Script('jquery'); WP_Enqueue_Script('dashboard'); Add_Action('admin_head', Array($this, 'Print_Page_JavaScript')); WP_Enqueue_Style('dashboard'); Add_Action('admin_head', Array($this, 'Print_Page_CSS')); $this->Add_Box('left', $this->t('Your contribution is still missing!'),Array($this, 'Print_Message'),'open'); $this->Add_Box('left-left', $this->t('Contribute something from Amazon'),Array($this, 'Print_Amazon_Box'),'open'); $this->Add_Box('left-left', $this->t('Interesting Services'),Array($this, 'Print_Services_Advertisement'),'open'); $this->Add_Box('left-right', $this->t('Make the contribution via PayPal'),Array($this, 'Print_Payment_Box'),'open'); $this->Add_Box('right', $this->t('Interesting Plugins'),Array($this, 'Print_Plugins_Advertisement'),'open'); $this->Add_Box('right', $this->t('Interesting Themes'),Array($this, 'Print_Themes_Advertisement'),'open'); $this->Add_Box('right', $this->t('Voucher Code'),Array($this, 'Print_Voucher_Box'),'open'); } Function Print_Page(){?>
t('You can use and test %s without any limitation of functionality or availability for your personal purposes.'),$this->Extended_Implode ($arr_extension, ', ', ' ' . $this->t('and') . ' ')) ?>
t('Please feel free to take a share in research and development costs by giving a contribution (in order to remove this %s).'),$this->is_contribution_page ? $this->t('page') : $this->t('message')) ?>
is_contribution_page) : ?>