This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
smart-donations-forms-pro.php
73 lines (49 loc) · 2.21 KB
/
smart-donations-forms-pro.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
require_once('smart-donations-license-helpers.php');
if (isset($_POST['license_email'])) {
$email=$_POST['license_email'];
}else
$email='';
if (isset($_POST['license_key'])) {
$key=$_POST['license_key'];
}else
$key='';
$error="";
$licensingError=0;
if($email!=null||$key!=null)
{
if(smart_donations_check_license($email,$key,$error,true))
{
echo "Licence validation successful, you can now use the pro features =). Thanks!!";
return;
}
else{
if($error==null)
$error="Invalid user or license key";
echo "<div class='error below-h2'><p><strong>Error:</strong> $error</p></div>";
$licensingError=1;
}
}
echo "<script type='text/javascript' language='javascript'>var smartDonationsLicensingError=$licensingError;var smartDonationsEmail='$email';var smartDonationsKey='$key'</script>";
?>
<?php
wp_enqueue_script('jquery');
wp_enqueue_script('isolated-slider',plugin_dir_url(__FILE__).'js/rednao-isolated-jq.js');
wp_enqueue_script('smart-donations-pro',plugin_dir_url(__FILE__).'js/smart-donations-pro.js','isolated-slider');
?>
<div style="display: inline-block">
<p>The forms are a pro feature, you can learn more and unlock it here:</p>
<a target="_blank" style="display: block; font-size: 20px; font-weight: bold; margin-top:5px;margin-bottom:10px;" href="<?php echo REDNAO_URL?>smartdonations.html">Learn More (Video Tutorials)</a>
</div>
<div style="display: inline-block; vertical-align: top; margin:10px; padding: 10px; border-width: 1px;border-color: #d3d3d3; width:300px;" id="licenseDiv">
<p style="text-align: center;display: inline-block;">If you already have a pro license</p> <a onclick="Unlock();" style="cursor: hand;cursor:pointer;">Click Here</a>
</div>
<a target="_blank" href="<?php echo REDNAO_URL?>smartdonations.html"> <img id="smartDonationsImageClassic" src="<?php echo plugin_dir_url(__FILE__)?>images/FormsPro.png" alt="" width="760" height="760"></a>
<script type="text/javascript" language="javascript">
<?php
if($email!=null||$key!=null)
{
echo "var smartDonationsValidationFailed=true";
}
?>
</script>