<?php
/*
v1.1
    Copyright 2009-2010 GetWebActive  (email : cookies@getwebactive.com)
    Released under license from GetWebActive
    Use of this plugin is governed by the software licence included in the package. Contact the author if there is no licence in your package.
    *THIS IS NOT FREE SOFTWARE* 
    *All rights reserved* 

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

class ar_gwa_help {

function ar_gwa_help() {
}

function admin_ar_gwa_help() {
global $wpdb,$ctag,$ar_gwa_debug;
$debug = $ar_gwa_debug; 
$ar_gwa_debug_msg = __("Click to turn OFF",'argwa');
if( $debug == ""){
    update_option("ar_gwa_debug","OFF");
    $ar_gwa_debug_msg = __("Click to turn ON",'argwa');
    }
if($_REQUEST['clear_log'])
$wpdb->query("TRUNCATE TABLE `".$wpdb->prefix."ar_gwa_log`");
$logs = $wpdb->get_results("SELECT `FromName`,`subject`, `From`, `recepientMail`,`SendDate`,`Response` FROM ".$wpdb->prefix."ar_gwa_log ORDER BY SendDate DESC",ARRAY_A);
if($_POST['ar_gwa_debug']=="ON") {
    update_option("ar_gwa_debug","OFF");
    $ar_gwa_debug="OFF";  
$ar_gwa_debug_msg = __("Click to turn ON",'argwa');
  }
  else if($_POST['ar_gwa_debug']=="OFF") {
    update_option("ar_gwa_debug","ON");
    $ar_gwa_debug="ON";    
$ar_gwa_debug_msg = __("Click to turn OFF",'argwa');
  }
if( $ar_gwa_debug=="OFF") {
  $ar_gwa_debug_msg = __("Click to turn ON",'argwa');
} else {
  $wpdb->show_errors();
  _e("<b>DEBUG SUPPORT IS ON!</b> Turn debugging support off using the button at the bottom of this page.",'argwa').'<br />';
}
?>
<div id=""> <div id=""><div id=""><div id="">
<div class="wrap">
<h2><?php _e("Help",'argwa');?></h2><br /><div style="border: solid 1px #f00;padding:6px; background-color:#e4f2fd;"><strong style="color:#f00"><?php _e('IMPORTANT NOTE','argwa');?>:</strong>&nbsp;<?php _e("If you have just installed this plugin and are <em>receiving error messages like \"Content missing?\" or \"Content not available?\" after subscribing or are experiencing problems with forwarding to internal pages after clicking links in emails</em> you can now access the PLUGIN HOOK SETTING on the <a href='?page=autoresponder-gwa/ar_gwa.php'>PLUGIN MAIN PAGE</a> at the BOTTOM RIGHT under GLOBAL SETTINGS. Find the correct one by experimenting with different settings to find a compatible hook for your setup. Changing theme/templates can break the subscriber page forwarding functionality and this can now be corrected (in most cases) simply by selecting an alternate hook.",'argwa');?><strong style="color:#f00;"><?php _e("Your local mailer/server IP Address is",'argwa');?> : <a href="http://no-spam-zone.biz/checkBL.php?gip=<?php echo base64_encode($_SERVER['SERVER_ADDR']);?>" title="<?php _e("Check your Mailserver IP on 80+ Blacklisting (RBBL) sites.",'argwa');?>"><?php echo $_SERVER['SERVER_ADDR'];?></a></strong><br><strong><a href="http://no-spam-zone.biz/checkBL.php?gip=<?php echo base64_encode($_SERVER['SERVER_ADDR']);?>" title="<?php _e("Please WAIT while Check Page loads after clicking link.",'argwa');?>"><?php _e("Check your Mailserver IP on 80+ Blacklisting (RBBL) sites.",'argwa');?></a> 
<small><?php _e("Please WAIT while Check Page loads after clicking link.",'argwa');?></small></strong></div><br />
<a href='#15' style='text-decoration:none'><?php _e("<strong>NEW!</strong>Using Fly-in & Footer Ads.",'argwa'); ?></a><br />
<a href='#13' style='text-decoration:none'><?php _e("Message Encoding / Character Set.",'argwa'); ?></a><br />
<a href='#12' style='text-decoration:none'><?php _e("Dynamic Message Archive & Link.",'argwa'); ?></a><br />
<a href='#11' style='text-decoration:none'><?php _e("External CRON usage.",'argwa'); ?></a><br />
<a href='#0' style='text-decoration:none'><?php _e("List Details Settings Page.",'argwa'); ?></a><br />
<a href='#1' style='text-decoration:none'><?php _e("Captcha human verification.",'argwa'); ?></a><br />
<a href='#2' style='text-decoration:none'><?php _e("Additional form fields.",'argwa'); ?></a><br />
<a href='#3' style='text-decoration:none'><?php _e("Personalize your messages.",'argwa'); ?></a><br />
<a href='#4' style='text-decoration:none'><?php _e("Insert subscription form using shortcode.",'argwa'); ?></a><br />
<a href='#5' style='text-decoration:none'><?php _e("Template file php tags for widget output.",'argwa'); ?></a><br />
<a href='#6' style='text-decoration:none'><?php _e("Setup your autoresponder messages.",'argwa'); ?></a><br />
<a href='#7' style='text-decoration:none'><?php _e("Running your new autoresponder.",'argwa'); ?></a><br />
<a href='#8' style='text-decoration:none'><?php _e("Throttle settings controlling mail delivery.",'argwa'); ?></a><br />
<a href='#9' style='text-decoration:none'><?php _e("Current Mail Logs",'argwa'); ?></a><br />
<a href='#10' style='text-decoration:none'><?php _e("Toggle DEBUG MODE.",'argwa'); ?></a><br />
<?php 
if(class_exists('ar_gwa_wizard') && $hp = new ar_gwa_wizard()) {
$t = $hp->helpText(); 
echo "<h3>".$t[0]."</h3>".$t[1]."";
}
if(!class_exists('ar_gwa_single') && file_exists(dirname(__FILE__).'/ar_gwa_single.php')) include_once(dirname(__FILE__).'/ar_gwa_single.php');
if(class_exists('ar_gwa_single') && $hp = new ar_gwa_single()) {
$t = $hp->helpText(); 
echo "<h3>".$t[0]."</h3>".$t[1]."</h3>";
}
if(class_exists('ar_gwa_bounce') && $hp = new ar_gwa_bounce()) {
$t = $hp->helpText(); 
echo "<h3>".$t[0]."</h3>".$t[1]."</h3>";
}
if(class_exists('ar_gwa_calender') && $hp = new ar_gwa_calender()) {
$t = $hp->helpText(); 
echo "<h3>".$t[0]."</h3>".$t[1]."</h3>";
}
if(class_exists('ar_gwa_attach') && $hp = new ar_gwa_attach()) {
$t = $hp->helpText(); 
echo "<h3>".$t[0]."</h3>".$t[1]."</h3>";
}
if(class_exists('ar_gwa_track') && $hp = new ar_gwa_track()) {
$t = $hp->helpText(); 
echo "<h3>".$t[0]."</h3>".$t[1]."</h3>";
}
if(class_exists('ar_gwa_user_edit') && $hp = new ar_gwa_user_edit()) {
$t = $hp->helpText(); 
echo "<h3>".$t[0]."</h3>".$t[1]."</h3>";
}
?>
<a name="0"></a>
<h3><?php _e("List Details / Options Page.",'argwa');?></h3>
<?php _e("Click the Update link for each record on the ",'argwa'); ?>
<a href='?page=ar_gwa_lists'><?php _e("Lists",'argwa'); ?></a> <?php _e("page to set the options for that newsletter. All new list options will be added here. Has more list option settings than the list's Widget Options menu.<br /><em>The individual List Subscription Form HTML Code can now be found here.</em>",'argwa');?><br />
<a name="1"></a>
<h3><?php _e("CAPTCHA Human Verification.",'argwa');?></h3>
<?php _e("To enable jCap CAPTCHA VERIFICATION you need to update the subscription form html on the list details page.<br /><br />Using the PLAIN TEXT option or the TinyMCE HTML Editor add the following inside the < FORM > tag:",'argwa'); ?><br /><form><textarea rows=1 cols=40>onsubmit=&quot;return jcap();&quot;</textarea></form><br /><?php _e("Insert the html below into your form where you would like the CAPTCHA image and input field to appear.",'argwa'); ?><br /><form><textarea rows=1 cols=60><script type="text/javascript">sjcap();</script></textarea></form> <?php _e("Also you MUST ENABLE CAPTCHA on the List Details page to preload the jCap javascript files.",'argwa');?><br /><br /><?php _e("<strong style='color:red'>IMPORTANT:</strong> <u>To enable multiple CAPTCHA enabled forms on a single blog page</u> simply substitute <strong style='color:red'>jcap2()</strong> and <strong style='color:red'>sjcap2()</strong> in the code presented above. When using CAPTCHA both in the Sidebar AND in your Posts and Pages you must define these separately as described.",'argwa');?>
<a name="2"></a>
<h3><?php _e("Capture ADDITIONAL FORM FIELDS.",'argwa');?></h3>
<?php _e("To capture additional data simply add the extra input fields to the html subscription form. Up to 5 additional fields will be automatically captured. The additional fields must be named ",'argwa'); ?><strong>&quot;Field1&quot;</strong> <?php _e("through",'argwa'); ?> <strong>&quot;Field5&quot;</strong> <?php _e("as follows",'argwa'); ?>:<br /><form><textarea rows=5 cols=60><input id="argwa_field1" type="text" name="Field1" size=12>
<input id="argwa_field2" type="text" name="Field2" size=12>
<input id="argwa_field3" type="text" name="Field3" size=12>
<input id="argwa_field4" type="text" name="Field4" size=12>
<input id="argwa_field5" type="text" name="Field5" size=12></textarea></form>
<a name="14"></a>
<h3><?php _e("Form Checking Javascript.",'argwa');?></h3>
<p><?php _e("The following javascript is used to check the form data fields are filled in before the subscription form will be submitted. When using <b>static html subscription form(s) on another website</b> you will need to include the following code in your html page to activate form field checking.",'argwa');?>
</p>
<textarea rows=5 cols=60><?php echo print_gwaCheck('#');?></textarea>
<p style="width:435px;font-size:10px"><span style="color:#f00"><?php _e("IMPORTANT: Substitute the <b>#</b> in the code above with the List_ID of the subscription form <b>OR</b> remove the List_ID from the subscription form SUBMIT button's onclick=\"gwaCheckForm#(this.form)\" event handler (and the code above) when using the static html on another website.",'argwa');?></span></p>
<a name="3"></a>
<h3><?php _e("Personalize your messages.",'argwa');?></h3>
<p><?php _e("The following tags can be added to your email messages:",'argwa');?>
<br><b>
&lt;?Name?> : <?php _e("Subscriber's name.",'argwa');?><br>
&lt;?Email?&gt; : <?php _e("Subscriber's email address.",'argwa');?><br />
&lt;?Archive?&gt; : <?php _e("Subscriber's personal message archive link.",'argwa');?><br />
&lt;?Unsubscribe?> : <?php _e("Add an UNSUBSCRIBE LINK in your mailing.",'argwa');?><br />
&lt;?Field1?&gt; <?php _e("inserts field 1 data,",'argwa'); ?><br />&lt;?Field2?&gt; <?php _e("inserts field 2 data, etc.",'argwa');?></b></p>
<a name="4"></a>
<h3><?php _e("Insert Template Shortcode.",'argwa');?></h3>
<p><?php printf(__("Use the %s shortcode tag when composing both posts and pages right in the administrator. To display the subscription form and responses from the autoresponder using shortcode on your blog pages use the tag anywhere within the contents of a post or page.<br><br><em>To display a particular list enter the List ID# where the '#' is in the tag. If you omit this identifier the default List assigned to the page will be displayed. The List ID# for each newsletter can be found in the far left column on the Lists Page of your plugin.</em>",'argwa'),'<strong>[gwa-autoresponder listid="#"]</strong>');?></p>
<a name="5"></a>
<h3><?php _e("Template Tags",'argwa');?></h3>
<p><?php _e("Use the following in your template <strong>page.php</strong> file to display the responses from the autoresponder.",'argwa');?><br><textarea cols=80 rows=5>
<?php
  echo '<?php'."\n"; 
  echo '  if ( function_exists(\'autoresponder_output\') ) {'."\n";
  echo '  autoresponder_output(\'<div id="output">\',\'</div>\');'."\n";
  echo '  }'."\n";
  echo '?>'."\n";
?>
</textarea><br>
 <?php _e("You may enter any valid html in the fields to display before and after the response to set a css class or add formatting directly.",'argwa');?></p> 
<a name="6"></a>
<h3><?php _e("Setup Messages",'argwa');?></h3>
<p><?php _e("You add new messages to the autoresponder on the <a href='?page=ar_gwa_edit_message'>Add Message</a> tab. You must set the list to add the message to, the day that the message will be sent (enter the number of days after subscribing that the user will recieve the email. Enter 0 (zero) to have the message  sent immediately after the lead has been confirmed. <strong>NOTE</strong> that only 1 (one) email message may be scheduled for delivery each day.",'argwa');?> </p>
<a name="7"></a>
<h3><?php _e("Running your Autoresponder",'argwa');?></h3>
<p><?php _e("[GWA] Autoresponder Plug-in is completely automated. The appropriate messages are automatically sent to all subscribed addresses scheduled for delivery each day. All mail is handled by the <em>automated mail queue</em>. You can still manually start the mailings by clicking the",'argwa'); ?> <a href='?page=ar_gwa_edit_message'><?php _e("FLUSH QUEUE",'argwa'); ?></a> <?php _e("button on the messages page",'argwa');?>.<br /><br /><strong>
<?php _e("IMPORTANT NOTE",'argwa');?></strong>: <?php _e("The Wordpress simulated CRON feature will run the first time your blog is visited after the scheduled mailing time has passed. You can <strong>Reschedule</strong> the time your messages are sent each day to the current time on the '<a href='?page=autoresponder-gwa/ar_gwa.php'>Autoresponder</a>' tab. If you do not get regular traffic to your weblog you will want to setup a proper CRON JOB in your host's Server Control Panel to load your weblog homepage a minute or so after the time you set for your mailing in the settings for this plugin. This will ensure your autoresponder keeps to schedule.",'argwa');?></p>
<a name="8"></a>
<h3><?php _e("Throttle Settings",'argwa');?></h3>
<p><?php _e("Depending upon your server configuration the script will have a maximum run time which may be exceeded while processing your mailing list. There are several throttle settings you can use to ensure all your email is successfully sent on any shared or free host. You must set [Throttle A] to just below the 'max_execution_time' set by your server host. If this is not set properly the plugin can not ensure every email has been successfully sent. If your script is timing out and not all your emails are being sent you must decrease the value in the [Throttle A] box.",'argwa');?></p>
<p><strong style="color:#f00;"><?php _e("WARNING: Sending too many emails too often can cause problems with a shared or free web-host.",'argwa');?></strong></p><p>
<?php _e("[Throttle B] will set the maximum number of email sent each time the queue is RUN. [Throttle C] is the amount of time to pause between running the queue. These two settings can ensure that the number of email you generate from your hosting account never exceeds the maximum set by your server host. Read the terms and conditions concerning email sending in your account and set these numbers accordingly.<br /><br /><strong style='color:#f00'>*New*</strong><strong style='color:#000'> - Check the far-right column of the log window for SMTP Relay Server responses (if applicable.)</strong>",'argwa');?></p>
<a name="15"></a>
<h3><?php _e("Fly-in Box & Slide-in Footer Ads",'argwa');?></h3>
<p><?php _e("First setup these HTML options for your chosen list on the <a href='?admin.php?page=ar_gwa_lists'>List Details</a> page (for each list.) Make sure you have appropriate subscription form code updated for the window size and placement. You can set formatting in a 'fly.css' file or use the options on the Lists page (see the example file.)<br /><br />Select your Ad-Type and List for this promotion in the checkbox on the <A HREF='?page=autoresponder-gwa/ar_gwa.php'>Main GWA Menu</a> page and click to UPDATE. Use the Administrator TEST button to check your form display. DURING TESTING OPT-FORM APPEARS WITH EVERY PAGE LOADED FOR BLOG ADMIN ONLY. ONLY ONE AD-TYPE IS DISPLAYED TO EACH VISITOR UPON FIRST PAGE LOADED FOR EACH VISIT.",'argwa');?></p>
<a name="9"></a>
<h3><?php _e("Mail Logs",'argwa');?></h3>
<form action="?page=ar_gwa_help" method="POST">
<?php
echo '<textarea cols="100" style="overflow:scroll;height:130px" wrap="OFF">';
if(count($logs)>0) {
 foreach($logs as $log) {
  foreach($log as $l=>$o) {
    if($l=='SendDate')
      echo date("H:i d-m-Y ",$o)."\t";
    else
      echo $o."\t";
  }
  echo "\n";
 }
} else {
_e('Log is empty','argwa');
}
echo '</textarea>';
?><br />
<input class="button" type="submit" name="clear_log" value="CLEAR LOG">
</form>
<p><a name="11"></a>
<h3><?php _e("External CRON usage.",'argwa');?></h3><?php _e("The following direct url can be used in your server cron to activate the queue. This can be used where traffic to your weblog is intermittent as the internal wp-cron used by the plugin requires regular traffic to your blog to be useful.",'argwa');?><br><a target="_blank" href="<?php echo get_bloginfo('url'); ?>/?ar_gwa_cron=1"><?php echo get_bloginfo('url'); ?>/?ar_gwa_cron=1</a><br>
<span style="color:red"><small><?php _e("Right-click and select 'Copy Link' and paste into your server cron.",'argwa');?></small></span>
<a name="12"></a>
<h3><?php _e("Dynamic Message Archives.",'argwa');?></h3>
<?php _e("Message archives can be accessed through a subscribers personal archive link when included in your mailings with the <strong>&lt;?Archive?&gt;</strong> field. Creates an RSS Feed of links to messages previously sent to your subscribers and offers an alternate method of accessing your content.<br /><strong>IMPORTANT:</strong> Archive WILL NOT WORK when using HOOK SETTING WP-HEAD.",'argwa');?><br />
<a name="13"></a>
<h3><?php _e("Special Characters in Emails.",'argwa');?></h3>
<?php _e("To get special characters in certain language sets to be displayed correctly in your email's subject and body the proper character-set/encoding must be set in the message headers. You can now set the proper encoding for all messages under Global Options on the main plugin page. If you see funny looking characters in your messages this could be the cause.",'argwa');?><br />

<form action="?page=ar_gwa_help" method="POST">
<a name="10"></a>
<h3><?php _e("TOGGLE DEBUG ON/OFF.",'argwa');?></h3><?php _e("Use this to get extra information to help diagnose problems and conflicts between the autoresponder and your other plugins. CAUTION: Turns on mysql_error output for your weblog and may display errors from other sources such as other active plugins or your wordpress weblog software.",'argwa');?><br><br><?=$ar_gwa_debug_msg;?>. <input class="button" type="submit" name="ar_gwa_debug" value="<?=$ar_gwa_debug?>">
</form>
</p>
<?=$ctag?></div></div>
<?php
}

function ar_gwa_new_help() {
?>
<div class="arHelp" style="width:600;
border: 1px solid #ccc;padding:6px; background-color:#e4f2fd;"><p>
<font face="Verdana" style="font-size: 12px"><u><b>Welcome to the [GWA] 
Autoresponder Professional Version 4.0 Plugin for WordPress </b></u></font><p>
<font face="Verdana" style="font-size: 12px">This software is tested with the 
current version of Wordpress and operates &quot;out-of-the-box&quot; with very little configuration required under 
normal conditions. Your personal WP blog may include a unique combination of plugins 
and theme that can cause specific problems.<font color="#0000FF"><sup>1</sup></font> <a href="http://twitter.com/wpautoresponder" target="_new">Follow us on Twitter</a> for the latest updates about your Autoresponder plugin.<br>
<br>
There is a New Campaign Wizard available to guide your creation of new 
campaigns. If this is your FIRST INSTALL use the wizard. It's just a few simple 
steps and you are all done.<sup><font color="#0000FF">2</font></sup></font><p>
<font face="Verdana"><span style="font-size: 12px">If this is an UPGRADE (from 
either the Free or a previous Pro version) all your existing lists, leads, and 
messages can be edited manually on the Lists and Messages pages as before.
</span></font><p>
<font face="Verdana" style="font-size: 12px">To get started
<a href="?page=ar_gwa_wizard">Create a New Campaign</a> or go&nbsp; to the
<a href="?page=autoresponder-gwa/ar_gwa.php">Main [GWA] Option Menu Page</a> 
now.</font><p>
<font face="Verdana" style="font-size: 12px"><b>NOTE:</b> <u>Access an existing 
list by select it in the drop-down at the top of the Wizard page.</u> The page 
will reload with the chosen campaign and you may continue through the setup. 
Some options are &quot;global&quot; and affect your plugin mailer  for all Newsletters.<br>
<br>
<b>IMPORTANT:</b> Extension files are 'optional' and may be renamed /deleted to 
speed up the plugin. If you are not using the wizard or other functionality 
provided by one of the extension files go ahead and remove it for now. If you 
ever want to access it in the future just upload (or rename) it  and 
functionality will reappear.<br>
<br>
</font><font face="Verdana"><font color="#0000FF"><sup><span style="font-size: 10px">1</span></sup></font><span style="font-size: 10px"><font color="#0000FF">
</font>If you have problems with page forwarding settings not working correctly 
you can change the 'HOOK' setting found on the lower right of the main plugin 
page near the Intelligent-Queue Throttle settings. <br>
</span><sup><font color="#0000FF" style="font-size: 10px">2 </font></sup>
<span style="font-size: 10px">If you can send email with Wordpress then so will 
this plugin. If you have delivery problems you need to look at all issues. Using 
SMTP avoids a lot of these. Check your web-host documentation for accessing the 
php mail() function and limitations, as well as for  your domain's 
Email SMTP account.</span></font></div>
<?php
 }
}
?>
