die('Could not determine current version of your site pattern files (site_config/standard/version.php). Make sure you\'re using at least version 2.9.5 of Full-Text RSS.');
$reg_key_info='<h3>Registration key</h3><p>This update tool requires a registration key issued by FiveFilters.org. You do not need a registration key to use Full-Text RSS, and none of the regular funtionality is affected if you do not have one. The update tool is simply a convenience service we offer our customers.</p>';
if($auto){
echo'<p>This update tool will attempt to fetch the latest site patterns from FiveFilters.org and update yours.</p>';
echo'<p><strong>Important: </strong>if you\'ve modified or added your own config files in the <tt>site_config/standard/</tt> folder, please move them to <tt>site_config/custom/</tt> — the update process will attempt to replace everything in <tt>site_config/standard/</tt> with our updated version.</p>';
echo$reg_key_info;
if(!isset($reg_key)){
echo'<p>Your registration key should be your PayPal or Avangate transaction ID. If you don\'t have a registration key, you will get one sent to you automatically when you <a href="http://fivefilters.org/content-only/">purchase Full-Text RSS</a> from FiveFilters.org.</p>';
echo'<p>We cannot automatically update your site pattern files because:</p>';
echo'<ul>';
foreach($no_auto_reasonsas$reason){
echo'<li>',$reason,'</li>';
}
echo'</ul>';
echo'<p>You can still manually update by downloading the zip file and replacing everything in your <tt>site_config/standard/</tt> folder with the contents of the zip file.</p>';
echo'</div>';
echo$reg_key_info;
if(!isset($reg_key)){
echo'<p>Enter your registration key below to download the latest version of the site config files from FiveFilters.org</p>';
echo'<p>Your registration key should be your PayPal or Avangate transaction ID.</p>';
}
echo'<form method="post" class="well" action="http://fivefilters.org/content-only/update/get_site_config.php">',$input_field,' <input type="submit" value="Download site patterns" /></form>';
}
echo'<h3>Help</h3>';
echo'<p>If you have any trouble, please contact us via our <a href="http://help.fivefilters.org">support site</a>.</p>';
if(file_exists($standard_local_dir))println("Renamed $tmp_latest_local_dir to $standard_local_dir");
println("<strong style=\"color: darkgreen;\">All done!</strong> Your old site config files are in $tmp_old_local_dir — these will be removed next time you go through the update process.");
println("Failed to extract from $tmp_latest_local - your current site patterns remain untouched");
}
}else{
println("Could not download the latest site config files. Please <a href=\"$latest_remote\">updatemanually</a>-yourcurrentsitepatternsremainuntouched.");