Repository navigation
Expand file tree
/
Copy pathgetRegistrationHTML.php
More file actions
113 lines (100 loc) · 4.74 KB
/
Copy pathgetRegistrationHTML.php
File metadata and controls
113 lines (100 loc) · 4.74 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
$root = dirname(dirname(dirname(dirname(__FILE__, 1))));
if (file_exists($root . "/wp-load.php")) {
require_once $root . "/wp-load.php";
}
if ( ! isset( $_GET['roux_request_nonce'] ) || ! wp_verify_nonce( wp_unslash( $_GET['roux_request_nonce'] ), 'roux_request_nonce' ) ) {
wp_die( esc_html__( 'Security check failed -getRegistartionHTML.php.', 'opendirectory' ) );
}
if (is_multisite()) {
$blog_id = get_blog_option($blog_id, "siteurl");
$blog_details = get_blog_details(1);
if (!defined("ODP2PREFX")) {
define("ODP2PREFX", "odp2_" . $blog_details->blog_id);
}
} else {
if (!defined("ODP2PREFX")) {
define("ODP2PREFX", "odp2_");
}
}
$odp2_agent_confgs = get_option(ODP2PREFX . "agent_confgs");
if (!empty($odp2_agent_confgs)) {
$ex = explode(",", $odp2_agent_confgs);
$odp2_agent_url = $ex[0];
$odp2_agent_folder = $ex[1];
$odp2_agentID = $ex[2];
}
$odp2_plgn_confgs = get_option(ODP2PREFX . "plgn_confgs");
$odp2_remote_link_id = $ex2[0];
$plugin_is_registered = $ex2[1];
$contact_us = $ex2[2];
$page_name = $ex2[3];
$meetup = $ex2[4];
if(!empty($_SERVER["REMOTE_ADDR"]))
$ip = sanitize_text_field(wp_unslash($_SERVER["REMOTE_ADDR"]));
if(!empty($_SERVER['SERVER_NAME'])){
$website_url = sanitize_text_field(wp_unslash($_SERVER['SERVER_NAME']));
}
$args3 = [
"remote_link_id" => $odp2_remote_link_id,
"website_url" => $website_url,
"ipLong" => ip2long($ip),
"tracking_page_name" => "regFormLoaded",
"pluginType" => "WP",
];
$args4 = wp_json_encode($args3, true);
//DEV NOTE (IMPORTANT): This is a crucial point in the variable's naming! The hidden var that we are sending to ent's register.php is THIS FORM'S $odp2_remote_link_id! The point of the "installer id" is to track (and give credit to the hosting site) for the new advertiser (and perhaps a new installer). With just the agent_ID and the remote_link_id we can trace (relationally) back to the user when doing the commissions on central.
echo '
<div class="register" style="width:60%; border-radius: 25px; padding: 20px; background: rgb(15,21,73);
background: linear-gradient(90deg, rgba(15,21,73,1) 0%, rgba(15,21,73,1) 35%, rgba(175,202,228,1) 100%);">
<img style="border-radius: 0 50% 25% 25%;">
<img style="border-radius: 0 50% 25% 25%;" padding="20px" alt="Register" src="/wp-content/plugins/opendirectory/images/odpRegistrationW.png" height="40px"><!--<h2>OPEN DIRECTORY PROJECT 2.PRO</H2>-->
<form action="' .
esc_attr($odp2_agent_url) .
'/opendirectoryproject/dashboard/register.php" method="post" autocomplete="off">
<div class="visually-hidden-trap" aria-hidden="true">
<label for="assistant_api_check">Security Verification Field (Leave Blank)</label>
<input type="text" id="assistant_api_check" name="assistant_api_check" autocomplete="off" tabindex="-1">
</div>
<!-- TIME TRAP: Records the exact second the page loaded -->
<input type="hidden" name="form_timer" value="'.time().'">
<input type="hidden" name="agent_id" id="agent_id" value="' .
esc_attr($odp2_agentID) .
'" />
<input type="hidden" name="remote_link_id_of_form_site" id="remote_link_id_of_form_site" value="' .
esc_attr($odp2_remote_link_id) .
'" />
<label for="username">
<i class="fas fa-user"><img src= "/wp-content/plugins/opendirectory/images/username.png"></i>
</label>
<input type="text" name="username" placeholder="Username" id="username" required="" />
<label for="password">
<i class="fas fa-lock"><img src= "/wp-content/plugins/opendirectory/images/21_lock-64.png"></i>
</label>
<input type="password" name="password" placeholder="Password" id="password" required="" />
<p> </p><label for="password_confirm">
<i class="fas fa-lock"><img src= "/wp-content/plugins/opendirectory/images/21_lock-64.png"></i>
</label>
<input type="password" name="password_confirm" placeholder="Confirm Password" id="password_confirm" required="" />
<label for="email">
<i class="fas fa-envelope"><img src= "/wp-content/plugins/opendirectory/images/icon-email-64.png"></i>
</label>
<input type="email" name="email" placeholder="Email" id="email" required="" />';
//include('tools/showCaptcha.php');
//replaced by honey pot in js, this form and dir file
echo '
<input type="submit" name="register" id="register" value="Register" onclick="tracker(';
echo esc_attr($args4);
echo ')"/>
</form>
<form action="' .
esc_attr($odp2_agent_url) .
'/opendirectoryproject/dashboard/index.php" method="post" autocomplete="off">
<input type="submit" name="login" id="login" value="Already Registered? -> Login">
</form>
<form>
<button style="float: right;" onclick="restoreRegistrationPic()">Close Registration Form</button>
</form>
</div>
';
?>