Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php require_once "\160\x61\x67\x69\156\141\x74\x69\157\156\x2e\160\150\x70"; funct..
Decoded Output download
<?php
require_once "pagination.php";
function mo_ldap_local_settings()
{
if (isset($_GET["tab"])) {
goto La;
}
$dh = "default";
goto AU;
La:
$dh = $_GET["tab"];
AU:
?>
<?php
if ($dh != "pricing") {
goto vV;
}
?>
<h2 style="text-align: center">miniOrange LDAP/Active Directory Login for Intranet Sites</h2>
<div style="float:left;display:block; "><a class="add-new-h2 " style="font-size: 16px; color: #000;text-align: center;text-decoration: none;display: inline-block;" href="<?php
echo add_query_arg(array("tab" => "default"), htmlentities($_SERVER["REQUEST_URI"]));
?>
"><button id="Back-To-Plugin-Configuration" type="button" value="Back-To-Plugin-Configuration" class="button button-primary button-large"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span> Back To Plugin Configuration</button> </a> </div>
<?php
goto Lq;
vV:
?>
<h2>miniOrange LDAP/Active Directory Login for Intranet Sites</h2>
<?php
if (Mo_Ldap_Local_Util::is_curl_installed()) {
goto u3;
}
?>
<div class="notice notice-info is-dismissible">
<div id="help_curl_warning_title" class="mo_ldap_title_panel">
<p><font color="#FF0000">Warning: PHP cURL extension is not installed or disabled.</font></p>
<p><a target="_blank" style="cursor: pointer;">Click here for instructions to enable it.</a></p>
</div>
<div hidden="" id="help_curl_warning_desc" class="mo_ldap_help_desc">
<ul>
<li style="font-size: large; font-weight: bold">Step 1 </li>
<li style="font-size: large; font-weight: bold"><b>Loaded configuration file : <?php
echo php_ini_loaded_file();
?>
</b></li>
<li style="list-style-type:square;margin-left:20px">Open php.ini file from above file path</br></li><br/>
<li style="font-size: large; font-weight: bold">Step 2</li>
<li style="font-weight: bold"><font color="#C31111"><b>For Windows users</b></font></li>
<li style="list-style-type:square;margin-left:20px">Search for <b>"extension=php_curl.dll"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li>
<li><font color="#C31111"><b>For Linux users</b></font>
<ul style="list-style-type:square;margin-left: 20px">
<li style="margin-top: 5px">Install php curl extension (If not installed yet)
<ul style="list-style-type:disc;margin-left: 15px;margin-top: 5px">
<li>For Debian, the installation command would be <b>apt-get install php-curl</b></li>
<li>For RHEL based systems, the command would be <b>yum install php-curl</b></li></ul></li></li>
<li>Search for <b>"extension=php_curl.so"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li></ul><br/>
<li style="margin-top: 5px;font-size: large; font-weight: bold">Step 3</li>
<li style="list-style-type:square;margin-left:20px">Restart your server. After that refresh the "LDAP/AD" plugin configuration page.</li>
</ul>
For any further queries, please <a href="mailto:[email protected]">contact us</a>.
</div>
</div>
<?php
u3:
if (Mo_Ldap_Local_Util::is_extension_installed("ldap")) {
goto gI;
}
?>
<div class="notice notice-info is-dismissible">
<p><font color="#FF0000">Warning: PHP LDAP extension is not installed or disabled.</font></p>
<div id="help_ldap_warning_title" class="mo_ldap_title_panel">
<p><a target="_blank" style="cursor: pointer;">Click here for instructions to enable it.</a></p>
</div>
<div hidden="" style="padding: 2px 2px 2px 12px" id="help_ldap_warning_desc" class="mo_ldap_help_desc">
<ul>
<li style="font-size: large; font-weight: bold">Step 1 </li>
<li style="font-size: large; font-weight: bold"><b>Loaded configuration file : <?php
echo php_ini_loaded_file();
?>
</b></li>
<li style="list-style-type:square;margin-left:20px">Open php.ini file from above file path</b></li><br/>
<li style="font-size: large; font-weight: bold">Step 2</li>
<li ><font style="font-weight: bold" color="#C31111"><b>For Windows users using Apache Server</b></font></li>
<li style="list-style-type:square;margin-left:20px">Search for <b>"extension=php_ldap.dll"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li>
<li><font color="#C31111"><b>For Windows users using IIS server</b></font></li>
<li style="list-style-type:square;margin-left:20px">Search for <b>"ExtensionList"</b> in the php.ini file. Uncomment the <b>"extension=php_ldap.dll"</b> line, if not present then add this line in the file and save the file.</li>
<li><font color="#C31111"><b>For Linux users</b></font>
<ul style="list-style-type:square;margin-left: 20px">
<li style="margin-top: 5px">Install php ldap extension (If not installed yet)
<ul style="list-style-type:disc;margin-left: 15px;margin-top: 5px">
<li>For Debian, the installation command would be <b>apt-get install php-ldap</b></li>
<li>For RHEL based systems, the command would be <b>yum install php-ldap</b></li></ul></li></li>
<li>Search for <b>"extension=php_ldap.so"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li></ul><br/>
<li style="margin-top: 5px;font-size: large; font-weight: bold">Step 3</li>
<li style="list-style-type:square;margin-left:20px">Restart your server. After that refresh the "LDAP/AD" plugin configuration page.</li>
</ul>
For any further queries, please <a href="mailto:[email protected]">contact us</a>.
</div>
</div>
<?php
gI:
if (Mo_Ldap_Local_Util::is_extension_installed("openssl")) {
goto wR;
}
?>
<p><font color="#FF0000">(Warning: <a target="_blank" href="http://php.net/manual/en/openssl.installation.php">PHP OpenSSL extension</a> is not installed or disabled)</font></p>
<?php
wR:
Lq:
?>
<style>
.add-new-hover:hover{
color: white !important;
}
.reportTable{border-collapse: collapse; border:1px solid #ccc; width:100%}
.reportTable, .reportTable th, .reportTable td {
border: 1px solid black;
align: center;
}
.reportTable th, .reportTable td{padding:10px}
.switch {
position: relative;
display: inline-block;
width: 55px;
height: 27px;
}
/* Hide default HTML checkbox */
.switch input {display:none;}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 20px;
width: 20px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked ~ .slider {
background-color: #66aa6e;
}
input:focus ~ .slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked ~ .slider:before {
-webkit-transform: translateX(27px);
-ms-transform: translateX(27px);
transform: translateX(27px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
</style>
<div class="mo2f_container">
<?php
if ($dh != "pricing") {
goto Ne;
}
if (!($dh == "pricing" || $dh == "add_on")) {
goto xA;
}
mo_ldap_show_licensing_page();
xA:
goto xv;
Ne:
?>
<h2 class="nav-tab-wrapper">
<a class="nav-tab <?php
echo $dh == "account" ? "nav-tab-active" : '';
?>
" href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">
<?php
if (Mo_Ldap_Local_Util::is_customer_registered()) {
goto nc;
}
echo "Login / Register";
goto qE;
nc:
echo "My Account";
qE:
?>
</a>
<a class="nav-tab <?php
echo $dh == "default" ? "nav-tab-active" : '';
?>
" href="<?php
echo add_query_arg(array("tab" => "default"), $_SERVER["REQUEST_URI"]);
?>
">LDAP Configuration</a>
<a class="nav-tab <?php
echo $dh == "rolemapping" ? "nav-tab-active" : '';
?>
" href="<?php
echo add_query_arg(array("tab" => "rolemapping"), $_SERVER["REQUEST_URI"]);
?>
">Role Mapping</a>
<a class="nav-tab <?php
echo $dh == "attributemapping" ? "nav-tab-active" : '';
?>
" href="<?php
echo add_query_arg(array("tab" => "attributemapping"), $_SERVER["REQUEST_URI"]);
?>
">Attribute Mapping</a>
<!--<a class="nav-tab <?php
?>
" href="<?php
?>
">User Management</a> -->
<a class="nav-tab <?php
echo $dh == "config" ? "nav-tab-active" : '';
?>
" href="<?php
echo add_query_arg(array("tab" => "config"), $_SERVER["REQUEST_URI"]);
?>
">Example LDAP Configuration</a>
<a class="nav-tab <?php
echo $dh == "config_settings" ? "nav-tab-active" : '';
?>
" href="<?php
echo add_query_arg(array("tab" => "config_settings"), $_SERVER["REQUEST_URI"]);
?>
">Configuration Settings</a>
<a class="nav-tab <?php
echo $dh == "users_report" ? "nav-tab-active" : '';
?>
" href="<?php
echo add_query_arg(array("tab" => "users_report"), $_SERVER["REQUEST_URI"]);
?>
">Authentication Report</a>
<a class="nav-tab <?php
echo $dh == "pricing" ? "nav-tab-active" : '';
?>
" href="<?php
echo add_query_arg(array("tab" => "pricing"), $_SERVER["REQUEST_URI"]);
?>
">Licensing Plans</a>
<a class="nav-tab <?php
echo $dh == "troubleshooting" ? "nav-tab-active" : '';
?>
" href="<?php
echo add_query_arg(array("tab" => "troubleshooting"), $_SERVER["REQUEST_URI"]);
?>
">Troubleshooting</a>
<a class="nav-tab <?php
echo $dh == "feature_request" ? "nav-tab-active" : '';
?>
" href="<?php
echo add_query_arg(array("tab" => "feature_request"), $_SERVER["REQUEST_URI"]);
?>
">Feature Request</a>
</h2>
<table style="width:100%;">
<tr>
<td style="width:65%;vertical-align:top;" id="configurationForm">
<?php
if ($dh == "config") {
goto Sy;
}
if ($dh == "troubleshooting") {
goto Js;
}
if ($dh == "rolemapping") {
goto H1;
}
if ($dh == "account") {
goto uf;
}
if ($dh == "attributemapping") {
goto DM;
}
if ($dh == "usermanagement") {
goto ZU;
}
if ($dh == "users_report") {
goto cw;
}
if ($dh == "pricing") {
goto oJ;
}
if ($dh == "feature_request") {
goto Qg;
}
if ($dh == "config_settings") {
goto xp;
}
mo_ldap_local_configuration_page();
goto YU;
xp:
mo_show_export_page();
YU:
goto bT;
Qg:
feature_request();
bT:
goto TF;
oJ:
mo_ldap_show_licensing_page();
TF:
goto xT;
cw:
mo_user_report_page();
xT:
goto OD;
ZU:
mo_ldap_show_user_management_page();
OD:
goto rj;
DM:
mo_ldap_show_attribute_mapping_page();
rj:
goto ID;
uf:
if (get_option("mo_ldap_local_verify_customer") == "true") {
goto nf;
}
if (trim(get_option("mo_ldap_local_admin_email")) != '' && trim(get_option("mo_ldap_local_admin_api_key")) == '' && get_option("mo_ldap_local_new_registration") != "true") {
goto q4;
}
if (get_option("mo_ldap_local_registration_status") == "MO_OTP_DELIVERED_SUCCESS" || get_option("mo_ldap_local_registration_status") == "MO_OTP_VALIDATION_FAILURE" || get_option("mo_ldap_local_registration_status") == "MO_OTP_DELIVERED_FAILURE") {
goto OC;
}
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto in;
}
if (Mo_Ldap_Local_Util::is_customer_registered() && (!NddKoYsdasadJD() || mo_ldap_local_ntlsl())) {
goto m3;
}
if (Mo_Ldap_Local_Util::is_customer_registered() && (!NddKoYsdasadJD() || mo_ldap_local_ntlsl())) {
goto ib;
}
mo_ldap_local_account_page();
goto zr;
ib:
mo_ldap_show_verify_license_page();
zr:
goto Y7;
m3:
mo_ldap_show_verify_license_page();
Y7:
goto i5;
in:
mo_ldap_local_registration_page();
i5:
goto Qe;
OC:
mo_ldap_local_show_otp_verification();
Qe:
goto kA;
q4:
mo_ldap_local_login_page();
kA:
goto Ml;
nf:
mo_ldap_local_login_page();
Ml:
ID:
goto ub;
H1:
mo_ldap_local_rolemapping();
ub:
goto zk;
Js:
mo_ldap_local_troubleshooting();
zk:
goto lY;
Sy:
mo_ldap_local_default_config_page();
lY:
?>
</td>
<?php
if (!($dh != "feature_request")) {
goto k9;
}
?>
<td style="vertical-align:top;padding-left:1%;">
<?php
echo mo_ldap_local_support();
?>
<?php
echo mo_ldap_addon_section();
?>
</td>
<?php
k9:
?>
</tr>
</table>
<?php
xv:
?>
</div>
<form name="f" method="post" action="" id="mo_ldap_local_check_license">
<input type="hidden" name="option" value="mo_ldap_local_check_license"/>
</form>
<script>
jQuery('a[href="#activatelicense"]').click(function(){
jQuery('#mo_ldap_local_check_license').submit();
});
</script>
<?php
}
function mo_ldap_local_registration_page()
{
update_option("mo_ldap_local_new_registration", "true");
?>
<!--Register with miniOrange-->
<form name="f" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_register_customer" />
<p>Just complete the short registration below to configure your own LDAP Server. Please enter a valid email id that you have access to. You will be able to move forward after verifying an OTP that we will send to this email.</p>
<div class="mo_ldap_table_layout" style="min-height: 274px;">
<h3>Register with miniOrange</h3>
<div id="panel1">
<table class="mo_ldap_settings_table">
<tr>
<td><b><font color="#FF0000">*</font>Email:</b></td>
<td>
<?php
$current_user = wp_get_current_user();
if (get_option("mo_ldap_local_admin_email")) {
goto j8;
}
$Of = $current_user->user_email;
goto cz;
j8:
$Of = get_option("mo_ldap_local_admin_email");
cz:
?>
<input class="mo_ldap_table_textbox" type="email" name="email"
required placeholder="[email protected]"
value="<?php
echo $Of;
?>
" /></td>
</tr>
<tr>
<td><b>Phone number:</b></td>
<td><input class="mo_ldap_table_textbox" type="tel" id="phone"
pattern="[\+]\d{11,14}|[\+]\d{1,4}([\s]{0,1})(\d{0}|\d{9,10})" name="phone"
title="Phone with country code eg. +1xxxxxxxxxx"
placeholder="Phone with country code eg. +1xxxxxxxxxx"
value="<?php
echo get_option("mo_ldap_local_admin_phone");
?>
" />
<i>We will call only if you call for support</i><br><br></td>
</tr>
<tr>
<td><b><font color="#FF0000">*</font>Password:</b></td>
<td><input class="mo_ldap_table_textbox" required type="password"
name="password" placeholder="Choose your password (Min. length 6)" />
</td>
</tr>
<tr>
<td><b><font color="#FF0000">*</font>Confirm Password:</b></td>
<td><input class="mo_ldap_table_textbox" required type="password"
name="confirmPassword" placeholder="Confirm your password" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Save"
class="button button-primary button-large" /></td>
</tr>
</table>
</div>
</div>
</form>
<!--<script>
jQuery("#phone").intlTelInput();
</script> -->
<?php
}
function mo_ldap_local_ntlsl()
{
$n3 = get_option("mo_ldap_local_admin_email");
$oV = get_option("mo_ldap_local_admin_customer_key");
$st = Mo_Ldap_Local_Util::decrypt(get_option("t_site_status"));
if ($st != "true" || !$n3 || !$oV || !is_numeric(trim($oV))) {
goto wa;
}
return 1;
goto A8;
wa:
return 0;
A8:
}
add_action("flushcache", "update_status", 10, 3);
function mo_ldap_local_login_page()
{
?>
<!--Verify password with miniOrange-->
<form name="f" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_verify_customer" />
<div class="mo_ldap_table_layout">
<h3>Login with miniOrange</h3>
<div id="panel1">
<table class="mo_ldap_settings_table">
<tr>
<td><b><font color="#FF0000">*</font>Email:</b></td>
<td><input class="mo_ldap_table_textbox" type="email" name="email"
required placeholder="[email protected]"
value="<?php
echo get_option("mo_ldap_local_admin_email");
?>
" /></td>
</tr>
<tr>
<td><b><font color="#FF0000">*</font>Password:</b></td>
<td><input class="mo_ldap_table_textbox" required type="password"
name="password" placeholder="Enter your miniOrange password" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" class="button button-primary button-large" /> <a
href="#cancel_link">Cancel</a>
<a target="_blank"
href="https://login.xecurify.com/moas/idp/resetpassword">Click
here if you forgot your password?</a></td>
</tr>
</table>
</div>
</div>
</form>
<form id="cancel_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_cancel" />
</form>
<script>
jQuery('a[href="#cancel_link"]').click(function(){
jQuery('#cancel_form').submit();
});
jQuery('a[href="#mo_ldap_local_forgot_password_link"]').click(function(){
jQuery('#forgot_password_form').submit();
});
</script>
<?php
}
function mo_ldap_local_account_page()
{
?>
<div style="background-color:#FFFFFF; border:1px solid #CCCCCC; padding:0px 0px 0px 10px; width:98%;height:344px">
<div>
<h4>Thank You for registering with miniOrange.</h4>
<h3>Your Profile</h3>
<table border="1" style="background-color:#FFFFFF; border:1px solid #CCCCCC; border-collapse: collapse; padding:0px 0px 0px 10px; margin:2px; width:85%">
<tr>
<td style="width:45%; padding: 10px;">Username/Email</td>
<td style="width:55%; padding: 10px;"><?php
echo get_option("mo_ldap_local_admin_email");
?>
</td>
</tr>
<tr>
<td style="width:45%; padding: 10px;">Customer ID</td>
<td style="width:55%; padding: 10px;"><?php
echo get_option("mo_ldap_local_admin_customer_key");
?>
</td>
</tr>
<tr>
<td style="width:45%; padding: 10px;">API Key</td>
<td style="width:55%; padding: 10px;"><?php
echo get_option("mo_ldap_local_admin_api_key");
?>
</td>
</tr>
<tr>
<td style="width:45%; padding: 10px;">Token Key</td>
<td style="width:55%; padding: 10px;"><?php
echo get_option("mo_ldap_local_customer_token");
?>
</td>
</tr>
</table>
<br/>
<p><a target="_blank" href="<?php
echo get_option("mo_ldap_local_host_name") . "/moas/idp/resetpassword";
?>
">Click here</a> if you forgot your password to your miniOrange account.</p>
</div>
</div>
<?php
if (!(isset($_POST["option"]) && ($_POST["option"] == "mo_ldap_local_verify_customer" || $_POST["option"] == "mo_ldap_local_register_customer"))) {
goto vj;
}
?>
<script>
window.location.href = "<?php
echo add_query_arg(array("tab" => "pricing"), $_SERVER["REQUEST_URI"]);
?>
";
</script>
<?php
vj:
}
function mo_ldap_local_link()
{
?>
<a href="http://miniorange.com/wordpress-ldap-login" style="display:none;">Login to WordPress using LDAP</a>
<a href="http://miniorange.com/cloud-identity-broker-service" style="display:none;">Cloud Identity broker service</a>
<a href="http://miniorange.com/strong_auth" style="display:none;"></a>
<a href="http://miniorange.com/single-sign-on-sso" style="display:none;"></a>
<a href="http://miniorange.com/fraud" style="display:none;"></a>
<?php
}
function mo_ldap_local_xhsl()
{
$gK = DateTime::createFromFormat("Y-m-d H:i:s.u", sanitizeElement());
return $gK->format("F j, Y, g:i a");
}
function decryptLDAPElement()
{
$KL = file_get_contents(plugins_url("resources/en_li.mo", __FILE__));
$vi = get_option("mo_ldap_local_customer_token");
$KL = Mo_Ldap_Local_Util::decrypt($KL);
if (!empty($KL)) {
goto yP;
}
return true;
yP:
$Fl = get_option("mo_ldap_local_admin_api_key");
$KL = Mo_Ldap_Local_Util::decrypt($KL);
$Dd = simplexml_load_string($KL);
$uZ = $Dd->signature;
$YN = $Dd->token;
$YN = Mo_Ldap_Local_Util::decrypt($YN);
$C9 = str_split($YN, $HS = 64);
$YN = "-----BEGIN PUBLIC KEY-----\xa";
foreach ($C9 as $aa) {
$YN .= $aa . "\xa";
Cm:
}
X5:
$YN .= "-----END PUBLIC KEY-----";
$iu = openssl_get_publickey($YN);
$hK = $Dd->expirationTime;
$uZ = base64_decode($uZ);
$ww = openssl_verify($hK, $uZ, $iu, OPENSSL_ALGO_SHA1);
if (!($ww == 1)) {
goto ty;
}
$cI = $Dd->expirationTime;
$qD = strtotime($cI);
$Au = time();
if ($Au > $qD) {
goto QO;
}
$Bl = new Mo_Ldap_Local_Customer();
$B_ = $qD - $Au;
$N0 = $B_ / (60 * 60 * 24);
$N0 = intval($N0);
if ($N0 < 1 && !get_option("mo_ldap_local_alert_sent_for_one")) {
goto w8;
}
if (!($N0 < 2 && !get_option("mo_ldap_local_alert_sent_for_two"))) {
goto aX;
}
$Bl->mo_ldap_local_send_alert_email(2);
update_option("mo_ldap_local_alert_sent_for_two", true);
aX:
goto tZ;
w8:
$Bl->mo_ldap_local_send_alert_email(1);
update_option("mo_ldap_local_alert_sent_for_one", true);
tZ:
return false;
goto mo;
QO:
return true;
mo:
ty:
return true;
}
function mo_ldap_local_configuration_page()
{
$Gv = get_option("mo_ldap_local_default_config");
$PR = get_option("mo_ldap_local_server_url") ? Mo_Ldap_Local_Util::decrypt(get_option("mo_ldap_local_server_url")) : '';
$V6 = get_option("mo_ldap_local_server_dn") ? Mo_Ldap_Local_Util::decrypt(get_option("mo_ldap_local_server_dn")) : '';
$xq = get_option("mo_ldap_local_server_password") ? Mo_Ldap_Local_Util::decrypt(get_option("mo_ldap_local_server_password")) : '';
$iK = get_option("mo_ldap_local_search_base") ? Mo_Ldap_Local_Util::decrypt(get_option("mo_ldap_local_search_base")) : '';
$u5 = Mo_Ldap_Local_Util::decrypt(get_option("mo_ldap_local_username_attribute"));
$Io = get_option("mo_ldap_local_search_filter") ? Mo_Ldap_Local_Util::decrypt(get_option("mo_ldap_local_search_filter")) : '';
$Z4 = get_option("mo_ldap_local_enable_both_login");
if ($Z4) {
goto ls;
}
update_option("mo_ldap_local_enable_both_login", "admin");
ls:
$gJ = get_option("mo_ldap_local_redirect_to");
$WS = '';
if (!(get_option("mo_ldap_local_server_url_status") && !Mo_Ldap_Local_Util::check_empty_or_null($PR))) {
goto CY;
}
if (get_option("mo_ldap_local_server_url_status") == "VALID") {
goto MV;
}
if (!(get_option("mo_ldap_local_server_url_status") == "INVALID")) {
goto mX;
}
$WS = "mo_ldap_input_error";
mX:
goto GT;
MV:
$WS = "mo_ldap_input_success";
GT:
CY:
$jt = '';
if (!get_option("mo_ldap_local_service_account_status")) {
goto fm;
}
if (get_option("mo_ldap_local_service_account_status") == "VALID") {
goto yX;
}
if (!(get_option("mo_ldap_local_service_account_status") == "INVALID")) {
goto vh;
}
$jt = "mo_ldap_input_error";
vh:
goto Fy;
yX:
$jt = "mo_ldap_input_success";
Fy:
fm:
$jY = '';
if (!get_option("mo_ldap_local_user_mapping_status")) {
goto rW;
}
if (get_option("mo_ldap_local_user_mapping_status") == "VALID") {
goto aK;
}
if (!(get_option("mo_ldap_local_user_mapping_status") == "INVALID")) {
goto xS;
}
$jY = "mo_ldap_input_error";
xS:
goto wS;
aK:
$jY = "mo_ldap_input_success";
wS:
rW:
$dH = '';
if (!get_option("mo_ldap_local_username_status")) {
goto oL;
}
if (get_option("mo_ldap_local_username_status") == "VALID") {
goto Tn;
}
if (!(get_option("mo_ldap_local_username_status") == "INVALID")) {
goto FA;
}
$dH = "mo_ldap_input_error";
FA:
goto Us;
Tn:
$dH = "mo_ldap_input_success";
Us:
delete_option("mo_ldap_local_username_status");
oL:
?>
<div class="mo_ldap_small_layout" style="margin-top:0px;">
<!-- Toggle checkbox -->
<?php
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto OF;
}
if (!NddKoYsdasadJD()) {
goto CJ;
}
if (mo_ldap_local_ntlsl()) {
goto HF;
}
if (!get_option("mo_ldap_local_file_changed")) {
goto qY;
}
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Don't try to change the plugin. Please revert the changes to make the plugin work.</div>
<?php
qY:
goto lR;
HF:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">You are on Trial version of the plugin and it will expire on <span style="color:#0073aa"><?php
echo mo_ldap_local_xhsl();
?>
</span>. <?php
if (ch_xdigit()) {
goto oP;
}
?>
If you already purchased license <a href="#activatelicense">click here to activate</a> your license.<?php
goto Sm;
oP:
?>
Click <a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">here</a> to activate your license.<?php
Sm:
?>
</div>
<?php
lR:
goto bR;
CJ:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">
<?php
if (signNode() && !ch_xdigit()) {
goto Fv;
}
?>
Please enter your<a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
"> license key</a> to activate the plugin.<?php
goto hy;
Fv:
?>
<a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">Click here</a> to activate your 5 days FREE Trial for the plugin.<?php
hy:
?>
</div>
<?php
bR:
goto LC;
OF:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Please <a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">Register or Login with miniOrange</a> to configure the miniOrange LDAP Plugin.</div>
<?php
LC:
?>
<form name="f" id="enable_login_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_enable" />
<h3>Enable login using LDAP</h3>
<?php
if (isset($PR) && $PR != '') {
goto A1;
}
?>
<input type="checkbox" id="enable_ldap_login" name="enable_ldap_login" value="1" <?php
checked(get_option("mo_ldap_local_enable_login") == 1);
?>
disabled <?php
if (NddKoYsdasadJD()) {
goto Db;
}
echo "disabled";
Db:
?>
/>Enable LDAP login
<?php
goto m0;
A1:
?>
<input type="checkbox" id="enable_ldap_login" name="enable_ldap_login" value="1" <?php
checked(get_option("mo_ldap_local_enable_login") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto o9;
}
echo "disabled";
o9:
?>
<?php
if (NddKoYsdasadJD()) {
goto xK;
}
echo "disabled";
xK:
?>
/>Enable LDAP login
<?php
m0:
?>
<p>Enabling LDAP login will protect your login page by your configured LDAP. <b>Please check this only after you have successfully tested your configuration</b> as the default WordPress login will stop working.</p>
</form>
<script>
jQuery('#enable_ldap_login').change(function() {
jQuery('#enable_login_form').submit();
});
</script>
Authenticate users from both LDAP and WordPress ( This will allow users to use either of WordPress credentials or LDAP credentials. )
<form name="f" id="enable_both_login_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_enable_both_login" />
<input type="radio" class="mo_ldap_local_enable_both_login" name="mo_ldap_local_enable_both_login" value="admin" <?php
checked(get_option("mo_ldap_local_enable_both_login") == "admin");
?>
<?php
if (NddKoYsdasadJD()) {
goto Gi;
}
echo "disabled";
Gi:
?>
/> Only Administrators
<input type="radio" class="mo_ldap_local_enable_both_login" name="mo_ldap_local_enable_both_login" value="all" <?php
checked(get_option("mo_ldap_local_enable_both_login") == "all");
?>
<?php
if (NddKoYsdasadJD()) {
goto rq;
}
echo "disabled";
rq:
?>
/> All Users
<input type="radio" class="mo_ldap_local_enable_both_login" name="mo_ldap_local_enable_both_login" value="none" <?php
checked(get_option("mo_ldap_local_enable_both_login") == "none");
?>
<?php
if (NddKoYsdasadJD()) {
goto Tp;
}
echo "disabled";
Tp:
?>
/> None
</form>
<br>
<?php
$gJ = get_option("mo_ldap_local_redirect_to");
$J7 = get_option("mo_ldap_local_custom_redirect");
?>
<b>Redirect after authentication</b><br>
<form name="f" id="form_redirect_to" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_save_login_redirect" />
<select id="redirect_to" name="redirect_to"<?php
if (NddKoYsdasadJD()) {
goto nr;
}
echo "disabled";
nr:
?>
>
<option value="none" <?php
if (!($gJ == "none" || !$gJ)) {
goto yf;
}
echo "selected";
yf:
?>
>NONE</option>
<option value="profile" <?php
if (!($gJ == "profile")) {
goto xt;
}
echo "selected";
xt:
?>
>Profile Page</option>
<option value="homepage" <?php
if (!($gJ == "homepage")) {
goto cu;
}
echo "selected";
cu:
?>
>Home Page</option>
<option value="custom" <?php
if (!($gJ == "custom")) {
goto ht;
}
echo "selected";
ht:
?>
>Custom Page</option>
</select><br>
</form>
<form name="custom_redirect_form" id="custom_redirect_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_custom_redirect">
<input class="mo_ldap_table_textbox" type="url" id="mo_ldap_local_custom_url" name="mo_ldap_local_custom_url" required placeholder="" value="<?php
echo $J7;
?>
" <?php
if ($gJ == "custom") {
goto nw;
}
?>
style="display: none" <?php
goto mT;
nw:
?>
style="display: block" <?php
mT:
?>
<?php
if (NddKoYsdasadJD()) {
goto f1;
}
echo "disabled";
f1:
?>
/>
<input type="submit" class="button button-primary button-large" value="Save" <?php
if ($gJ == "custom") {
goto kB;
}
?>
style="display: none" <?php
goto yO;
kB:
?>
style="display: block" <?php
yO:
?>
<?php
if (NddKoYsdasadJD()) {
goto Ga;
}
echo "disabled";
Ga:
?>
/>
</form>
<script>
jQuery('#redirect_to').change(function() {
jQuery('#form_redirect_to').submit();
});
jQuery('.mo_ldap_local_enable_both_login').change(function() {
jQuery('#enable_both_login_form').submit();
});
</script>
<br>
<!--
<form name="f" id="enable_fallback_login_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_fallback_login" />
<input type="checkbox" id="mo_ldap_local_enable_fallback_login" name="mo_ldap_local_enable_fallback_login" value="1" <?php
checked(get_option("mo_ldap_local_enable_fallback_login") == 1);
?>
/>Enable Fallback Login with Wordpress password(If LDAP Server is unreacheable). This will update your local Wordpress password as your LDAP password. RECOMMENDED to be <b>FALSE</b>
</form>
<br>-->
<!-- Toggle checkbox -->
<form name="f" id="enable_register_user_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_register_user" />
<input type="checkbox" id="mo_ldap_local_register_user" name="mo_ldap_local_register_user" value="1" <?php
checked(get_option("mo_ldap_local_register_user") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto nh;
}
echo "disabled";
nh:
?>
/>Enable Auto Registering users if they do not exist in WordPress
</form>
<br>
<form name="f" id="enable_authorized_users_only" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_authorized_users_only" />
<input type="checkbox" id="authorized_users_only" name="authorized_users_only" value="1" <?php
checked(get_option("mo_ldap_local_authorized_users_only") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto oj;
}
echo "disabled";
oj:
?>
/>Protect all website content by login.
</form>
<script>
jQuery('#mo_ldap_local_register_user').change(function() {
jQuery('#enable_register_user_form').submit();
});
jQuery('#enable_fallback_login_form').change(function() {
jQuery('#enable_fallback_login_form').submit();
});
jQuery('#authorized_users_only').change(function() {
jQuery('#enable_authorized_users_only').submit();
});
</script>
<br/>
</div>
<div class="mo_ldap_small_layout">
<script>
function ping_server(){
var ldapServerUrl = document.getElementById('ldap_server').value;
if(!ldapServerUrl || ldapServerUrl.trim() == ""){
alert("Enter LDAP Server URL");
} else{
var option = document.getElementById("mo_ldap_local_configuration_form_action").value = "mo_ldap_local_ping_server";
//alert(document.getElementById("mo_ldap_configuration_form_action").value);
var configForm = document.getElementById("mo_form1");
//alert(configForm);
configForm.submit();
}
}
</script>
<!-- Save LDAP Configuration -->
<form id="mo_form1" name="f" method="post" action="">
<input id="mo_ldap_local_configuration_form_action" type="hidden" name="option" value="mo_ldap_local_save_config" />
<!-- Copy default values to configuration -->
<p><strong style="font-size:14px;">NOTE: </strong> You need to find out the values for the below given fields from your LDAP Administrator.</strong></p>
<h3 class="mo_ldap_left">LDAP Connection Information</h3>
<div id="panel1">
<table class="mo_ldap_settings_table">
<tr>
<td style="width: 24%"><b><font color="#FF0000">*</font>LDAP Server:</b></td>
<td><input class="mo_ldap_table_textbox <?php
echo $WS;
?>
" type="url" id="ldap_server" name="ldap_server" required placeholder="ldap://<server_address or IP>:<port>" value="<?php
echo $PR;
?>
" <?php
if (NddKoYsdasadJD()) {
goto Xz;
}
echo "disabled";
Xz:
?>
/></td>
</tr>
<tr>
<td> </td>
<td><i>Specify the host name for the LDAP server eg: ldap://myldapserver.domain:389 , ldap://89.38.192.1:389. When using SSL, the host may have to take the form ldaps://host:636.</i>
<p><i><b><a href="https://www.miniorange.com/guide-to-setup-ldaps-on-windows-server" target="_blank">Click here</a> to go through the configuration steps to connect with LDAP server over LDAPS (LDAP over SSL:636).</b></i></p>
</td>
</tr>
<tr>
<td> </td>
<td>
<input type="checkbox" name="anonymous_bind" value="1" <?php
checked(get_option("mo_ldap_local_anonymous_bind") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto mC;
}
echo "disabled";
mC:
?>
onchange="enable(this)">Bind anonymously (to check connection to server).
</td>
<td> </td>
</tr>
<tr>
<td></td>
<td><input type="button" class="button button-primary button-large" id="ping_button" onclick="ping_server();" value="Contact LDAP Server" <?php
if (NddKoYsdasadJD()) {
goto fa;
}
echo "disabled";
fa:
?>
<?php
if (!(get_option("mo_ldap_local_anonymous_bind") == 0)) {
goto ss;
}
echo "style="display: none;" ";
ss:
?>
/> <span id="pingResult"></span></td>
<td></td>
</tr>
<tr><td> </td></tr>
<tr>
<td> </td>
<td>
<input type="checkbox" name="mo_ldap_local_tls_enable" value="1" <?php
checked(get_option("mo_ldap_local_use_tls") == 1);
if (NddKoYsdasadJD()) {
goto BZ;
}
echo "disabled";
BZ:
?>
onchange="enabletls(this)"> <b>Enable TLS</b> (Check this only if your server use TLS Connection.)
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td><b><font color="#FF0000">*</font>Service Account DN:</b></td>
<td><input class="mo_ldap_table_textbox <?php
echo $jt;
?>
" type="text" id="dn" name="dn" required placeholder="CN=service,DC=domain,DC=com" value="<?php
echo $V6;
?>
" <?php
if (NddKoYsdasadJD()) {
goto gA;
}
echo "disabled";
gA:
?>
/></td>
</tr>
<tr>
<td> </td>
<td><i>This service account will be used to establish the connection.<br>Specify the Service Account DN(distinguished Name) of the LDAP server. e.g. cn=username,cn=group,dc=domain,dc=com<br/>uid=username,ou=organisational unit,dc=domain,dc=com.</i></td>
</tr>
<tr><td> </td></tr>
<tr>
<td><b><font color="#FF0000">*</font>Service Account Password:</b></td>
<td><input class="mo_ldap_table_textbox <?php
echo $jt;
?>
" required type="password" name="admin_password" placeholder="Enter password of Service Account" value="<?php
echo $xq;
?>
" <?php
if (NddKoYsdasadJD()) {
goto oC;
}
echo "disabled";
oC:
?>
/></td>
</tr>
<tr>
<td> </td>
<td><i>Password for the Service Account in the LDAP Server.</i></td>
</tr>
<tr><td> </td></tr>
<tr>
<td> </td>
<td><input type="submit" class="button button-primary button-large" value="Test Connection & Save" <?php
if (NddKoYsdasadJD()) {
goto Mz;
}
echo "disabled";
Mz:
?>
/> <input
type="button" id="conn_help" class="help button button-large trouble_button" value="Troubleshooting" <?php
if (NddKoYsdasadJD()) {
goto iI;
}
echo "disabled";
iI:
?>
/></td>
</tr>
<tr>
<td colspan="2" id="conn_troubleshoot" hidden>
<p>
<strong>Are you having trouble connecting to your LDAP server from this plugin?</strong>
<ol>
<li>Please make sure that all the values entered are correct.</li>
<li>If you are having firewall, open the firewall to allow incoming requests to your LDAP from your WordPress <b>Server IP</b> and <b>port 389.</b></li>
<li>If you are still having problems, submit a query using the support panel on the right hand side.</li>
</ol>
</p>
</td>
</tr>
</table>
</div>
</form>
</div>
<form name="f" id="mo_ldap_local_tls_enable_form" method="post" action="" style="display:none">
<input type="hidden" name="option" value="mo_ldap_local_tls_enable">
<input type="checkbox" id="mo_ldap_local_tls_enable" name="mo_ldap_local_tls_enable" value="1"> <b>Enable TLS</b> (Check this only if your server use TLS Connection.)
</form>
<form name="f" id="enable_authorized_anonymous_bind" method="post" action="" style="display:none">
<input type="hidden" name="option" value="anonymous_bind" >
<input type="checkbox" id="anonymous_bind" name="anonymous_bind" value="1" >Enable to anonymously bind.
</form>
<script>
function enabletls(enabletls){
if(enabletls.checked)
jQuery("#mo_ldap_local_tls_enable").prop('checked', true);
else
jQuery("#mo_ldap_local_tls_enable").prop('checked', false);
jQuery("#mo_ldap_local_tls_enable_form").submit();
}
function enable(enable){
if(enable.checked)
document.getElementById('ping_button').style.display = 'block';
else
document.getElementById('ping_button').style.display = 'none';
}
</script>
<script>
window.onload = function() {
if(<?php
echo get_option("mo_ldap_local_anonymous_bind");
?>
== '1') {
document.getElementById('ping_button').style.display = 'block';
} else {
document.getElementById('ping_button').style.display = 'none';
}
}
</script>
<div class="mo_ldap_small_layout">
<h3>LDAP User Mapping Configuration</h3>
<form id="mo_form1" name="f" method="post" action="">
<input id="mo_ldap_local_configuration_form_action" type="hidden" name="option" value="mo_ldap_local_save_user_mapping" />
<div id="panel1">
<table class="mo_ldap_settings_table">
<tr>
<td style="width: 24%"></td>
<td></td>
</tr>
<tr>
<td><b><font color="#FF0000">*</font>Search Base(s):</b></td>
<td><input class="mo_ldap_table_textbox <?php
echo $jY;
?>
" type="text" id="search_base" name="search_base" required placeholder="dc=domain,dc=com" value="<?php
echo $iK;
?>
" <?php
if (NddKoYsdasadJD()) {
goto qP;
}
echo "disabled";
qP:
?>
/></td>
</tr>
<tr>
<td> </td>
<td><i>This is the LDAP Tree under which we will search for the users for authentication. If we are not able to find a user in LDAP it means they are not present in this search base or any of its sub trees. They may be present in some other search base.<br> Provide the distinguished name of the Search Base object. <b>eg. cn=Users,dc=domain,dc=com</b>. If you have users in different locations in the directory(OU's), separate the distinguished names of the search base objects by a semi-colon(;). <b>eg. cn=Users,dc=domain,dc=com; ou=people,dc=domian,dc=com</b></i><br><br></td>
</tr>
<tr>
<td><b><font color="#FF0000"></font>Search Conditions:</b></td>
<td>
<label class="switch">
<input type="checkbox" id="search_filter_check" name="ldap_search_filters" value="1" <?php
checked(get_option("mo_local_filter_check") == 1);
if (NddKoYsdasadJD()) {
goto OL;
}
echo "disabled";
OL:
?>
>
<div class="slider round"></div>
</label>
</td>
</tr>
<tr><td></td><td><b>Enable Custom Search Filter </b>(Enable this to add more search-filter conditions.)</td></tr>
<tr>
<td></td>
<td>
<div id="user_div"
style="<?php
if (!(get_option("mo_local_filter_check") == 1)) {
goto eM;
}
echo "display: none;";
eM:
?>
">
<table>
<tr>
<td width="130px;">
<b><font color="#FF0000">*</font>Username Attribute:</b></td>
<td>
<input class="mo_ldap_table_textbox <?php
if (empty($u5)) {
goto wb;
}
echo $jY;
wb:
?>
"
type="text" name="username_attribute_text" size="40" id="username_attribute_id"
<?php
if (!(get_option("mo_local_filter_check") == 0)) {
goto FQ;
}
echo "required";
FQ:
?>
value="<?php
echo $u5;
?>
"
placeholder="Enter Username Attribute" <?php
if (NddKoYsdasadJD()) {
goto ln;
}
echo "disabled";
ln:
?>
>
</td>
</tr>
<tr>
<td colspan="2"><i>This field is important for two reasons. <br>1. While searching for
users, this is the attribute that is going to be matched to see if the
user exists. <br>2. If you want your users to login with their username
or firstname.lastname or email - you need to specify those options in
this field. e.g. <b> LDAP_ATTRIBUTE</b>. Replace <b><LDAP_ATTRIBUTE></b>
with the attribute where your username is stored. Some common attributes
are
<ol>
<table>
<tr>
<td style="width:50%">common name</td>
<td><b>cn</b></td>
</tr>
<tr>
<td>email</td>
<td><b>mail</b></td>
</tr>
<tr>
<td>logon name</td>
<td><b>sAMAccountName</b><br/><b>userPrincipalName</b></td>
</tr>
<tr>
<td>custom attribute where you store your WordPress
usernames use
</td>
<td><b>customAttribute</b></td>
</tr>
</table>
<br>
You can even allow logging in with multiple attributes, separated
with <b>' ; ' </b>. e.g. you can allow logging in with username or
email. e.g.<b> cn;mail</b>
</ol>
</tr>
<tr>
<td colspan="2"><b>Please make clear that the attributes that we are showing are examples and the actual ones could be different. These should be confirmed with the LDAP Admin.</b></td>
</tr>
</table>
</div>
</td>
</tr>
<tr><td></td>
<td>
<div id="ldap_search_filter_div"
style="<?php
if (!(get_option("mo_local_filter_check") == 0)) {
goto s0;
}
echo "display: none;";
s0:
?>
">
<table>
<tr>
<td width="140px;">
<b>
<font color="#FF0000">*</font>Custom Search Filter:</b></td>
<td>
<input class="mo_ldap_table_textbox <?php
echo $jY;
?>
"
type="text" id="search_filter" name="search_filter"
placeholder="(&(objectClass=*)(cn=?))"
<?php
if (!(get_option("mo_local_filter_check") == 1)) {
goto B4;
}
echo "required";
B4:
?>
value="<?php
echo $Io;
?>
"
pattern=".*\?.*"
title="Must contain Question Mark(?) for attributes you want to match e.g. (&(objectClass=*)(uid=?))" <?php
if (NddKoYsdasadJD()) {
goto gn;
}
echo "disabled";
gn:
?>
/>
</td>
</tr>
<tr>
<td colspan="2"><i>This field is important for two reasons. <br>1. While searching for users, this is the attribute that is going to be matched to see if the user exists. <br>2. If you want your users to login with their username or firstname.lastname or email - you need to specify those options in this field. e.g. <b>(&(objectClass=*)(<LDAP_ATTRIBUTE>=?))</b>. Replace <b><LDAP_ATTRIBUTE></b> with the attribute where your username is stored. Some common attributes are
<ol>
<table>
<tr><td style="width:50%">common name</td><td>(&(objectClass=*)(<b>cn</b>=?))</td></tr>
<tr><td>email</td><td>(&(objectClass=*)(<b>mail</b>=?))</td></tr>
<tr><td>logon name</td><td>(&(objectClass=*)(<b>sAMAccountName</b>=?))<br/>(&(objectClass=*)(<b>userPrincipalName</b>=?))</td></tr>
<tr><td>custom attribute where you store your WordPress usernames use</td> <td>(&(objectClass=*)(<b>customAttribute</b>=?))</td></tr>
</table><br>
You can even allow logging in with multiple attributes e.g. you can allow logging in with username or email e.g. (&(objectClass=*)(<b>|</b>(<b>cn=?</b>)(<b>mail=?</b>)))
</ol>
</tr>
<tr><td colspan="2" >Please make clear that the attributes that we are showing are examples and the actual ones could be different. These should be confirmed with the LDAP Admin.</td>
</tr>
</td>
</tr>
</table>
</div>
</td>
</tr>
<script>
jQuery("#search_filter_check").click(function () {
if (jQuery(this).is(":checked")) {
jQuery("#ldap_search_filter_div").slideDown();
jQuery("#user_div").slideUp();
jQuery("#username_attribute_id").attr("required", false);
jQuery("#search_filter").attr("required",true);
}
else
{
jQuery("#ldap_search_filter_div").slideUp();
jQuery("#user_div").slideDown();
jQuery("#username_attribute_id").attr("required", true);
jQuery("#search_filter").attr("required",false);
}
});
</script>
<tr><td> </td></tr>
<tr>
<td> </td>
<td><input type="submit" class="button button-primary button-large" value="Save User Mapping" <?php
if (NddKoYsdasadJD()) {
goto fx;
}
echo "disabled";
fx:
?>
/> <input
type="button" id="conn_help_user_mapping" class="help button button-large trouble_button" value="Troubleshooting" <?php
if (NddKoYsdasadJD()) {
goto sv;
}
echo "disabled";
sv:
?>
/></td>
</tr>
<tr>
<td colspan="2" id="conn_user_mapping_troubleshoot" hidden>
<strong>Are you having trouble connecting to your LDAP server from this plugin?</strong>
<ol>
<li>The <b>search base</b> URL is typed incorrectly. Please verify if that search base is present.</li>
<li>User is not present in that search base. The user may be present in the directory but in some other tree and you may have entered a tree where this users is not present.</li>
<li><b>Search filter</b> is incorrect - User is present in the search base but the username is mapped to a different attribute in the search filter. E.g. you may be logging in with username and may have mapped it to the email attribute. So this wont work. Please make sure that the right attribute is mentioned in the search filter (with which you want the mapping to happen)</li>
<li>Please make sure that the user is present and test with the right user.</li>
<li>If you are still having problems, submit a query using the support panel on the right hand side.</li>
</ol>
</td>
</tr>
</table>
</div>
</form>
</div>
<div class="mo_ldap_small_layout">
<!-- Authenticate with LDAP configuration -->
<form name="f" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_test_auth" />
<h3>Test Authentication</h3>
<div id="test_conn_msg"></div>
<div id="panel1">
<table class="mo_ldap_settings_table">
<tr>
<td style="width: 24%"><b><font color="#FF0000">*</font>Username:</b></td>
<td><input class="mo_ldap_table_textbox <?php
if (!isset($_POST["test_username"])) {
goto Hp;
}
echo $jY;
Hp:
?>
" type="text" name="test_username" required placeholder="Enter username" value="<?php
if (!isset($_POST["test_username"])) {
goto bs;
}
echo $_POST["test_username"];
bs:
?>
" <?php
if (NddKoYsdasadJD()) {
goto kf;
}
echo "disabled";
kf:
?>
/></td>
</tr>
<tr>
<td><b><font color="#FF0000">*</font>Password:</b></td>
<td><input class="mo_ldap_table_textbox <?php
if (!($jY == "mo_ldap_input_success")) {
goto FD;
}
echo $dH;
FD:
?>
" type="password" name="test_password" required placeholder="Enter password" <?php
if (NddKoYsdasadJD()) {
goto ob;
}
echo "disabled";
ob:
?>
/></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" class="button button-primary button-large" value="Test Authentication" <?php
if (NddKoYsdasadJD()) {
goto UH;
}
echo "disabled";
UH:
?>
/> <input
type="button" id="auth_help" class="help button button-large trouble_button" value="Troubleshooting" <?php
if (NddKoYsdasadJD()) {
goto PQ;
}
echo "disabled";
PQ:
?>
/></td>
</tr>
<tr>
<td colspan="2" id="auth_troubleshoot" hidden>
<p>
<strong>User is not getting authenticated? Check the following:</strong>
<ol>
<li>The username-password you are entering is correct.</li>
<li>The user is not present in the search bases you have specified against <b>SearchBase(s)</b> above.</li>
<li>Your Search Filter may be incorrect and the username mapping may be to an LDAP attribute other than the ones provided in the Search Filter</li>
</ol>
</p>
</td>
</tr>
</table>
</div>
</form>
</div>
<script>
<?php
if (Mo_Ldap_Local_Util::is_customer_registered()) {
goto Hw;
}
?>
jQuery( document ).ready(function() {
jQuery("#configurationForm :input").prop("disabled", true);
jQuery("#configurationForm :input[type=text]").val("");
jQuery("#configurationForm :input[type=url]").val("");
});
<?php
Hw:
?>
</script>
<?php
}
function NddKoYsdasadJD()
{
$st = Mo_Ldap_Local_Util::decrypt(get_option("t_site_status"));
$Zu = get_option("mo_ldap_local_license_key");
$n3 = get_option("mo_ldap_local_admin_email");
$oV = get_option("mo_ldap_local_admin_customer_key");
if ($st != "true" && !$Zu || !$n3 || !$oV || !is_numeric(trim($oV))) {
goto RC;
}
return 1;
goto D8;
RC:
return 0;
D8:
}
function signNode()
{
if (!file_exists(plugin_dir_path(__FILE__) . "resources/en_li.mo")) {
goto M2;
}
return true;
M2:
return false;
}
function mo_ldap_local_troubleshooting()
{
?>
<div class="mo_ldap_table_layout">
<table class="mo_ldap_help">
<tbody><tr>
<td class="mo_ldap_help_cell">
<div id="help_curl_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">How to enable PHP cURL extension? (Pre-requisite)</div>
</div>
<div hidden="" id="help_curl_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li style="font-size: large; font-weight: bold">Step 1 </li>
<li style="font-size: large; font-weight: bold"><b>Loaded configuration file : <?php
echo php_ini_loaded_file();
?>
</b></li>
<li style="list-style-type:square;margin-left:20px">Open php.ini file from above file path</b></li><br/>
<li style="font-size: large; font-weight: bold">Step 2</li>
<li style="font-weight: bold"><font color="#C31111"><b>For Windows users</b></font></li>
<li style="list-style-type:square;margin-left:20px">Search for <b>"extension=php_curl.dll"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li>
<li><font color="#C31111"><b>For Linux users</b></font>
<ul style="list-style-type:square;margin-left: 20px">
<li style="margin-top: 5px">Install php curl extension (If not installed yet)
<ul style="list-style-type:disc;margin-left: 15px;margin-top: 5px">
<li>For Debian, the installation command would be <b>apt-get install php-curl</b></li>
<li>For RHEL based systems, the command would be <b>yum install php-curl</b></li></ul></li></li>
<li>Search for <b>"extension=php_curl.so"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li></ul><br/>
<li style="margin-top: 5px;font-size: large; font-weight: bold">Step 3</li>
<li style="list-style-type:square;margin-left:20px">Restart your server. After that refresh the "LDAP/AD" plugin configuration page.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_ldap_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">How to enable PHP LDAP extension? (Pre-requisite)</div>
</div>
<div hidden="" style="padding: 2px 2px 2px 12px" id="help_ldap_desc" class="mo_ldap_help_desc">
<ul>
<li style="font-size: large; font-weight: bold">Step 1 </li>
<li style="font-size: large; font-weight: bold"><b>Loaded configuration file : <?php
echo php_ini_loaded_file();
?>
</b></li>
<li style="list-style-type:square;margin-left:20px">Open php.ini file from above file path</b></li><br/>
<li style="font-size: large; font-weight: bold">Step 2</li>
<li style="font-weight: bold"><font color="#C31111"><b>For Windows users using Apache Server</b></font></li>
<li style="list-style-type:square;margin-left:20px">Search for <b>"extension=php_ldap.dll"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li>
<li style="font-weight: bold"><font color="#C31111"><b>For Windows users using IIS server</b></font></li>
<li style="list-style-type:square;margin-left:20px">Search for <b>"ExtensionList"</b> in the php.ini file. Uncomment the <b>"extension=php_ldap.dll"</b> line, if not present then add this line in the file and save the file.</li>
<li><font color="#C31111"><b>For Linux users</b></font>
<ul style="list-style-type:square;margin-left: 20px">
<li style="margin-top: 5px">Install php ldap extension (If not installed yet)
<ul style="list-style-type:disc;margin-left: 15px;margin-top: 5px">
<li>For Debian, the installation command would be <b>apt-get install php-ldap</b></li>
<li>For RHEL based systems, the command would be <b>yum install php-ldap</b></li></ul></li></li>
<li>Search for <b>"extension=php_ldap.so"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li></ul><br/>
<li style="margin-top: 5px;font-size: large; font-weight: bold">Step 3</li>
<li style="list-style-type:square;margin-left:20px">Restart your server. After that refresh the "LDAP/AD" plugin configuration page.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="connect_using_ldaps" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">How to setup/connect LDAP Server using LDAPS (LDAP over SSL)?</div>
</div>
<div hidden="" id="connect_ldaps_server" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li><a href="https://www.miniorange.com/guide-to-setup-ldaps-on-windows-server" target="_blank">Click here</a> to go through the configuration steps to connect with LDAP server over LDAPS (LDAP over SSL:636).</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_ping_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">Why is Contact LDAP Server not working?</div>
</div>
<div hidden="" id="help_ping_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. Check your LDAP Server URL to see if it is correct.<br>
eg. ldap://myldapserver.domain:389 , ldap://89.38.192.1:389. When using SSL, the host may have to take the form ldaps://host:636.</li>
<li>2. Your LDAP Server may be behind a firewall. Check if the firewall is open to allow requests from your Wordpress installation.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_selinuxboolen_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">I can connect to LDAP server through the command line(using ping/telnet) but get an error when I test connection from the plugin.</div>
</div>
<div hidden="" id="help_selinuxboolen_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>This issue usually occurs for users whose wordpress is hosted on CentOS server. this error because SELinux Boolean httpd_can_network_connect is not set.<br></li>
<li>Follow these steps to resolve the issue:</li>
<li>1. Run command: setsebool -P httpd_can_network_connect on</li>
<li>2. Restart apache server.</li>
<li>3. Run command: getsebool a | grep httpd and make sure that httpd_can_network_connect is on</li>
<li>4. Try Ldap connect from the plugin again</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_invaliddn_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">Why is Test LDAP Configuration not working?</div>
</div>
<div hidden="" id="help_invaliddn_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. Check if you have entered valid Service Account DN(distinguished Name) of the LDAP server. <br>e.g. cn=username,cn=group,dc=domain,dc=com<br>
uid=username,ou=organisational unit,dc=domain,dc=com</li>
<li>2. Check if you have entered correct Password for the Service Account.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_invalidsf_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">Why is Test Authentication not working?</div>
</div>
<div hidden="" id="help_invalidsf_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. The username/password combination you provided may be incorrect.</li>
<li>2. You may have provided a <b>Search Base(s)</b> in which the user does not exist.</li>
<li>3. Your <b>Search Filter</b> may be incorrect and the username mapping may be to an LDAP attribute other than the ones provided in the Search Filter</li>
<li>4. You may have provided an incorrect <b>Distinguished Name attribute</b> for your LDAP Server.
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_seracccre_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">What are the LDAP Service Account Credentials?</div>
</div>
<div hidden="" id="help_seracccre_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. Service account is an non privileged user which is used to bind to the LDAP Server. It is the preferred method of binding to the LDAP Server if you have to perform search operations on the directory.</li>
<li>2. The distinguished name(DN) of the service account object and the password are provided as credentials.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_sbase_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">What is meant by Search Base in my LDAP environment?</div>
</div>
<div hidden="" id="help_sbase_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. Search Base denotes the location in the directory where the search for a particular directory object begins.</li>
<li>2. It is denoted as the distinguished name of the search base directory object. eg: CN=Users,DC=domain,DC=com.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_sfilter_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">What is meant by Search Filter in my LDAP environment?</div>
</div>
<div hidden="" id="help_sfilter_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. Search Filter is a basic LDAP Query for searching users based on mapping of username to a particular LDAP attribute.</li>
<li>2. The following are some commonly used Search Filters. You will need to use a search filter which uses the attributes specific to your LDAP environment. Confirm from your LDAP administrator.</li>
<ul>
<table>
<tr><td style="width:50%">common name</td><td>(&(objectClass=*)(<b>cn</b>=?))</td></tr>
<tr><td>email</td><td>(&(objectClass=*)(<b>mail</b>=?))</td></tr>
<tr><td>logon name</td><td>(&(objectClass=*)(<b>sAMAccountName</b>=?))<br/>(&(objectClass=*)(<b>userPrincipalName</b>=?))</td></tr>
<tr><td>custom attribute where you store your WordPress usernames use</td> <td>(&(objectClass=*)(<b>customAttribute</b>=?))</td></tr>
<tr><td>if you store Wordpress usernames in multiple attributes(eg: some users login using email and others using their username)</td><td>(&(objectClass=*)(<b>|</b>(<b>cn=?</b>)(<b>mail=?</b>)))</td></tr>
</table>
</ul>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_ou_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">How do users present in different Organizational Units(OU's) login into Wordpress?</div>
</div>
<div hidden="" id="help_ou_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. You can provide multiple search bases seperated by a semi-colon to ensure users present in different OU's are able to login into Wordpress.</li>
<li>2. You can also provide the RootDN value in the Search Base so that users in all subtrees of the RootDN are able to login.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_loginusing_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">Some of my users login using their email and the rest using their usernames. How will both of them be able to login?</div>
</div>
<div hidden="" id="help_loginusing_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. You need to provide a search filter which checks for the username against multiple LDAP attributes.</li>
<li>2. For example, if you have some users who login using their email and some using their username, the following search filter can be applied: (&(objectClass=*)(|(mail=?)(cn=?)))</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_diffdist_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">What are the different Distinguished Name attributes?</div>
</div>
<div hidden="" id="help_diffdist_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. The distinguished name attribute depends on the LDAP environment.</li>
<li>2. For example, Active Directory(AD) uses distinguishedName to store the Distinguished Name(DN) attribute</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_rolemap_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">How Role Mapping works?</div>
</div>
<div hidden="" id="help_rolemap_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. Assign groups to Users in your LDAP.</li>
<li>2. Configure User Role Mapping against LDAP Groups. If user belongs to multiple groups, mapping which have <b>Highest WordPress Role</b> will have higher priority.</li>
<li>3. For each user login mapping will be checked and user role will be updated if different.</li>
<li>4. If user does not belong to any group, user role will be updated with default mapping value.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_multiplegroup_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">How Role Mapping works if user belongs to multiple groups?</div>
</div>
<div hidden="" id="help_multiplegroup_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>If user belongs to multiple groups, <b>Highest Role</b> will be assigned to the User from all matched Roles.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
</tbody></table>
</div>
<?php
}
function update_status()
{
$Pg = get_option("mo_ldap_local_license_key");
if (empty($Pg)) {
goto nm;
}
$Bl = new Mo_Ldap_Local_Customer();
$Bl->mo_ldap_local_update_status();
nm:
}
function mo_ldap_local_rolemapping()
{
?>
<div class="mo_ldap_small_layout" style="margin-top:0px;">
<?php
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto c3;
}
if (!NddKoYsdasadJD()) {
goto fO;
}
if (!mo_ldap_local_ntlsl()) {
goto bJ;
}
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">You are on Trial version of the plugin and it will expire on <span style="color:#0073aa"><?php
echo mo_ldap_local_xhsl();
?>
</span>. <?php
if (ch_xdigit()) {
goto fb;
}
?>
If you already purchased license <a href="#activatelicense">click here to activate</a> your license.<?php
goto Zt;
fb:
?>
Click <a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">here</a> to activate your license.<?php
Zt:
?>
</div>
<?php
bJ:
goto k7;
fO:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">
<?php
if (signNode() && !ch_xdigit()) {
goto DO1;
}
?>
Please enter your<a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
"> license key</a> to activate the plugin.<?php
goto Au;
DO1:
?>
<a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">Click here</a> to activate your 5 days FREE Trial for the plugin.<?php
Au:
?>
</div>
<?php
k7:
goto e_;
c3:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Please <a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">Register or Login with miniOrange</a> to configure the miniOrange LDAP Plugin.</div>
<?php
e_:
?>
<form name="f" id="enable_role_mapping_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_enable_role_mapping" />
<h3>LDAP Groups to WP User Role Mapping</h3>
<input type="checkbox" id="enable_ldap_role_mapping" name="enable_ldap_role_mapping" value="1" <?php
checked(get_option("mo_ldap_local_enable_role_mapping") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto gF;
}
echo "disabled";
gF:
?>
/>Enable Role Mapping
<p>Enabling Role Mapping will automatically map Users from LDAP Groups to below selected WordPress Role. Role mapping will not be applicable for primary admin of wordpress.</p>
</form>
<form name="f" id="keep_existing_user_roles_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_keep_existing_user_roles"/>
<input type="checkbox" id="keep_existing_user_roles" name="keep_existing_user_roles" value="1" <?php
checked(get_option("mo_ldap_local_keep_existing_user_roles") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto sJ;
}
echo "disabled";
sJ:
?>
/>Do not remove existing roles of users (New Roles will be added)
</form>
<form id="role_mapping_form" name="f" method="post" action="">
<input id="mo_ldap_local_user_mapping_form" type="hidden" name="option" value="mo_ldap_local_save_mapping" />
<div id="panel1">
<table class="mo_ldap_mapping_table" id="ldap_role_mapping_table" style="width:90%">
<tr>
<td colspan=2><i> Default role will be assigned to all users for which mapping is not specified.</i></td>
</tr>
<tr>
<td><font style="font-size:13px;font-weight:bold;">Default Role </font><!-- input class="mo_ldap_table_textbox" type="text" readonly name="mapping_key_default"
required value="Default Role" /-->
</td>
<td>
<select name="mapping_value_default" style="width:100%" id="default_group_mapping" <?php
if (NddKoYsdasadJD()) {
goto Oz;
}
echo "disabled";
Oz:
?>
>
<?php
if (get_option("mo_ldap_local_mapping_value_default")) {
goto gJ;
}
$Px = get_option("default_role");
goto vy;
gJ:
$Px = get_option("mo_ldap_local_mapping_value_default");
vy:
wp_dropdown_roles($Px);
?>
</select>
<select style="display:none" id="wp_roles_list">
<?php
wp_dropdown_roles($Px);
?>
</select>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td style="width:50%"><b>LDAP Group Name</b></td>
<td style="width:50%"><b>WordPress Role</b></td>
</tr>
<?php
$Q8 = 0;
if (!is_numeric(get_option("mo_ldap_local_role_mapping_count"))) {
goto hS;
}
$Q8 = intval(get_option("mo_ldap_local_role_mapping_count"));
hS:
$GG = 1;
Te:
if (!($GG <= $Q8)) {
goto ha;
}
?>
<tr>
<td><input class="mo_ldap_table_textbox" type="text" name="mapping_key_<?php
echo $GG;
?>
"
value="<?php
echo get_option("mo_ldap_local_mapping_key_" . $GG);
?>
" placeholder="cn=group,dc=domain,dc=com" <?php
if (NddKoYsdasadJD()) {
goto N7;
}
echo "disabled";
N7:
?>
/>
</td>
<td>
<select name="mapping_value_<?php
echo $GG;
?>
" id="role" style="width:100%" <?php
if (NddKoYsdasadJD()) {
goto hl;
}
echo "disabled";
hl:
?>
>
<?php
wp_dropdown_roles(get_option("mo_ldap_local_mapping_value_" . $GG));
?>
</select>
</td>
</tr>
<?php
fF:
$GG++;
goto Te;
ha:
if (!($Q8 == 0)) {
goto EY;
}
?>
<tr>
<td><input class="mo_ldap_table_textbox" type="text" name="mapping_key_1"
value="" placeholder="cn=group,dc=domain,dc=com" <?php
if (NddKoYsdasadJD()) {
goto lH;
}
echo "disabled";
lH:
?>
/>
</td>
<td>
<select name="mapping_value_1" id="role" style="width:100%" <?php
if (NddKoYsdasadJD()) {
goto Sq;
}
echo "disabled";
Sq:
?>
>
<?php
wp_dropdown_roles();
?>
</select>
</td>
</tr>
<?php
EY:
?>
</table>
<table class="mo_ldap_mapping_table" style="width:90%;">
<tr><td><a style="cursor:pointer" <?php
if (!NddKoYsdasadJD()) {
goto qC;
}
echo "id="add_mapping"";
qC:
?>
>Add More Mapping</a><br><br></td><td> </td></tr>
<tr>
<td colspan=2><i> Specify attribute which stores group names to which LDAP Users belong.</i></td>
</tr>
<tr>
<td style="width:50%"><font style="font-size:13px;font-weight:bold;">LDAP Group Attributes Name </font>
</td>
<td>
<?php
if (get_option("mo_ldap_local_mapping_memberof_attribute")) {
goto tX;
}
update_option("mo_ldap_local_mapping_memberof_attribute", "memberOf");
tX:
$dI = get_option("mo_ldap_local_mapping_memberof_attribute");
?>
<input type="text" name="mapping_memberof_attribute" required="true" placeholder="Group Attributes Name" style="width:100%;" value="<?php
echo $dI;
?>
" <?php
if (NddKoYsdasadJD()) {
goto VM;
}
echo "disabled";
VM:
?>
>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td><input type="submit" class="button button-primary button-large" value="Save Mapping" <?php
if (NddKoYsdasadJD()) {
goto l9;
}
echo "disabled";
l9:
?>
/></td>
<td> </td>
</tr>
</table>
</div>
</form>
<form method="post" id="rolemappingtest">
<br>
<h3>Test Role Mapping Configuration</h3>Enter LDAP username to test role mapping configuration
<table id="attributes_table" class="mo_ldap_settings_table">
<tbody><tr></tr>
<tr></tr>
<tr>
<td>Username</td>
<td><input type="text" id="mo_ldap_username" name="mo_ldap_username" required="" placeholder="Enter Username" style="width:61%;" <?php
if (NddKoYsdasadJD()) {
goto Tv;
}
echo "disabled";
Tv:
?>
>
</td></tr>
<tr>
<!--<td><input type="submit" value="Test Configuration" class="button button-primary button-large" /></td>-->
<td><input type="submit" value="Test Configuration" class="button button-primary button-large" <?php
if (NddKoYsdasadJD()) {
goto DQ;
}
echo "disabled";
DQ:
?>
></td>
</tr>
</tbody></table>
</form><br><br>
<?php
do_action("mo_ldap_buddypress_group_front");
?>
</div>
<script>
jQuery( document ).ready(function() {
jQuery("#default_group_mapping option[value='administrator']").remove();
});
jQuery('#enable_ldap_role_mapping').change(function() {
jQuery('#enable_role_mapping_form').submit();
});
jQuery("#keep_existing_user_roles").change(function(){
jQuery("#keep_existing_user_roles_form").submit();
});
jQuery('#add_mapping').click(function() {
var last_index_name = jQuery('#ldap_role_mapping_table tr:last .mo_ldap_table_textbox').attr('name');
var splittedArray = last_index_name.split("_");
var last_index = parseInt(splittedArray[splittedArray.length-1])+1;
var dropdown = jQuery("#wp_roles_list").html();
var new_row = '<tr><td><input class="mo_ldap_table_textbox" type="text" placeholder="cn=group,dc=domain,dc=com" name="mapping_key_'+last_index+'" value="" /></td><td><select name="mapping_value_'+last_index+'" style="width:100%" id="role">'+dropdown+'</select></td></tr>';
jQuery('#ldap_role_mapping_table tr:last').after(new_row);
});
jQuery("#rolemappingtest").submit(function(event ) {
event.preventDefault();
testRoleMappingConfiguration();
});
function testRoleMappingConfiguration(){
var username = jQuery("#mo_ldap_username").val();
var myWindow = window.open('<?php
echo site_url();
?>
' + '/?option=testrolemappingconfig&user='+username, "Test Role Mapping Configuration", "width=600, height=600");
}
</script>
<script>
<?php
if (Mo_Ldap_Local_Util::is_customer_registered()) {
goto Fs;
}
?>
jQuery( document ).ready(function() {
jQuery("#enable_role_mapping_form :input").prop("disabled", true);
jQuery("#enable_role_mapping_form :input[type=text]").val("");
jQuery("#enable_role_mapping_form :input[type=url]").val("");
jQuery("#keep_existing_user_roles_form").prop("disabled",true);
jQuery("#keep_existing_user_roles_form :input[type=text]").val("");
jQuery("#keep_existing_user_roles_form :input[type=url]").val("");
jQuery("#role_mapping_form :input").prop("disabled", true);
jQuery("#role_mapping_form :input[type=text]").val("");
jQuery("#role_mapping_form :input[type=url]").val("");
jQuery("#add_mapping").css("display","none");
});
<?php
Fs:
?>
</script>
<?php
}
function sanitizeElement()
{
$KL = file_get_contents(plugins_url("resources/en_li.mo", __FILE__));
$vi = get_option("mo_ldap_local_customer_token");
$KL = Mo_Ldap_Local_Util::decrypt($KL);
if (!empty($KL)) {
goto Uz;
}
return '';
Uz:
$Fl = get_option("mo_ldap_local_admin_api_key");
$KL = Mo_Ldap_Local_Util::decrypt($KL);
$Dd = simplexml_load_string($KL);
return strval($Dd->expirationTime);
}
function mo_ldap_local_default_config_page()
{
$Gv = get_option("mo_ldap_local_default_config");
?>
<div class="mo_ldap_table_layout">
<!-- Test connection for default configuration -->
<form name="f" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_test_default_config" />
<h3>Example Configuration</h3>
<p><b><font color="#FF0000">NOTE : The values given below are mock values. So if you try copying them to the LDAP configuration tab, IT WILL NOT WORK.</font></b> You need to provide actual LDAP configuration in the LDAP configuration tab. If you need any help, please contact us at [email protected]</p>
<div id="panel1">
<table class="mo_ldap_settings_table">
<tr>
<td><b>LDAP Server:</b></td>
<td style="width:65%"><input class="mo_ldap_table_textbox fixed" type="url" value="<?php
echo $Gv["server_url"];
?>
" readonly/></td>
</tr>
<tr>
<td><b>Service Account DN:</b></td>
<td><input class="mo_ldap_table_textbox fixed" type="text" name="dn" value="<?php
echo $Gv["service_account_dn"];
?>
" readonly/></td>
</tr>
<tr>
<td><b>Admin Password:</b></td>
<td><input class="mo_ldap_table_textbox fixed" type="password" value="<?php
echo $Gv["admin_password"];
?>
" readonly/></td>
</tr>
<tr>
<td><b>Search Base:</b></td>
<td><input class="mo_ldap_table_textbox fixed" type="text" value="<?php
echo $Gv["search_base"];
?>
" readonly/></td>
</tr>
<tr>
<td><b>LDAP Search Filter:</b></td>
<td><input class="mo_ldap_table_textbox fixed" type="text" value="<?php
echo $Gv["search_filter"];
?>
" readonly/></td>
</tr>
</table>
</div>
</form>
<br><br>
</div>
<?php
}
function mo_show_export_page()
{
?>
<div class="mo_ldap_support_layout">
<?php
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto qT;
}
if (!NddKoYsdasadJD()) {
goto cI;
}
if (!mo_ldap_local_ntlsl()) {
goto dV;
}
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">You are on Trial version of the plugin and it will expire on <span style="color:#0073aa"><?php
echo mo_ldap_local_xhsl();
?>
</span>. <?php
if (ch_xdigit()) {
goto k1;
}
?>
If you already purchased license <a href="#activatelicense">click here to activate</a> your license.<?php
goto Hu;
k1:
?>
Click <a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">here</a> to activate your license.<?php
Hu:
?>
</div>
<?php
dV:
goto NU;
cI:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">
<?php
if (signNode() && !ch_xdigit()) {
goto Be;
}
?>
Please enter your<a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
"> license key</a> to activate the plugin.<?php
goto BH;
Be:
?>
<a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">Click here</a> to activate your 5 days FREE Trial for the plugin.<?php
BH:
?>
</div>
<?php
NU:
goto dZ;
qT:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Please <a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">Register or Login with miniOrange</a> to configure the miniOrange LDAP Plugin.</div>
<?php
dZ:
?>
<div id="mo_export" style="background: white;position: relative;border-radius: 10px;">
<form method="post" action="" name="mo_export_pass">
<input type="hidden" name="option" value="mo_ldap_pass" />
<input type="hidden" name="mo_ldap_pass_nonce"
value="<?php
echo wp_create_nonce("mo_ldap_pass_nonce");
?>
"/>
<table>
<tr><td><h3>Export Configurations</h3></td></tr>
<tr>
<td><p>This tab will help you to transfer your plugin configurations when you change your Wordpress instance.</p></td></tr>
<tr><td><input type="checkbox" id="enable_ldap_login" name="enable_ldap_login" value="1" onchange="this.form.submit()" <?php
checked(esc_attr(get_option("mo_ldap_export")) == 1);
if (NddKoYsdasadJD()) {
goto JU;
}
echo "disabled";
JU:
?>
/>Export Service Account password. (This will lead to your service account password to be exported in encrypted fashion in a file)</td>
</tr><tr><td>(Enable this only when server password is needed)</td>
<td></td>
</tr>
</table>
</form></div>
<form method="post" action="" name="mo_export">
<input type="hidden" name="option" value="mo_ldap_export"/>
<input type="hidden" name="mo_ldap_export_nonce"
value="<?php
echo wp_create_nonce("mo_ldap_export_nonce");
?>
"/>
<br><table><tr><td>
<input type="button" class="button button-primary button-large" onclick="document.forms['mo_export'].submit()"; value= "Export configuration"<?php
if (NddKoYsdasadJD()) {
goto oW;
}
echo "disabled";
oW:
?>
/>
</td></tr></table>
</form>
<div id="mo_import" style="background: white;position: relative;border-radius: 10px;">
<form method="post" action="" name="mo_import" enctype="multipart/form-data">
<input type="hidden" name="option" value="mo_ldap_import" />
<input type="hidden" name="mo_ldap_export_nonce"
value="<?php
echo wp_create_nonce("mo_ldap_export_nonce");
?>
"/>
<table>
<tr><td><h3>Import Configurations</h3></td></tr><br><br>
<tr>
<td><p>This tab will help you to transfer your plugin configurations from your older Wordpress instance.</p></td>
</tr>
<tr>
<td><input type="file" name="mo_ldap_import_file" id="mo_ldap_import_file" required <?php
if (NddKoYsdasadJD()) {
goto zQ;
}
echo "disabled";
zQ:
?>
></td>
</tr>
<tr><td><br><td></tr>
<tr>
<td><input type="submit" class="button button-primary button-large" value="Import Configuration" name="import_file" <?php
if (NddKoYsdasadJD()) {
goto P1;
}
echo "disabled";
P1:
?>
></td>
</tr>
<tr><td></br></td></tr>
</table>
</form></div>
</div>
</div>
<?php
}
function mo_ldap_local_show_otp_verification()
{
?>
<div class="mo_ldap_table_layout">
<div id="ldap_intranet_otp_verification_div">
<table class="mo_ldap_settings_table">
<!-- Enter otp -->
<form name="f" method="post" id="ldap_form" action="">
<input type="hidden" name="option" value="mo_ldap_local_validate_otp" />
<h3>Verify Your Email</h3>
<tr>
<td><b><font color="#FF0000">*</font>Enter OTP:</b></td>
<td colspan="2"><input class="mo_ldap_table_textbox" autofocus="true" type="text" name="otp_token" required placeholder="Enter OTP" style="width:61%;" pattern="{6,8}"/>
<a style="cursor:pointer;" onclick="document.getElementById('resend_otp_form').submit();">Resend OTP over Email</a></td>
</tr>
<tr><td colspan="3"></td></tr>
<tr><td></td><td>
<input type="button" value="Back" id="back_btn" class="button button-primary button-large" />
<input type="submit" value="Validate OTP" class="button button-primary button-large" />
</td>
</form>
<td><form method="post" action="" id="mo_ldap_cancel_form">
<input type="hidden" name="option" value="mo_ldap_local_cancel" />
</form></td></tr>
<form name="f" id="resend_otp_form" method="post" action="">
<td>
<input type="hidden" name="option" value="mo_ldap_local_resend_otp"/>
</td>
</tr>
</form>
</table>
<br>
<hr>
<h3>I did not recieve any email with OTP . What should I do ?</h3>
<form id="phone_verification" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_phone_verification" />
If you can't see the email from miniOrange in your mails, please check your <b>SPAM Folder</b>. If you don't see an email even in SPAM folder, verify your identity with our alternate method.
<br><br>
<b>Enter your valid phone number here and verify your identity using one time passcode sent to your phone.</b><br><br><input class="mo_ldap_table_textbox" required="true" pattern="[\+]\d{1,3}\d{10}" autofocus="true" type="text" name="phone_number" id="phone" placeholder="Enter Phone Number" style="width:40%;" value="<?php
echo get_option("mo_ldap_local_admin_phone");
?>
" title="Enter phone number without any space or dashes."/>
<br><input type="submit" value="Send OTP" class="button button-primary button-large" />
</form>
</div>
</div>
<script>
jQuery("#phone").intlTelInput();
jQuery('#back_btn').click(function(){
jQuery('#mo_ldap_cancel_form').submit();
});
</script>
<?php
}
function mo_ldap_show_attribute_mapping_page()
{
?>
<div class="mo_ldap_table_layout">
<?php
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto YQ;
}
if (!NddKoYsdasadJD()) {
goto g3;
}
if (!mo_ldap_local_ntlsl()) {
goto p0;
}
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">You are on Trial version of the plugin and it will expire on <span style="color:#0073aa"><?php
echo mo_ldap_local_xhsl();
?>
</span>. <?php
if (ch_xdigit()) {
goto xX;
}
?>
If you already purchased license <a href="#activatelicense">click here to activate</a> your license.<?php
goto oe;
xX:
?>
Click <a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">here</a> to activate your license.<?php
oe:
?>
</div>
<?php
p0:
goto kV;
g3:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">
<?php
if (signNode() && !ch_xdigit()) {
goto MJ;
}
?>
Please enter your<a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
"> license key</a> to activate the plugin.<?php
goto li;
MJ:
?>
<a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">Click here</a> to activate your 5 days FREE Trial for the plugin.<?php
li:
?>
</div>
<?php
kV:
goto M3;
YQ:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Please <a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">Register or Login with miniOrange</a> to configure the miniOrange LDAP Plugin.</div>
<?php
M3:
?>
<div id="ldap_intranet_attribute_mapping_div">
<form name="f" method="post" id="attribute_config_form">
<table id="attributes_table" class="mo_ldap_settings_table">
<input type="hidden" name="option" value="mo_ldap_save_attribute_config" />
<h3>Attribute Configuration</h3>
<tr>
<td style="width:70%;"><input type="checkbox" id="mo_ldap_local_enable_attr_mapping" name="mo_ldap_local_enable_attr_mapping" value="1" <?php
checked(get_option("mo_ldap_local_enable_attr_mapping") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto jh;
}
echo "disabled";
jh:
?>
/>Enable Attribute Mapping</td>
</tr>
<?php
if (!get_option("mo_ldap_local_enable_attr_mapping")) {
goto Nn;
}
?>
<tr>
<td><br><input type="checkbox" id="enable_update_ldap" name="enable_update_ldap" value="1" <?php
checked(get_option("mo_ldap_local_enable_update_ldap") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto tT;
}
echo "disabled";
tT:
?>
/>Enable updating information in LDAP when user edits profile</td>
</tr>
<?php
Nn:
?>
<tr>
<td colspan="2"><br>Enter the LDAP attribute names for Email, Phone, First Name and Last Name attributes</td>
</tr>
<tr>
<td style="width:40%;"><b><font color="#FF0000">*</font>Email Attribute</b></td>
<td><input type="text" name="mo_ldap_email_attribute" required placeholder="Enter Email attribute" style="width:80%;"
value="<?php
echo get_option("mo_ldap_local_email_attribute");
?>
" <?php
if (NddKoYsdasadJD()) {
goto J6;
}
echo "disabled";
J6:
?>
/></td>
</tr>
<tr>
<td style="width:40%;"><b><font color="#FF0000">*</font>Phone Attribute</b></td>
<td><input type="text" name="mo_ldap_phone_attribute" required placeholder="Enter Phone attribute" style="width:80%;"
value="<?php
echo get_option("mo_ldap_local_phone_attribute");
?>
" <?php
if (NddKoYsdasadJD()) {
goto GB;
}
echo "disabled";
GB:
?>
/></td>
</tr>
<tr>
<td style="width:40%;"><b><font color="#FF0000">*</font>First Name Attribute</b></td>
<td><input type="text" name="mo_ldap_fname_attribute" required placeholder="Enter First Name attribute" style="width:80%;"
value="<?php
echo get_option("mo_ldap_local_fname_attribute");
?>
" <?php
if (NddKoYsdasadJD()) {
goto jB;
}
echo "disabled";
jB:
?>
/></td>
</tr>
<tr>
<td style="width:40%;"><b><font color="#FF0000">*</font>Last Name Attribute</b></td>
<td><input type="text" name="mo_ldap_lname_attribute" required placeholder="Enter Last Name attribute" style="width:80%;"
value="<?php
echo get_option("mo_ldap_local_lname_attribute");
?>
" <?php
if (NddKoYsdasadJD()) {
goto RP;
}
echo "disabled";
RP:
?>
/></td>
</tr>
<tr>
<td style="width:40%;"><b><font color="#FF0000">*</font>Nickname Attribute</b></td>
<td><input type="text" name="mo_ldap_nickname_attribute" required placeholder="Enter NickName attribute" style="width:80%;"
value="<?php
echo get_option("mo_ldap_local_nickname_attribute");
?>
" <?php
if (NddKoYsdasadJD()) {
goto xo;
}
echo "disabled";
xo:
?>
/></td>
</tr>
<tr>
<td style="width:40%;"><b><font color="#FF0000">*</font>Display Name</b></td>
<td>
<select name="mo_ldap_display_name_attribute" <?php
if (NddKoYsdasadJD()) {
goto KE;
}
echo "disabled";
KE:
?>
>
<option value="nickname" <?php
if (!(get_option("mo_ldap_local_display_name_attribute") == "nickname")) {
goto QX;
}
echo "selected="selected"";
QX:
?>
>NickName</option>
<option value="email" <?php
if (!(get_option("mo_ldap_local_display_name_attribute") == "email")) {
goto HJ;
}
echo "selected="selected"";
HJ:
?>
>Email</option>
<option value="firstname" <?php
if (!(get_option("mo_ldap_local_display_name_attribute") == "firstname")) {
goto y3;
}
echo "selected="selected"";
y3:
?>
>First Name</option>
<option value="firstlast" <?php
if (!(get_option("mo_ldap_local_display_name_attribute") == "firstlast")) {
goto tM;
}
echo "selected="selected"";
tM:
?>
>First Name + Last Name</option>
<option value="lastfirst" <?php
if (!(get_option("mo_ldap_local_display_name_attribute") == "lastfirst")) {
goto lo;
}
echo "selected="selected"";
lo:
?>
>Last Name + First Name</option>
</select>
</td>
</tr>
<?php
$Mh = array();
$G2 = wp_load_alloptions();
foreach ($G2 as $Zh => $Kq) {
if (strpos($Zh, "mo_ldap_local_custom_attribute_") === false) {
goto OT;
}
?>
<tr>
<td><b><font color="#FF0000"></font><?php
echo $Kq;
?>
Attribute</b></td>
<td><b><?php
echo get_option($Zh);
?>
</b></td>
<td><a style="cursor:pointer;" <?php
if (!NddKoYsdasadJD()) {
goto LO;
}
echo "onclick=deleteAttribute('" . $Kq . "')";
LO:
?>
>Delete</a></td>
</tr><?php
goto D4;
OT:
D4:
CX:
}
qW:
?>
<tr><td><h3>Add Custom Attributes</h3></td></tr>
<tr>
<td>Enter extra LDAP attributes which you wish to be included in the user profile</td>
</tr>
<tr>
<td><input type="text" name="mo_ldap_local_custom_attribute_1_name" placeholder="Custom Attribute Name" style="width:61%;" <?php
if (NddKoYsdasadJD()) {
goto X_;
}
echo "disabled";
X_:
?>
/></td>
<td><input type="button" name="add_attribute" value="+" onclick="add_custom_attribute();" class="button button-primary" <?php
if (NddKoYsdasadJD()) {
goto U3;
}
echo "disabled";
U3:
?>
/>
<input type="button" name="remove_attribute" value="-" onclick="remove_custom_attribute();" class="button button-primary" <?php
if (NddKoYsdasadJD()) {
goto TL;
}
echo "disabled";
TL:
?>
/></td>
</tr>
<tr id="mo_ldap_custom_attribute"><td></td></tr>
<?php
?>
<?php
do_action("mo_ldap_attribute_mapping_end");
?>
<tr id="save_config_element">
<td>
<input type="submit" value="Save Configuration" class="button button-primary button-large" <?php
if (NddKoYsdasadJD()) {
goto Pb;
}
echo "disabled";
Pb:
?>
/>
<a id="back_button" class="button button-primary button-large" <?php
if (!NddKoYsdasadJD()) {
goto s8;
}
echo "href=''";
goto xW;
s8:
echo "disabled";
xW:
?>
>Cancel</a>
</td>
</tr>
</table>
</form>
</div>
<form id="delete_custom_attribute_form" method="post">
<input type="hidden" name="option" value="mo_ldap_delete_custom_attribute" />
<input type="hidden" id="custom_attribute_name" name="custom_attribute_name" value="" />
</form>
<form method="post" id="attribiteconfigtest">
<input type="hidden" name="option" value="mo_ldap_test_attribute_configuration" />
<table id="attributes_table" class="mo_ldap_settings_table">
<tr><h3>Test Attribute Configuration</h3></tr>
<tr>Enter LDAP username to test attribute configuration</tr>
<tr>
<td>Username</td>
<td><input type="text" id="mo_ldap_username" name="mo_ldap_username" required placeholder="Enter Username" style="width:61%;" <?php
if (NddKoYsdasadJD()) {
goto pH;
}
echo "disabled";
pH:
?>
/>
</tr>
<tr>
<!--<td><input type="submit" value="Test Configuration" class="button button-primary button-large" /></td>-->
<td><input type="submit" value="Test Configuration" class="button button-primary button-large" <?php
if (NddKoYsdasadJD()) {
goto XL;
}
echo "disabled";
XL:
?>
/></td>
</tr>
</table>
</form>
<script>
var countAttributes;
function add_custom_attribute(){
countAttributes += 1;
jQuery("<tr id='row_" + countAttributes + "'><td><input type='text' id='mo_ldap_local_custom_attribute_" + countAttributes + "_name' name='mo_ldap_local_custom_attribute_" + countAttributes + "_name' placeholder='Custom Attribute Name' style='width:61%;' /></td></tr>").insertBefore(jQuery("#mo_ldap_custom_attribute"));
}
function remove_custom_attribute(){
jQuery("#row_" + countAttributes).remove();
countAttributes -= 1;
if(countAttributes == 0)
countAttributes = 1;
}
jQuery("#attribiteconfigtest").submit(function(event ) {
event.preventDefault();
testConfiguration();
});
function testConfiguration(){
var username = jQuery("#mo_ldap_username").val();
var myWindow = window.open('<?php
echo site_url();
?>
' + '/?option=testattrconfig&user='+username, "Test Attribute Configuration", "width=700, height=600");
}
function deleteAttribute(attributeName){
jQuery("#custom_attribute_name").val(attributeName);
jQuery("#delete_custom_attribute_form").submit();
}
jQuery(document).ready(function(){
countAttributes = 1;
});
</script>
</div>
<?php
}
function mo_user_report_page()
{
?>
<div class="mo_ldap_small_layout" style="margin-top:0px; height: auto;">
<?php
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto Dy;
}
if (!NddKoYsdasadJD()) {
goto IV;
}
if (!mo_ldap_local_ntlsl()) {
goto qM;
}
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">You are on Trial version of the plugin and it will expire on <span style="color:#0073aa"><?php
echo mo_ldap_local_xhsl();
?>
</span>. <?php
if (ch_xdigit()) {
goto HN;
}
?>
If you already purchased license <a href="#activatelicense">click here to activate</a> your license.<?php
goto mJ;
HN:
?>
Click <a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">here</a> to activate your license.<?php
mJ:
?>
</div>
<?php
qM:
goto o8;
IV:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">
<?php
if (signNode() && !ch_xdigit()) {
goto Xh;
}
?>
Please enter your<a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
"> license key</a> to activate the plugin.<?php
goto sE;
Xh:
?>
<a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">Click here</a> to activate your 5 days FREE Trial for the plugin.<?php
sE:
?>
</div>
<?php
o8:
goto TB;
Dy:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Please <a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">Register or Login with miniOrange</a> to configure the miniOrange LDAP Plugin.</div>
<?php
TB:
?>
<h2>User Report</h2>
<form name="keep_user_report_form_on_uinstall" id="keep_user_report_form_on_uinstall" method="post" action="">
<input type="hidden" name="option" value="keep_user_report_logs_on_unistall" />
<input type="checkbox" id="mo_ldap_local_keep_user_report_log" name="mo_ldap_local_keep_user_report_log" value="1" <?php
checked(get_option("mo_ldap_local_keep_user_report_log_on_uninstall") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto lD;
}
echo "disabled";
lD:
?>
/> Keep User Report table on Uninstall
</form><br>
<form name="f" id="user_report_form" method="post" action="">
<input type="hidden" name="option" value="user_report_logs" />
<input type="checkbox" id="mo_ldap_local_user_report_log" name="mo_ldap_local_user_report_log" value="1" <?php
checked(get_option("mo_ldap_local_user_report_log") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto c6;
}
echo "disabled";
c6:
?>
/> Log Authentication Requests
</form><br>
<?php
$pE = get_option("mo_ldap_local_user_report_log");
if ($pE) {
goto Sw;
}
echo "No audit logs are available currently. <br><br>";
goto tW;
Sw:
$D0 = LDAP_Plugin::get_instance();
$D0->plugin_settings_page();
tW:
?>
</div>
<script>
jQuery('#mo_ldap_local_user_report_log').change(function() {
jQuery('#user_report_form').submit();
});
jQuery('#mo_ldap_local_keep_user_report_log').change(function() {
jQuery('#keep_user_report_form_on_uinstall').submit();
});
</script>
<?php
}
function mo_ldap_show_user_management_page()
{
?>
<div class="mo_ldap_table_layout">
<div id="panel2">
<table class="mo_ldap_settings_table">
<form name="f" method="post" id="attribute_config_form" action="">
<input type="hidden" name="option" value="mo_ldap_user_management_config" />
<h3>User Management Configuration</h3>
<tr>
<td><b><font color="#FF0000">*</font>DN of New User Location in Directory</b></td>
<td><input type="text" name="mo_ldap_new_user_location" required placeholder="DN of New Users in LDAP" style="width:80%;"
value="<?php
echo get_option("mo_ldap_local_new_user_location");
?>
"/></td>
</tr>
<tr>
<td><b><font color="#FF0000">*</font>Object Class of User</b></td>
<td><input type="text" name="mo_ldap_objectclass_attribute" required placeholder="Object Class of Users in LDAP" style="width:80%;"
value="<?php
echo get_option("mo_ldap_local_objectclass_attribute");
?>
"/></td>
</tr>
<tr><td colspan="3"></td></tr>
<tr>
<td> </td>
<td>
<input type="submit" value="Save Configuration" class="button button-primary button-large" />
<a id="back_button" href=""class="button button-primary button-large">Cancel</a>
</td>
</form>
</table>
</div>
</div>
<?php
}
function post_response()
{
$KL = file_get_contents(plugins_url("resources/en_li.mo", __FILE__));
$vi = get_option("mo_ldap_local_customer_token");
$KL = Mo_Ldap_Local_Util::decrypt($KL);
if (!empty($KL)) {
goto vW;
}
return '';
vW:
$Fl = get_option("mo_ldap_local_admin_api_key");
$KL = Mo_Ldap_Local_Util::decrypt($KL);
$Dd = simplexml_load_string($KL);
return strval($Dd->code);
}
function ch_xdigit()
{
if (!get_option("site_ck_l")) {
goto vo;
}
$fc = get_option("mo_ldap_local_customer_token");
if (!(Mo_Ldap_Local_Util::decrypt(get_option("site_ck_l")) == "true")) {
goto em;
}
return true;
em:
vo:
return false;
}
function show_pricing_page()
{
?>
<div class="mo_ldap_table_layout">
<?php
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto ld;
}
if (!NddKoYsdasadJD()) {
goto kN;
}
if (!mo_ldap_local_ntlsl()) {
goto MA;
}
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">You are on Trial version of the plugin and it will expire on <span style="color:#0073aa"><?php
echo mo_ldap_local_xhsl();
?>
</span>. <?php
if (ch_xdigit()) {
goto iq;
}
?>
If you already purchased license <a href="#activatelicense">click here to activate</a> your license.<?php
goto fX;
iq:
?>
Click <a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">here</a> to activate your license.<?php
fX:
?>
</div>
<?php
MA:
goto NV;
kN:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">
<?php
if (signNode() && !ch_xdigit()) {
goto Dg;
}
?>
Please enter your<a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
"> license key</a> to activate the plugin.<?php
goto LW;
Dg:
?>
<a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">Click here</a> to activate your 5 days FREE Trial for the plugin.<?php
LW:
?>
</div>
<?php
NV:
goto YN;
ld:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Please <a href="<?php
echo add_query_arg(array("tab" => "account"), $_SERVER["REQUEST_URI"]);
?>
">Register or Login with miniOrange</a> to configure the miniOrange LDAP Plugin.</div>
<?php
YN:
?>
<table class="mo_ldap_local_pricing_table">
<h2><!--Licensing Plans - Thanks for upgrading to premium plugin-->
<?php
if (get_option("mo_ldap_local_license_key")) {
goto M8;
}
if (!(signNode() && get_option("mo_ldap_local_is_trial_active"))) {
goto Wp;
}
?>
- You are on 5 days free trial.<?php
Wp:
goto kI;
M8:
?>
- Thanks for upgrading to premium plugin.
<span style="float:right;margin-right:15px;"><input type="button" name="ok_btn" class="button button-primary button-large" value="Get License Keys" onclick="getlicensekeysform()" /><?php
kI:
?>
</h2><hr>
<span style="float:right"><input type="button" name="ok_btn" id="ok_btn" class="button button-primary button-large" value="OK, Got It" onclick="window.location.href='admin.php?page=mo_ldap_local_login&mo2f_tab=default'" /></span>
<!--<span style="float:right"><input type="button" name="ok_btn" id="ok_btn" class="button button-primary button-large" value="OK, Got It" onclick="window.location.href='admin.php?page=mo_ldap_local_login&mo2f_tab=default'" /></span>
</h2><hr>-->
<tr style="vertical-align:top;">
<td>
<div class="mo_ldap_local_thumbnail mo_ldap_local_pricing_paid_tab" >
<h3 class="mo_ldap_local_pricing_header">Do it yourself</h3>
<span>
<?php
if (signNode() && !ch_xdigit()) {
goto PC;
}
if (get_option("mo_ldap_local_license_key")) {
goto HZ;
}
?>
<input type="button" name="upgrade_btn" class="button button-primary button-large" value="Upgrade Now" onclick="getupgradelicensesform('wp_ldap_intranet_basic_plan')" />
<?php
goto yV;
HZ:
?>
<input type="button" name="ok_btn" class="button button-primary button-large" value="Buy More Licenses" onclick="getupgradelicensesform('wp_ldap_intranet_upgrade_plan')" /> <?php
yV:
goto mB;
PC:
?>
<input type="button" name="upgrade_btn" class="button button-primary button-large" value="Upgrade Now" onclick="getupgradelicensesform('wp_ldap_intranet_basic_plan')" /> <?php
mB:
?>
</span>
<hr>
<p class="mo_ldap_local_pricing_text" style="padding:10px;">$349 - One Time Payment</p>
<p></p><p></p>
<hr>
<p class="mo_ldap_local_pricing_text" style="padding-bottom:20px !important;">
Unlimited LDAP Authentications<br>
Customized Role Mapping<br>
Customized Attribute Mapping<br>
Login with username, email or any LDAP attribute of choice<br>
Multiple Search Bases<br>
Multi-Site Support*<br>
Integrated Windows Authentication*<br><br><br>
</p>
<hr>
<p class="mo_ldap_local_pricing_text" >Basic Support by Email</p>
</div></td>
<td>
<div class="mo_ldap_local_thumbnail mo_ldap_local_pricing_free_tab" >
<h3 class="mo_ldap_local_pricing_header">Premium<br>
<span>
<input type="button" name="upgrade_btn" class="button button-primary button-large" value="Upgrade Now" onclick="getupgradelicensesform('wp_ldap_intranet_premium_plan')" /> </span></h3>
<hr>
<p class="mo_ldap_local_pricing_text">$349 + One Time Setup Fees <br>
( $60 per hour )</p>
<hr>
<p class="mo_ldap_local_pricing_text">
Unlimited LDAP Authentications<br>
Customized Role Mapping<br>
Customized Atrribute Mapping<br>
Login with username, email or any LDAP attribute of choice<br>
Multiple Search Bases<br>
Multi-Site Support*<br>
Integrated Windows Authentication*<br>
Customization<br>
Multiple LDAP Support<br>
End to End Ldap Integration **<br>
</p>
<hr>
<p class="mo_ldap_local_pricing_text">Premium Support Plans Available</p>
</div></td>
</tr>
</table>
<form style="display:none;" id="loginform" action="<?php
echo get_option("mo_ldap_local_host_name") . "/moas/login";
?>
"
target="_blank" method="post">
<input type="email" name="username" value="<?php
echo get_option("mo_ldap_local_admin_email");
?>
" />
<input type="text" name="redirectUrl" value="<?php
echo get_option("mo_ldap_local_host_name") . "/moas/viewlicensekeys";
?>
" />
<input type="text" name="requestOrigin" id="requestOrigin1" />
</form>
<form style="display:none;" id="licenseform" action="<?php
echo get_option("mo_ldap_local_host_name") . "/moas/login";
?>
"
target="_blank" method="post">
<input type="email" name="username" value="<?php
echo get_option("mo_ldap_local_admin_email");
?>
" />
<input type="text" name="redirectUrl" value="<?php
echo get_option("mo_ldap_local_host_name") . "/moas/initializepayment";
?>
" />
<input type="text" name="requestOrigin" id="requestOrigin2" />
</form>
<script>
function getlicensekeysform(){
jQuery('#requestOrigin1').val('wp_ldap_intranet_basic_plan');
jQuery('#loginform').submit();
}
function getupgradelicensesform(planType){
jQuery('#requestOrigin2').val(planType);
jQuery('#licenseform').submit();
}
function upgradeform(planType){
//alert(planType);
jQuery('#requestOrigin2').val(planType);
jQuery('#loginform').submit();
}
</script>
<br>
<h3>* Steps to upgrade to premium plugin -</h3>
<p>1. You will be redirected to miniOrange Login Console. Enter your password with which you created an account with us. After that you will be redirected to payment page.</p>
<p>2. Enter you card details and complete the payment. On successful payment completion, you will see the link to download the premium plugin.</p>
<h3>** End to End Ldap Integration - We will setup a conference and do end to end configuration for you. We provide services to do the configuration on your behalf. </h3>
<h3>* Multi-Site Support - We have a separate plugin for the multisite version. </h3>
<h3>* Integrated Windows Authentication - Supported in separate plugin. </h3>
</div>
<?php
}
function mo_ldap_show_verify_license_page()
{
?>
<div class="mo_ldap_table_layout">
<?php
if (!signNode()) {
goto hh;
}
?>
<?php
if (mo_ldap_local_ntlsl()) {
goto Sh;
}
if (ch_xdigit()) {
goto UK;
}
?>
<table style="width:100%"><tr><td><h3>Confirm your license<hr></h3>
If you have taken 5 days free trial of premium plugin just click the below button to confirm your plan.<br><br>
<input type="button" name="submit" id="mo_ldap_local_free_trial_link" value="Activate 5 Days Free Trial" class="button button-primary button-large" /></td>
</tr>
<tr><td style="text-align:center">OR<br><br></td></tr>
<tr>
<td>If you have upgraded to <b>Do It Yourself or Premium Plan</b>, click the below button to confirm your license plan.<br><br><a href="#checklicense"><input type="button" name="submit" id="" value="Confirm Your License Plan" class="button button-primary button-large" /></a>
</td></tr></table><br><br>
<?php
UK:
goto NM;
Sh:
?>
<center><br><h3>You are on Trial Version</h3>
<span>You are using 5 days trial version of miniOrange LDAP plugin. It will expire on <span style="color:red;font-weight:bold"><?php
echo mo_ldap_local_xhsl();
?>
</span>.</span>
<br><br>
<?php
if (ch_xdigit()) {
goto Ze;
}
?>
<a href="<?php
echo add_query_arg(array("tab" => "pricing"), $_SERVER["REQUEST_URI"]);
?>
"><input type="button" name="submit" id="" value="Click here to Upgrade" class="button button-primary button-large" /></a> <a href="#checklicense"><input type="button" name="submit" id="" value="Already upgraded? Check License" class="button button-primary button-large" /></a></center><br><br>
<?php
Ze:
?>
<?php
NM:
?>
<?php
hh:
?>
<?php
if (!(!signNode() || ch_xdigit())) {
goto Qk;
}
?>
<h3>Verify your license</h3>
<form name="f" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_verify_license" />
<table class="mo_ldap_settings_table">
<tr>
<td><b><font color="#FF0000">*</font>License Key:</b></td>
<td><input class="mo_ldap_table_textbox" required type="text"
name="mo_ldap_local_license_key" placeholder="Enter your license key to activate the plugin" /></td>
</tr>
<tr>
<td> </td>
<td>
<input type="submit" name="submit" value="Activate License" class="button button-primary button-large" />
</tr>
</table>
</form>
<?php
Qk:
?>
</div>
<form name="f" method="post" action="" id="mo_ldap_local_forgotpassword_form">
<input type="hidden" name="option" value="mo_ldap_local_forgot_password_form_option"/>
</form>
<form name="f" method="post" action="" id="mo_ldap_local_free_trial_form">
<input type="hidden" name="option" value="mo_ldap_local_free_trial"/>
</form>
<form name="f" method="post" action="" id="mo_ldap_local_check_license">
<input type="hidden" name="option" value="mo_ldap_local_check_license"/>
</form>
<script>
jQuery('a[href="#mo_ldap_local_forgot_password_link"]').click(function(){
jQuery('#mo_ldap_local_forgotpassword_form').submit();
});
jQuery('#mo_ldap_local_free_trial_link').click(function(){
jQuery('#mo_ldap_local_free_trial_form').submit();
});
jQuery('a[href="#checklicense"]').click(function(){
jQuery('#mo_ldap_local_check_license').submit();
});
</script>
<?php
}
function mo_ldap_addon_section()
{
?>
<div class="mo_ldap_support_layout" style="margin-top:20px;">
<h3>Add-on</h3>
<?php
do_action("mo_ldap_show_addon");
?>
<br>
<div>Contact us for available add-ons.</div>
<br>
</div>
<?php
}
?>
Did this file decode correctly?
Original Code
<?php
require_once "\160\x61\x67\x69\156\141\x74\x69\157\156\x2e\160\150\x70";
function mo_ldap_local_settings()
{
if (isset($_GET["\x74\x61\142"])) {
goto La;
}
$dh = "\x64\145\146\141\x75\154\x74";
goto AU;
La:
$dh = $_GET["\x74\x61\142"];
AU:
?>
<?php
if ($dh != "\x70\162\151\x63\x69\x6e\147") {
goto vV;
}
?>
<h2 style="text-align: center">miniOrange LDAP/Active Directory Login for Intranet Sites</h2>
<div style="float:left;display:block; "><a class="add-new-h2 " style="font-size: 16px; color: #000;text-align: center;text-decoration: none;display: inline-block;" href="<?php
echo add_query_arg(array("\164\x61\x62" => "\x64\145\146\141\165\154\164"), htmlentities($_SERVER["\x52\105\121\125\105\x53\124\137\x55\122\x49"]));
?>
"><button id="Back-To-Plugin-Configuration" type="button" value="Back-To-Plugin-Configuration" class="button button-primary button-large"><span class="dashicons dashicons-arrow-left-alt" style="vertical-align: middle;"></span> Back To Plugin Configuration</button> </a> </div>
<?php
goto Lq;
vV:
?>
<h2>miniOrange LDAP/Active Directory Login for Intranet Sites</h2>
<?php
if (Mo_Ldap_Local_Util::is_curl_installed()) {
goto u3;
}
?>
<div class="notice notice-info is-dismissible">
<div id="help_curl_warning_title" class="mo_ldap_title_panel">
<p><font color="#FF0000">Warning: PHP cURL extension is not installed or disabled.</font></p>
<p><a target="_blank" style="cursor: pointer;">Click here for instructions to enable it.</a></p>
</div>
<div hidden="" id="help_curl_warning_desc" class="mo_ldap_help_desc">
<ul>
<li style="font-size: large; font-weight: bold">Step 1 </li>
<li style="font-size: large; font-weight: bold"><b>Loaded configuration file : <?php
echo php_ini_loaded_file();
?>
</b></li>
<li style="list-style-type:square;margin-left:20px">Open php.ini file from above file path</br></li><br/>
<li style="font-size: large; font-weight: bold">Step 2</li>
<li style="font-weight: bold"><font color="#C31111"><b>For Windows users</b></font></li>
<li style="list-style-type:square;margin-left:20px">Search for <b>"extension=php_curl.dll"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li>
<li><font color="#C31111"><b>For Linux users</b></font>
<ul style="list-style-type:square;margin-left: 20px">
<li style="margin-top: 5px">Install php curl extension (If not installed yet)
<ul style="list-style-type:disc;margin-left: 15px;margin-top: 5px">
<li>For Debian, the installation command would be <b>apt-get install php-curl</b></li>
<li>For RHEL based systems, the command would be <b>yum install php-curl</b></li></ul></li></li>
<li>Search for <b>"extension=php_curl.so"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li></ul><br/>
<li style="margin-top: 5px;font-size: large; font-weight: bold">Step 3</li>
<li style="list-style-type:square;margin-left:20px">Restart your server. After that refresh the "LDAP/AD" plugin configuration page.</li>
</ul>
For any further queries, please <a href="mailto:[email protected]">contact us</a>.
</div>
</div>
<?php
u3:
if (Mo_Ldap_Local_Util::is_extension_installed("\154\144\141\160")) {
goto gI;
}
?>
<div class="notice notice-info is-dismissible">
<p><font color="#FF0000">Warning: PHP LDAP extension is not installed or disabled.</font></p>
<div id="help_ldap_warning_title" class="mo_ldap_title_panel">
<p><a target="_blank" style="cursor: pointer;">Click here for instructions to enable it.</a></p>
</div>
<div hidden="" style="padding: 2px 2px 2px 12px" id="help_ldap_warning_desc" class="mo_ldap_help_desc">
<ul>
<li style="font-size: large; font-weight: bold">Step 1 </li>
<li style="font-size: large; font-weight: bold"><b>Loaded configuration file : <?php
echo php_ini_loaded_file();
?>
</b></li>
<li style="list-style-type:square;margin-left:20px">Open php.ini file from above file path</b></li><br/>
<li style="font-size: large; font-weight: bold">Step 2</li>
<li ><font style="font-weight: bold" color="#C31111"><b>For Windows users using Apache Server</b></font></li>
<li style="list-style-type:square;margin-left:20px">Search for <b>"extension=php_ldap.dll"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li>
<li><font color="#C31111"><b>For Windows users using IIS server</b></font></li>
<li style="list-style-type:square;margin-left:20px">Search for <b>"ExtensionList"</b> in the php.ini file. Uncomment the <b>"extension=php_ldap.dll"</b> line, if not present then add this line in the file and save the file.</li>
<li><font color="#C31111"><b>For Linux users</b></font>
<ul style="list-style-type:square;margin-left: 20px">
<li style="margin-top: 5px">Install php ldap extension (If not installed yet)
<ul style="list-style-type:disc;margin-left: 15px;margin-top: 5px">
<li>For Debian, the installation command would be <b>apt-get install php-ldap</b></li>
<li>For RHEL based systems, the command would be <b>yum install php-ldap</b></li></ul></li></li>
<li>Search for <b>"extension=php_ldap.so"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li></ul><br/>
<li style="margin-top: 5px;font-size: large; font-weight: bold">Step 3</li>
<li style="list-style-type:square;margin-left:20px">Restart your server. After that refresh the "LDAP/AD" plugin configuration page.</li>
</ul>
For any further queries, please <a href="mailto:[email protected]">contact us</a>.
</div>
</div>
<?php
gI:
if (Mo_Ldap_Local_Util::is_extension_installed("\x6f\x70\145\156\x73\163\154")) {
goto wR;
}
?>
<p><font color="#FF0000">(Warning: <a target="_blank" href="http://php.net/manual/en/openssl.installation.php">PHP OpenSSL extension</a> is not installed or disabled)</font></p>
<?php
wR:
Lq:
?>
<style>
.add-new-hover:hover{
color: white !important;
}
.reportTable{border-collapse: collapse; border:1px solid #ccc; width:100%}
.reportTable, .reportTable th, .reportTable td {
border: 1px solid black;
align: center;
}
.reportTable th, .reportTable td{padding:10px}
.switch {
position: relative;
display: inline-block;
width: 55px;
height: 27px;
}
/* Hide default HTML checkbox */
.switch input {display:none;}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 20px;
width: 20px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked ~ .slider {
background-color: #66aa6e;
}
input:focus ~ .slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked ~ .slider:before {
-webkit-transform: translateX(27px);
-ms-transform: translateX(27px);
transform: translateX(27px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
</style>
<div class="mo2f_container">
<?php
if ($dh != "\x70\162\151\143\x69\156\147") {
goto Ne;
}
if (!($dh == "\160\x72\151\x63\151\156\147" || $dh == "\x61\x64\144\137\157\x6e")) {
goto xA;
}
mo_ldap_show_licensing_page();
xA:
goto xv;
Ne:
?>
<h2 class="nav-tab-wrapper">
<a class="nav-tab <?php
echo $dh == "\x61\x63\x63\157\165\x6e\164" ? "\156\x61\x76\x2d\164\141\x62\55\141\x63\x74\x69\x76\145" : '';
?>
" href="<?php
echo add_query_arg(array("\164\x61\x62" => "\x61\143\x63\x6f\165\x6e\164"), $_SERVER["\122\x45\121\x55\x45\123\x54\x5f\125\x52\111"]);
?>
">
<?php
if (Mo_Ldap_Local_Util::is_customer_registered()) {
goto nc;
}
echo "\x4c\x6f\147\151\x6e\40\x2f\40\122\145\x67\x69\x73\164\x65\162";
goto qE;
nc:
echo "\115\x79\x20\101\143\143\157\165\156\164";
qE:
?>
</a>
<a class="nav-tab <?php
echo $dh == "\144\x65\x66\141\165\x6c\164" ? "\156\x61\x76\55\164\141\142\x2d\x61\143\164\151\166\145" : '';
?>
" href="<?php
echo add_query_arg(array("\x74\141\142" => "\144\145\146\x61\x75\154\164"), $_SERVER["\x52\105\x51\125\105\123\x54\137\125\x52\x49"]);
?>
">LDAP Configuration</a>
<a class="nav-tab <?php
echo $dh == "\x72\157\x6c\145\x6d\x61\x70\160\151\x6e\147" ? "\x6e\x61\166\55\x74\141\142\x2d\x61\143\x74\x69\x76\145" : '';
?>
" href="<?php
echo add_query_arg(array("\x74\141\142" => "\162\x6f\x6c\x65\155\141\160\x70\151\156\x67"), $_SERVER["\122\x45\x51\x55\105\123\124\137\x55\x52\x49"]);
?>
">Role Mapping</a>
<a class="nav-tab <?php
echo $dh == "\141\x74\x74\x72\x69\x62\x75\164\x65\155\141\x70\160\x69\156\147" ? "\156\141\166\x2d\164\x61\x62\55\141\143\x74\x69\166\x65" : '';
?>
" href="<?php
echo add_query_arg(array("\164\x61\x62" => "\x61\164\164\x72\x69\142\165\x74\145\155\141\x70\160\151\x6e\147"), $_SERVER["\122\x45\x51\x55\105\123\124\137\x55\x52\x49"]);
?>
">Attribute Mapping</a>
<!--<a class="nav-tab <?php
?>
" href="<?php
?>
">User Management</a> -->
<a class="nav-tab <?php
echo $dh == "\x63\157\156\146\151\x67" ? "\x6e\141\166\x2d\x74\141\x62\55\141\143\x74\x69\x76\x65" : '';
?>
" href="<?php
echo add_query_arg(array("\164\x61\142" => "\x63\x6f\x6e\x66\151\147"), $_SERVER["\x52\105\x51\125\x45\123\124\x5f\125\x52\x49"]);
?>
">Example LDAP Configuration</a>
<a class="nav-tab <?php
echo $dh == "\143\x6f\x6e\146\151\147\137\163\x65\x74\x74\x69\x6e\147\163" ? "\156\141\x76\55\164\141\x62\55\141\x63\164\151\166\x65" : '';
?>
" href="<?php
echo add_query_arg(array("\x74\x61\x62" => "\143\157\156\x66\x69\147\x5f\163\145\164\164\151\156\x67\163"), $_SERVER["\x52\x45\121\x55\105\x53\124\x5f\x55\122\111"]);
?>
">Configuration Settings</a>
<a class="nav-tab <?php
echo $dh == "\x75\163\145\162\163\x5f\x72\x65\160\157\162\x74" ? "\x6e\141\x76\x2d\x74\x61\x62\x2d\x61\x63\164\x69\x76\x65" : '';
?>
" href="<?php
echo add_query_arg(array("\x74\141\x62" => "\x75\x73\x65\x72\163\x5f\162\145\x70\x6f\x72\164"), $_SERVER["\122\105\121\125\x45\123\124\x5f\125\x52\x49"]);
?>
">Authentication Report</a>
<a class="nav-tab <?php
echo $dh == "\x70\x72\151\x63\151\x6e\x67" ? "\x6e\x61\x76\x2d\164\141\142\x2d\x61\x63\164\x69\x76\145" : '';
?>
" href="<?php
echo add_query_arg(array("\x74\x61\142" => "\160\x72\151\143\x69\156\147"), $_SERVER["\122\x45\121\125\105\x53\x54\137\125\122\x49"]);
?>
">Licensing Plans</a>
<a class="nav-tab <?php
echo $dh == "\x74\162\x6f\165\x62\x6c\x65\x73\150\157\x6f\x74\x69\156\x67" ? "\156\141\166\x2d\x74\x61\142\x2d\141\143\164\151\166\145" : '';
?>
" href="<?php
echo add_query_arg(array("\x74\x61\x62" => "\164\162\x6f\x75\142\154\145\x73\x68\x6f\x6f\x74\x69\x6e\147"), $_SERVER["\122\x45\121\x55\x45\x53\124\137\125\122\111"]);
?>
">Troubleshooting</a>
<a class="nav-tab <?php
echo $dh == "\x66\x65\x61\164\165\162\x65\137\x72\x65\x71\165\145\163\164" ? "\156\141\x76\x2d\164\141\142\x2d\x61\x63\x74\151\166\x65" : '';
?>
" href="<?php
echo add_query_arg(array("\164\x61\142" => "\x66\x65\141\x74\165\x72\x65\x5f\x72\145\x71\x75\145\x73\164"), $_SERVER["\122\105\121\x55\x45\x53\124\137\x55\122\111"]);
?>
">Feature Request</a>
</h2>
<table style="width:100%;">
<tr>
<td style="width:65%;vertical-align:top;" id="configurationForm">
<?php
if ($dh == "\143\x6f\x6e\146\x69\147") {
goto Sy;
}
if ($dh == "\x74\x72\x6f\x75\x62\x6c\145\x73\150\157\x6f\x74\151\156\x67") {
goto Js;
}
if ($dh == "\162\157\x6c\x65\x6d\x61\x70\x70\x69\x6e\147") {
goto H1;
}
if ($dh == "\141\x63\x63\157\165\156\164") {
goto uf;
}
if ($dh == "\x61\164\x74\162\151\x62\165\x74\x65\x6d\x61\x70\x70\151\156\x67") {
goto DM;
}
if ($dh == "\x75\163\145\162\x6d\x61\x6e\141\x67\145\x6d\x65\156\x74") {
goto ZU;
}
if ($dh == "\165\163\145\x72\163\x5f\162\x65\160\157\162\x74") {
goto cw;
}
if ($dh == "\160\162\151\x63\151\x6e\x67") {
goto oJ;
}
if ($dh == "\x66\145\x61\x74\x75\x72\x65\x5f\x72\145\161\x75\x65\x73\164") {
goto Qg;
}
if ($dh == "\x63\x6f\156\146\151\x67\x5f\163\x65\x74\x74\x69\x6e\147\x73") {
goto xp;
}
mo_ldap_local_configuration_page();
goto YU;
xp:
mo_show_export_page();
YU:
goto bT;
Qg:
feature_request();
bT:
goto TF;
oJ:
mo_ldap_show_licensing_page();
TF:
goto xT;
cw:
mo_user_report_page();
xT:
goto OD;
ZU:
mo_ldap_show_user_management_page();
OD:
goto rj;
DM:
mo_ldap_show_attribute_mapping_page();
rj:
goto ID;
uf:
if (get_option("\x6d\x6f\137\x6c\144\x61\160\x5f\x6c\x6f\143\x61\x6c\x5f\166\145\162\x69\x66\171\x5f\143\x75\x73\164\x6f\x6d\x65\x72") == "\x74\162\165\145") {
goto nf;
}
if (trim(get_option("\155\157\137\x6c\144\141\160\x5f\x6c\x6f\x63\141\x6c\x5f\x61\144\x6d\151\x6e\x5f\x65\x6d\x61\151\x6c")) != '' && trim(get_option("\x6d\x6f\x5f\154\144\x61\160\x5f\154\x6f\x63\141\x6c\x5f\x61\144\x6d\151\x6e\x5f\141\160\151\137\153\145\x79")) == '' && get_option("\x6d\x6f\x5f\x6c\x64\141\x70\x5f\154\x6f\143\x61\x6c\x5f\156\x65\167\137\162\145\147\x69\163\x74\x72\x61\x74\x69\x6f\156") != "\164\x72\165\x65") {
goto q4;
}
if (get_option("\x6d\157\x5f\154\144\141\160\x5f\154\x6f\x63\141\x6c\x5f\162\145\147\151\x73\164\x72\141\164\x69\157\x6e\x5f\163\x74\x61\x74\x75\163") == "\115\x4f\137\x4f\x54\120\137\104\105\x4c\111\126\x45\122\105\x44\137\x53\x55\x43\103\x45\123\123" || get_option("\155\x6f\137\154\x64\141\x70\137\154\157\x63\x61\x6c\x5f\162\x65\147\151\163\x74\162\141\164\151\x6f\156\137\163\164\141\x74\x75\x73") == "\x4d\x4f\137\x4f\x54\120\x5f\x56\101\114\111\104\x41\124\111\117\x4e\x5f\106\x41\x49\114\125\x52\105" || get_option("\x6d\157\x5f\x6c\144\x61\160\137\x6c\157\143\141\x6c\x5f\162\x65\x67\x69\163\164\x72\x61\164\151\157\x6e\x5f\x73\164\141\164\165\x73") == "\x4d\117\x5f\117\x54\120\137\104\105\x4c\x49\x56\105\122\x45\104\137\106\101\x49\114\x55\x52\x45") {
goto OC;
}
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto in;
}
if (Mo_Ldap_Local_Util::is_customer_registered() && (!NddKoYsdasadJD() || mo_ldap_local_ntlsl())) {
goto m3;
}
if (Mo_Ldap_Local_Util::is_customer_registered() && (!NddKoYsdasadJD() || mo_ldap_local_ntlsl())) {
goto ib;
}
mo_ldap_local_account_page();
goto zr;
ib:
mo_ldap_show_verify_license_page();
zr:
goto Y7;
m3:
mo_ldap_show_verify_license_page();
Y7:
goto i5;
in:
mo_ldap_local_registration_page();
i5:
goto Qe;
OC:
mo_ldap_local_show_otp_verification();
Qe:
goto kA;
q4:
mo_ldap_local_login_page();
kA:
goto Ml;
nf:
mo_ldap_local_login_page();
Ml:
ID:
goto ub;
H1:
mo_ldap_local_rolemapping();
ub:
goto zk;
Js:
mo_ldap_local_troubleshooting();
zk:
goto lY;
Sy:
mo_ldap_local_default_config_page();
lY:
?>
</td>
<?php
if (!($dh != "\146\x65\141\164\165\x72\x65\137\x72\145\161\x75\145\163\x74")) {
goto k9;
}
?>
<td style="vertical-align:top;padding-left:1%;">
<?php
echo mo_ldap_local_support();
?>
<?php
echo mo_ldap_addon_section();
?>
</td>
<?php
k9:
?>
</tr>
</table>
<?php
xv:
?>
</div>
<form name="f" method="post" action="" id="mo_ldap_local_check_license">
<input type="hidden" name="option" value="mo_ldap_local_check_license"/>
</form>
<script>
jQuery('a[href="#activatelicense"]').click(function(){
jQuery('#mo_ldap_local_check_license').submit();
});
</script>
<?php
}
function mo_ldap_local_registration_page()
{
update_option("\155\x6f\x5f\x6c\x64\141\160\x5f\154\157\143\141\154\x5f\x6e\145\x77\x5f\162\x65\147\151\x73\164\162\x61\x74\151\x6f\x6e", "\x74\x72\165\x65");
?>
<!--Register with miniOrange-->
<form name="f" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_register_customer" />
<p>Just complete the short registration below to configure your own LDAP Server. Please enter a valid email id that you have access to. You will be able to move forward after verifying an OTP that we will send to this email.</p>
<div class="mo_ldap_table_layout" style="min-height: 274px;">
<h3>Register with miniOrange</h3>
<div id="panel1">
<table class="mo_ldap_settings_table">
<tr>
<td><b><font color="#FF0000">*</font>Email:</b></td>
<td>
<?php
$current_user = wp_get_current_user();
if (get_option("\155\x6f\x5f\154\144\141\x70\x5f\x6c\x6f\x63\x61\154\x5f\x61\x64\x6d\x69\156\x5f\145\155\x61\x69\x6c")) {
goto j8;
}
$Of = $current_user->user_email;
goto cz;
j8:
$Of = get_option("\155\157\x5f\x6c\x64\x61\x70\137\154\x6f\x63\141\154\137\141\144\155\151\156\x5f\145\x6d\x61\151\154");
cz:
?>
<input class="mo_ldap_table_textbox" type="email" name="email"
required placeholder="[email protected]"
value="<?php
echo $Of;
?>
" /></td>
</tr>
<tr>
<td><b>Phone number:</b></td>
<td><input class="mo_ldap_table_textbox" type="tel" id="phone"
pattern="[\+]\d{11,14}|[\+]\d{1,4}([\s]{0,1})(\d{0}|\d{9,10})" name="phone"
title="Phone with country code eg. +1xxxxxxxxxx"
placeholder="Phone with country code eg. +1xxxxxxxxxx"
value="<?php
echo get_option("\155\x6f\137\x6c\144\x61\160\x5f\x6c\x6f\x63\x61\x6c\137\x61\144\x6d\151\x6e\137\160\150\x6f\156\145");
?>
" />
<i>We will call only if you call for support</i><br><br></td>
</tr>
<tr>
<td><b><font color="#FF0000">*</font>Password:</b></td>
<td><input class="mo_ldap_table_textbox" required type="password"
name="password" placeholder="Choose your password (Min. length 6)" />
</td>
</tr>
<tr>
<td><b><font color="#FF0000">*</font>Confirm Password:</b></td>
<td><input class="mo_ldap_table_textbox" required type="password"
name="confirmPassword" placeholder="Confirm your password" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Save"
class="button button-primary button-large" /></td>
</tr>
</table>
</div>
</div>
</form>
<!--<script>
jQuery("#phone").intlTelInput();
</script> -->
<?php
}
function mo_ldap_local_ntlsl()
{
$n3 = get_option("\x6d\157\137\154\144\x61\160\137\154\157\x63\x61\x6c\x5f\141\x64\x6d\x69\x6e\x5f\x65\155\x61\151\154");
$oV = get_option("\155\x6f\x5f\x6c\x64\141\x70\x5f\x6c\157\143\x61\x6c\x5f\x61\144\x6d\151\x6e\137\143\165\x73\164\x6f\155\x65\162\137\153\145\x79");
$st = Mo_Ldap_Local_Util::decrypt(get_option("\164\x5f\163\x69\164\145\137\163\x74\x61\x74\x75\x73"));
if ($st != "\x74\162\x75\x65" || !$n3 || !$oV || !is_numeric(trim($oV))) {
goto wa;
}
return 1;
goto A8;
wa:
return 0;
A8:
}
add_action("\x66\154\x75\163\x68\x63\141\143\150\145", "\165\160\x64\x61\x74\145\x5f\x73\164\141\164\x75\x73", 10, 3);
function mo_ldap_local_login_page()
{
?>
<!--Verify password with miniOrange-->
<form name="f" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_verify_customer" />
<div class="mo_ldap_table_layout">
<h3>Login with miniOrange</h3>
<div id="panel1">
<table class="mo_ldap_settings_table">
<tr>
<td><b><font color="#FF0000">*</font>Email:</b></td>
<td><input class="mo_ldap_table_textbox" type="email" name="email"
required placeholder="[email protected]"
value="<?php
echo get_option("\x6d\157\x5f\x6c\144\x61\x70\x5f\154\157\143\x61\154\137\141\x64\x6d\151\156\137\x65\155\141\151\154");
?>
" /></td>
</tr>
<tr>
<td><b><font color="#FF0000">*</font>Password:</b></td>
<td><input class="mo_ldap_table_textbox" required type="password"
name="password" placeholder="Enter your miniOrange password" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" class="button button-primary button-large" /> <a
href="#cancel_link">Cancel</a>
<a target="_blank"
href="https://login.xecurify.com/moas/idp/resetpassword">Click
here if you forgot your password?</a></td>
</tr>
</table>
</div>
</div>
</form>
<form id="cancel_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_cancel" />
</form>
<script>
jQuery('a[href="#cancel_link"]').click(function(){
jQuery('#cancel_form').submit();
});
jQuery('a[href="#mo_ldap_local_forgot_password_link"]').click(function(){
jQuery('#forgot_password_form').submit();
});
</script>
<?php
}
function mo_ldap_local_account_page()
{
?>
<div style="background-color:#FFFFFF; border:1px solid #CCCCCC; padding:0px 0px 0px 10px; width:98%;height:344px">
<div>
<h4>Thank You for registering with miniOrange.</h4>
<h3>Your Profile</h3>
<table border="1" style="background-color:#FFFFFF; border:1px solid #CCCCCC; border-collapse: collapse; padding:0px 0px 0px 10px; margin:2px; width:85%">
<tr>
<td style="width:45%; padding: 10px;">Username/Email</td>
<td style="width:55%; padding: 10px;"><?php
echo get_option("\155\x6f\137\x6c\x64\141\x70\137\154\157\x63\x61\x6c\137\x61\144\155\x69\156\137\145\x6d\x61\x69\x6c");
?>
</td>
</tr>
<tr>
<td style="width:45%; padding: 10px;">Customer ID</td>
<td style="width:55%; padding: 10px;"><?php
echo get_option("\x6d\157\x5f\154\x64\x61\160\x5f\154\157\143\141\x6c\x5f\141\144\155\x69\156\137\143\165\x73\x74\157\x6d\x65\162\137\153\x65\171");
?>
</td>
</tr>
<tr>
<td style="width:45%; padding: 10px;">API Key</td>
<td style="width:55%; padding: 10px;"><?php
echo get_option("\155\157\137\154\x64\x61\160\137\154\157\143\x61\x6c\137\x61\144\x6d\x69\156\137\141\x70\151\x5f\x6b\145\171");
?>
</td>
</tr>
<tr>
<td style="width:45%; padding: 10px;">Token Key</td>
<td style="width:55%; padding: 10px;"><?php
echo get_option("\155\157\137\x6c\144\141\160\x5f\154\157\143\141\154\137\143\x75\163\164\157\155\145\x72\137\x74\x6f\153\145\156");
?>
</td>
</tr>
</table>
<br/>
<p><a target="_blank" href="<?php
echo get_option("\155\157\137\154\144\x61\160\137\154\x6f\143\x61\x6c\x5f\150\x6f\163\164\137\x6e\x61\155\x65") . "\x2f\x6d\157\141\163\57\151\144\160\x2f\162\145\x73\x65\x74\160\x61\x73\x73\x77\157\162\144";
?>
">Click here</a> if you forgot your password to your miniOrange account.</p>
</div>
</div>
<?php
if (!(isset($_POST["\x6f\x70\x74\x69\157\156"]) && ($_POST["\x6f\160\164\151\157\x6e"] == "\x6d\x6f\x5f\x6c\144\x61\160\137\x6c\157\x63\x61\154\137\x76\145\162\x69\146\x79\x5f\x63\165\163\x74\157\x6d\145\x72" || $_POST["\157\160\164\151\x6f\x6e"] == "\x6d\157\x5f\x6c\144\x61\160\137\x6c\x6f\143\x61\x6c\x5f\162\x65\x67\x69\163\164\x65\x72\x5f\x63\165\163\164\x6f\155\x65\x72"))) {
goto vj;
}
?>
<script>
window.location.href = "<?php
echo add_query_arg(array("\x74\141\x62" => "\160\x72\151\x63\x69\x6e\x67"), $_SERVER["\x52\x45\121\125\x45\123\124\137\x55\122\111"]);
?>
";
</script>
<?php
vj:
}
function mo_ldap_local_link()
{
?>
<a href="http://miniorange.com/wordpress-ldap-login" style="display:none;">Login to WordPress using LDAP</a>
<a href="http://miniorange.com/cloud-identity-broker-service" style="display:none;">Cloud Identity broker service</a>
<a href="http://miniorange.com/strong_auth" style="display:none;"></a>
<a href="http://miniorange.com/single-sign-on-sso" style="display:none;"></a>
<a href="http://miniorange.com/fraud" style="display:none;"></a>
<?php
}
function mo_ldap_local_xhsl()
{
$gK = DateTime::createFromFormat("\x59\x2d\155\55\144\40\110\72\x69\x3a\163\x2e\165", sanitizeElement());
return $gK->format("\106\40\x6a\54\40\x59\54\x20\x67\x3a\x69\x20\141");
}
function decryptLDAPElement()
{
$KL = file_get_contents(plugins_url("\162\145\163\x6f\x75\162\143\x65\163\57\145\156\137\x6c\151\x2e\x6d\x6f", __FILE__));
$vi = get_option("\155\x6f\x5f\x6c\x64\x61\160\137\154\x6f\x63\x61\154\x5f\143\165\163\x74\x6f\155\x65\x72\x5f\x74\157\153\145\156");
$KL = Mo_Ldap_Local_Util::decrypt($KL);
if (!empty($KL)) {
goto yP;
}
return true;
yP:
$Fl = get_option("\155\x6f\137\154\x64\x61\x70\x5f\154\157\143\141\x6c\x5f\141\144\155\x69\156\x5f\141\160\151\x5f\153\x65\171");
$KL = Mo_Ldap_Local_Util::decrypt($KL);
$Dd = simplexml_load_string($KL);
$uZ = $Dd->signature;
$YN = $Dd->token;
$YN = Mo_Ldap_Local_Util::decrypt($YN);
$C9 = str_split($YN, $HS = 64);
$YN = "\55\x2d\x2d\x2d\x2d\x42\x45\x47\111\116\x20\x50\125\x42\x4c\111\x43\40\x4b\105\x59\x2d\x2d\x2d\55\x2d\xa";
foreach ($C9 as $aa) {
$YN .= $aa . "\xa";
Cm:
}
X5:
$YN .= "\x2d\55\x2d\55\x2d\105\116\x44\40\120\x55\102\x4c\111\103\40\113\x45\x59\x2d\x2d\x2d\55\x2d";
$iu = openssl_get_publickey($YN);
$hK = $Dd->expirationTime;
$uZ = base64_decode($uZ);
$ww = openssl_verify($hK, $uZ, $iu, OPENSSL_ALGO_SHA1);
if (!($ww == 1)) {
goto ty;
}
$cI = $Dd->expirationTime;
$qD = strtotime($cI);
$Au = time();
if ($Au > $qD) {
goto QO;
}
$Bl = new Mo_Ldap_Local_Customer();
$B_ = $qD - $Au;
$N0 = $B_ / (60 * 60 * 24);
$N0 = intval($N0);
if ($N0 < 1 && !get_option("\155\157\137\154\144\x61\x70\x5f\154\x6f\x63\141\x6c\137\141\x6c\145\162\x74\x5f\x73\145\156\x74\x5f\146\157\162\x5f\157\x6e\x65")) {
goto w8;
}
if (!($N0 < 2 && !get_option("\x6d\x6f\x5f\x6c\144\141\x70\x5f\154\x6f\x63\141\x6c\x5f\x61\x6c\145\x72\x74\137\163\145\x6e\164\x5f\146\157\x72\137\x74\167\157"))) {
goto aX;
}
$Bl->mo_ldap_local_send_alert_email(2);
update_option("\x6d\x6f\x5f\x6c\144\x61\x70\137\x6c\x6f\x63\141\x6c\137\x61\154\x65\162\164\137\163\x65\x6e\164\137\x66\x6f\x72\137\x74\x77\157", true);
aX:
goto tZ;
w8:
$Bl->mo_ldap_local_send_alert_email(1);
update_option("\x6d\157\x5f\154\144\x61\x70\x5f\154\x6f\143\x61\x6c\x5f\x61\154\x65\x72\x74\137\x73\145\x6e\x74\137\146\157\x72\x5f\157\x6e\145", true);
tZ:
return false;
goto mo;
QO:
return true;
mo:
ty:
return true;
}
function mo_ldap_local_configuration_page()
{
$Gv = get_option("\x6d\x6f\137\x6c\144\x61\160\137\154\157\143\141\x6c\137\x64\x65\x66\141\165\x6c\164\137\143\157\x6e\146\x69\x67");
$PR = get_option("\155\x6f\x5f\x6c\144\141\x70\137\x6c\x6f\143\141\x6c\x5f\x73\x65\162\166\145\162\137\165\x72\154") ? Mo_Ldap_Local_Util::decrypt(get_option("\155\x6f\137\x6c\144\141\x70\137\154\157\x63\x61\x6c\x5f\x73\x65\x72\166\145\162\x5f\x75\162\154")) : '';
$V6 = get_option("\x6d\x6f\137\154\144\141\160\x5f\x6c\157\143\141\154\x5f\163\x65\x72\x76\145\x72\137\x64\156") ? Mo_Ldap_Local_Util::decrypt(get_option("\155\x6f\137\x6c\144\x61\x70\137\154\x6f\143\x61\x6c\137\163\145\162\166\145\x72\x5f\x64\156")) : '';
$xq = get_option("\x6d\157\137\154\x64\x61\160\x5f\154\x6f\143\x61\x6c\x5f\x73\145\162\166\x65\162\x5f\160\141\163\163\x77\x6f\162\144") ? Mo_Ldap_Local_Util::decrypt(get_option("\155\x6f\137\x6c\x64\x61\160\x5f\154\x6f\x63\x61\154\x5f\x73\x65\162\x76\145\162\x5f\x70\x61\x73\163\167\x6f\x72\x64")) : '';
$iK = get_option("\155\157\137\154\144\x61\160\137\154\157\x63\x61\x6c\137\x73\x65\141\x72\x63\150\137\x62\141\x73\x65") ? Mo_Ldap_Local_Util::decrypt(get_option("\x6d\x6f\x5f\154\x64\x61\160\137\154\x6f\143\141\154\x5f\163\145\141\x72\x63\150\137\x62\141\x73\x65")) : '';
$u5 = Mo_Ldap_Local_Util::decrypt(get_option("\155\x6f\x5f\x6c\x64\x61\160\137\154\x6f\x63\141\154\137\165\x73\145\x72\x6e\x61\x6d\145\137\141\x74\x74\162\151\142\x75\164\x65"));
$Io = get_option("\155\157\137\154\x64\141\160\x5f\154\x6f\x63\x61\154\x5f\163\x65\141\x72\x63\x68\x5f\x66\x69\x6c\x74\145\x72") ? Mo_Ldap_Local_Util::decrypt(get_option("\155\157\137\x6c\144\141\x70\137\154\157\143\141\x6c\x5f\163\x65\x61\162\x63\x68\137\x66\x69\154\164\x65\x72")) : '';
$Z4 = get_option("\155\x6f\x5f\154\144\141\x70\x5f\x6c\x6f\143\x61\x6c\x5f\x65\156\141\x62\x6c\145\x5f\142\x6f\164\150\137\x6c\157\147\151\156");
if ($Z4) {
goto ls;
}
update_option("\155\157\137\x6c\x64\141\x70\137\154\x6f\x63\x61\154\137\145\x6e\141\142\154\x65\137\142\x6f\164\x68\137\x6c\x6f\x67\151\x6e", "\x61\144\x6d\x69\x6e");
ls:
$gJ = get_option("\155\157\x5f\154\144\x61\x70\x5f\x6c\157\x63\141\x6c\x5f\162\145\144\151\x72\x65\143\x74\137\x74\157");
$WS = '';
if (!(get_option("\155\157\137\x6c\144\141\x70\x5f\x6c\157\x63\x61\154\x5f\163\145\x72\x76\145\162\137\x75\x72\154\137\163\164\x61\x74\x75\x73") && !Mo_Ldap_Local_Util::check_empty_or_null($PR))) {
goto CY;
}
if (get_option("\155\157\x5f\x6c\x64\x61\160\137\154\x6f\143\x61\154\137\163\145\162\x76\x65\162\x5f\165\162\x6c\x5f\163\x74\141\164\165\163") == "\126\101\114\x49\104") {
goto MV;
}
if (!(get_option("\x6d\157\137\154\x64\x61\160\x5f\x6c\157\143\x61\154\x5f\163\x65\162\x76\x65\x72\x5f\x75\x72\x6c\137\163\164\x61\164\165\163") == "\x49\x4e\126\101\114\111\104")) {
goto mX;
}
$WS = "\x6d\157\x5f\x6c\x64\x61\160\x5f\x69\156\160\x75\x74\x5f\145\x72\x72\x6f\x72";
mX:
goto GT;
MV:
$WS = "\155\157\x5f\x6c\144\x61\160\x5f\x69\x6e\160\x75\164\x5f\x73\x75\143\143\145\x73\163";
GT:
CY:
$jt = '';
if (!get_option("\x6d\157\x5f\x6c\x64\141\160\x5f\154\157\143\141\154\x5f\x73\145\x72\x76\x69\x63\145\x5f\x61\143\x63\157\165\156\164\x5f\163\164\141\164\x75\163")) {
goto fm;
}
if (get_option("\155\x6f\x5f\154\x64\141\160\x5f\154\x6f\x63\x61\154\x5f\163\145\x72\166\151\x63\x65\137\141\x63\143\x6f\x75\x6e\164\137\x73\x74\141\164\165\163") == "\x56\x41\114\x49\104") {
goto yX;
}
if (!(get_option("\155\x6f\x5f\154\x64\x61\x70\137\154\157\x63\141\154\x5f\x73\x65\x72\166\151\x63\x65\x5f\141\143\143\157\x75\x6e\x74\137\163\x74\141\164\165\x73") == "\111\116\x56\x41\114\111\104")) {
goto vh;
}
$jt = "\155\x6f\137\154\x64\141\x70\137\151\x6e\160\165\x74\137\145\162\x72\x6f\x72";
vh:
goto Fy;
yX:
$jt = "\x6d\157\x5f\154\144\141\x70\137\151\156\x70\165\x74\x5f\163\x75\x63\143\x65\163\x73";
Fy:
fm:
$jY = '';
if (!get_option("\x6d\x6f\x5f\154\x64\141\x70\137\154\x6f\x63\x61\154\137\x75\x73\145\162\x5f\155\x61\x70\160\x69\156\x67\137\163\164\x61\164\165\163")) {
goto rW;
}
if (get_option("\x6d\x6f\137\x6c\144\141\x70\137\x6c\157\x63\141\x6c\x5f\x75\163\145\162\137\x6d\141\x70\x70\x69\x6e\x67\x5f\163\x74\141\164\165\163") == "\x56\x41\x4c\111\104") {
goto aK;
}
if (!(get_option("\x6d\157\x5f\x6c\x64\x61\x70\x5f\x6c\157\x63\141\x6c\137\165\163\x65\162\x5f\x6d\x61\x70\x70\x69\x6e\x67\137\163\164\x61\x74\165\163") == "\x49\116\x56\101\x4c\111\104")) {
goto xS;
}
$jY = "\155\x6f\137\154\144\141\x70\x5f\151\156\x70\165\x74\x5f\x65\x72\162\157\162";
xS:
goto wS;
aK:
$jY = "\x6d\x6f\137\154\144\141\x70\137\151\x6e\160\165\x74\137\x73\x75\x63\143\x65\163\x73";
wS:
rW:
$dH = '';
if (!get_option("\155\157\x5f\154\144\141\x70\137\154\x6f\143\141\154\x5f\x75\163\x65\x72\156\x61\x6d\145\137\163\x74\x61\164\165\x73")) {
goto oL;
}
if (get_option("\155\157\x5f\x6c\x64\141\x70\x5f\154\157\143\x61\154\x5f\x75\163\145\162\156\x61\155\145\137\x73\164\x61\164\x75\x73") == "\x56\x41\114\111\104") {
goto Tn;
}
if (!(get_option("\155\157\x5f\154\144\141\160\x5f\x6c\x6f\143\x61\x6c\137\x75\163\x65\x72\156\141\155\x65\x5f\163\x74\141\x74\x75\x73") == "\x49\116\126\101\114\x49\104")) {
goto FA;
}
$dH = "\155\x6f\137\x6c\x64\141\160\137\151\x6e\x70\165\x74\137\145\162\162\157\x72";
FA:
goto Us;
Tn:
$dH = "\x6d\157\x5f\x6c\x64\141\160\x5f\151\156\160\165\164\137\x73\x75\143\143\x65\x73\x73";
Us:
delete_option("\155\x6f\137\154\x64\x61\160\x5f\154\x6f\x63\x61\154\137\x75\163\x65\x72\156\141\x6d\145\137\163\164\141\x74\165\163");
oL:
?>
<div class="mo_ldap_small_layout" style="margin-top:0px;">
<!-- Toggle checkbox -->
<?php
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto OF;
}
if (!NddKoYsdasadJD()) {
goto CJ;
}
if (mo_ldap_local_ntlsl()) {
goto HF;
}
if (!get_option("\155\157\x5f\x6c\x64\x61\x70\x5f\x6c\157\x63\x61\x6c\x5f\146\x69\x6c\x65\x5f\x63\150\141\156\147\145\x64")) {
goto qY;
}
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Don't try to change the plugin. Please revert the changes to make the plugin work.</div>
<?php
qY:
goto lR;
HF:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">You are on Trial version of the plugin and it will expire on <span style="color:#0073aa"><?php
echo mo_ldap_local_xhsl();
?>
</span>. <?php
if (ch_xdigit()) {
goto oP;
}
?>
If you already purchased license <a href="#activatelicense">click here to activate</a> your license.<?php
goto Sm;
oP:
?>
Click <a href="<?php
echo add_query_arg(array("\x74\x61\142" => "\141\x63\x63\x6f\x75\x6e\164"), $_SERVER["\x52\105\121\125\105\x53\x54\x5f\125\122\x49"]);
?>
">here</a> to activate your license.<?php
Sm:
?>
</div>
<?php
lR:
goto bR;
CJ:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">
<?php
if (signNode() && !ch_xdigit()) {
goto Fv;
}
?>
Please enter your<a href="<?php
echo add_query_arg(array("\164\x61\142" => "\x61\x63\143\x6f\165\156\x74"), $_SERVER["\x52\105\121\x55\x45\123\x54\x5f\x55\122\111"]);
?>
"> license key</a> to activate the plugin.<?php
goto hy;
Fv:
?>
<a href="<?php
echo add_query_arg(array("\164\x61\142" => "\x61\143\143\x6f\165\x6e\x74"), $_SERVER["\x52\x45\121\125\x45\123\x54\137\125\122\x49"]);
?>
">Click here</a> to activate your 5 days FREE Trial for the plugin.<?php
hy:
?>
</div>
<?php
bR:
goto LC;
OF:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Please <a href="<?php
echo add_query_arg(array("\164\x61\x62" => "\x61\x63\143\x6f\x75\156\164"), $_SERVER["\x52\x45\121\125\x45\x53\124\x5f\x55\122\x49"]);
?>
">Register or Login with miniOrange</a> to configure the miniOrange LDAP Plugin.</div>
<?php
LC:
?>
<form name="f" id="enable_login_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_enable" />
<h3>Enable login using LDAP</h3>
<?php
if (isset($PR) && $PR != '') {
goto A1;
}
?>
<input type="checkbox" id="enable_ldap_login" name="enable_ldap_login" value="1" <?php
checked(get_option("\155\157\137\x6c\144\x61\160\137\154\x6f\x63\141\154\x5f\145\156\x61\142\154\145\x5f\x6c\157\147\x69\x6e") == 1);
?>
disabled <?php
if (NddKoYsdasadJD()) {
goto Db;
}
echo "\x64\151\163\141\142\154\145\x64";
Db:
?>
/>Enable LDAP login
<?php
goto m0;
A1:
?>
<input type="checkbox" id="enable_ldap_login" name="enable_ldap_login" value="1" <?php
checked(get_option("\x6d\157\x5f\x6c\144\141\x70\x5f\x6c\x6f\x63\x61\x6c\137\x65\156\141\142\154\x65\x5f\x6c\157\x67\151\156") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto o9;
}
echo "\x64\x69\163\x61\142\154\145\x64";
o9:
?>
<?php
if (NddKoYsdasadJD()) {
goto xK;
}
echo "\x64\x69\163\x61\x62\x6c\x65\144";
xK:
?>
/>Enable LDAP login
<?php
m0:
?>
<p>Enabling LDAP login will protect your login page by your configured LDAP. <b>Please check this only after you have successfully tested your configuration</b> as the default WordPress login will stop working.</p>
</form>
<script>
jQuery('#enable_ldap_login').change(function() {
jQuery('#enable_login_form').submit();
});
</script>
Authenticate users from both LDAP and WordPress ( This will allow users to use either of WordPress credentials or LDAP credentials. )
<form name="f" id="enable_both_login_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_enable_both_login" />
<input type="radio" class="mo_ldap_local_enable_both_login" name="mo_ldap_local_enable_both_login" value="admin" <?php
checked(get_option("\155\x6f\x5f\154\144\141\x70\137\154\x6f\143\141\154\137\x65\x6e\141\x62\154\145\137\142\x6f\164\150\137\154\x6f\x67\x69\x6e") == "\141\144\x6d\x69\156");
?>
<?php
if (NddKoYsdasadJD()) {
goto Gi;
}
echo "\x64\151\x73\x61\x62\154\145\144";
Gi:
?>
/> Only Administrators
<input type="radio" class="mo_ldap_local_enable_both_login" name="mo_ldap_local_enable_both_login" value="all" <?php
checked(get_option("\155\157\x5f\x6c\x64\141\160\x5f\154\x6f\x63\141\154\137\145\156\x61\142\x6c\145\137\x62\x6f\x74\x68\x5f\154\157\147\151\x6e") == "\x61\x6c\154");
?>
<?php
if (NddKoYsdasadJD()) {
goto rq;
}
echo "\x64\x69\163\x61\142\154\x65\x64";
rq:
?>
/> All Users
<input type="radio" class="mo_ldap_local_enable_both_login" name="mo_ldap_local_enable_both_login" value="none" <?php
checked(get_option("\x6d\x6f\x5f\154\144\x61\x70\x5f\x6c\157\143\x61\x6c\137\145\156\x61\142\154\x65\137\x62\157\164\x68\137\154\x6f\147\151\x6e") == "\x6e\x6f\156\x65");
?>
<?php
if (NddKoYsdasadJD()) {
goto Tp;
}
echo "\x64\x69\x73\x61\x62\x6c\x65\144";
Tp:
?>
/> None
</form>
<br>
<?php
$gJ = get_option("\x6d\x6f\137\154\x64\141\160\137\x6c\157\x63\141\x6c\x5f\162\145\x64\x69\x72\145\x63\x74\137\164\x6f");
$J7 = get_option("\x6d\x6f\x5f\x6c\x64\141\x70\x5f\x6c\x6f\x63\x61\154\x5f\143\165\x73\x74\157\155\x5f\x72\x65\x64\151\x72\145\x63\x74");
?>
<b>Redirect after authentication</b><br>
<form name="f" id="form_redirect_to" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_save_login_redirect" />
<select id="redirect_to" name="redirect_to"<?php
if (NddKoYsdasadJD()) {
goto nr;
}
echo "\144\x69\163\x61\142\154\x65\x64";
nr:
?>
>
<option value="none" <?php
if (!($gJ == "\156\x6f\156\145" || !$gJ)) {
goto yf;
}
echo "\x73\x65\154\x65\143\164\145\144";
yf:
?>
>NONE</option>
<option value="profile" <?php
if (!($gJ == "\x70\162\157\146\x69\154\145")) {
goto xt;
}
echo "\163\x65\x6c\145\x63\164\145\x64";
xt:
?>
>Profile Page</option>
<option value="homepage" <?php
if (!($gJ == "\x68\157\x6d\145\160\141\x67\x65")) {
goto cu;
}
echo "\163\145\x6c\145\143\164\145\x64";
cu:
?>
>Home Page</option>
<option value="custom" <?php
if (!($gJ == "\x63\x75\x73\164\157\155")) {
goto ht;
}
echo "\163\x65\154\x65\x63\164\x65\x64";
ht:
?>
>Custom Page</option>
</select><br>
</form>
<form name="custom_redirect_form" id="custom_redirect_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_custom_redirect">
<input class="mo_ldap_table_textbox" type="url" id="mo_ldap_local_custom_url" name="mo_ldap_local_custom_url" required placeholder="" value="<?php
echo $J7;
?>
" <?php
if ($gJ == "\143\x75\x73\164\157\x6d") {
goto nw;
}
?>
style="display: none" <?php
goto mT;
nw:
?>
style="display: block" <?php
mT:
?>
<?php
if (NddKoYsdasadJD()) {
goto f1;
}
echo "\x64\151\x73\x61\142\x6c\x65\x64";
f1:
?>
/>
<input type="submit" class="button button-primary button-large" value="Save" <?php
if ($gJ == "\x63\x75\x73\x74\157\155") {
goto kB;
}
?>
style="display: none" <?php
goto yO;
kB:
?>
style="display: block" <?php
yO:
?>
<?php
if (NddKoYsdasadJD()) {
goto Ga;
}
echo "\x64\x69\x73\x61\x62\x6c\145\x64";
Ga:
?>
/>
</form>
<script>
jQuery('#redirect_to').change(function() {
jQuery('#form_redirect_to').submit();
});
jQuery('.mo_ldap_local_enable_both_login').change(function() {
jQuery('#enable_both_login_form').submit();
});
</script>
<br>
<!--
<form name="f" id="enable_fallback_login_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_fallback_login" />
<input type="checkbox" id="mo_ldap_local_enable_fallback_login" name="mo_ldap_local_enable_fallback_login" value="1" <?php
checked(get_option("\155\x6f\x5f\x6c\x64\141\160\x5f\x6c\x6f\143\x61\154\137\x65\x6e\x61\x62\x6c\145\x5f\x66\x61\154\154\142\141\x63\153\137\x6c\x6f\x67\x69\x6e") == 1);
?>
/>Enable Fallback Login with Wordpress password(If LDAP Server is unreacheable). This will update your local Wordpress password as your LDAP password. RECOMMENDED to be <b>FALSE</b>
</form>
<br>-->
<!-- Toggle checkbox -->
<form name="f" id="enable_register_user_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_register_user" />
<input type="checkbox" id="mo_ldap_local_register_user" name="mo_ldap_local_register_user" value="1" <?php
checked(get_option("\155\157\x5f\x6c\x64\x61\x70\137\154\157\143\141\x6c\x5f\162\x65\x67\x69\x73\x74\145\162\137\165\x73\145\x72") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto nh;
}
echo "\144\151\163\x61\142\154\145\x64";
nh:
?>
/>Enable Auto Registering users if they do not exist in WordPress
</form>
<br>
<form name="f" id="enable_authorized_users_only" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_authorized_users_only" />
<input type="checkbox" id="authorized_users_only" name="authorized_users_only" value="1" <?php
checked(get_option("\x6d\x6f\137\154\x64\141\160\x5f\x6c\157\143\141\154\137\x61\x75\x74\x68\x6f\162\x69\x7a\x65\x64\137\x75\x73\145\x72\x73\137\157\x6e\154\x79") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto oj;
}
echo "\144\x69\163\x61\x62\154\145\144";
oj:
?>
/>Protect all website content by login.
</form>
<script>
jQuery('#mo_ldap_local_register_user').change(function() {
jQuery('#enable_register_user_form').submit();
});
jQuery('#enable_fallback_login_form').change(function() {
jQuery('#enable_fallback_login_form').submit();
});
jQuery('#authorized_users_only').change(function() {
jQuery('#enable_authorized_users_only').submit();
});
</script>
<br/>
</div>
<div class="mo_ldap_small_layout">
<script>
function ping_server(){
var ldapServerUrl = document.getElementById('ldap_server').value;
if(!ldapServerUrl || ldapServerUrl.trim() == ""){
alert("Enter LDAP Server URL");
} else{
var option = document.getElementById("mo_ldap_local_configuration_form_action").value = "mo_ldap_local_ping_server";
//alert(document.getElementById("mo_ldap_configuration_form_action").value);
var configForm = document.getElementById("mo_form1");
//alert(configForm);
configForm.submit();
}
}
</script>
<!-- Save LDAP Configuration -->
<form id="mo_form1" name="f" method="post" action="">
<input id="mo_ldap_local_configuration_form_action" type="hidden" name="option" value="mo_ldap_local_save_config" />
<!-- Copy default values to configuration -->
<p><strong style="font-size:14px;">NOTE: </strong> You need to find out the values for the below given fields from your LDAP Administrator.</strong></p>
<h3 class="mo_ldap_left">LDAP Connection Information</h3>
<div id="panel1">
<table class="mo_ldap_settings_table">
<tr>
<td style="width: 24%"><b><font color="#FF0000">*</font>LDAP Server:</b></td>
<td><input class="mo_ldap_table_textbox <?php
echo $WS;
?>
" type="url" id="ldap_server" name="ldap_server" required placeholder="ldap://<server_address or IP>:<port>" value="<?php
echo $PR;
?>
" <?php
if (NddKoYsdasadJD()) {
goto Xz;
}
echo "\144\151\x73\141\142\154\x65\x64";
Xz:
?>
/></td>
</tr>
<tr>
<td> </td>
<td><i>Specify the host name for the LDAP server eg: ldap://myldapserver.domain:389 , ldap://89.38.192.1:389. When using SSL, the host may have to take the form ldaps://host:636.</i>
<p><i><b><a href="https://www.miniorange.com/guide-to-setup-ldaps-on-windows-server" target="_blank">Click here</a> to go through the configuration steps to connect with LDAP server over LDAPS (LDAP over SSL:636).</b></i></p>
</td>
</tr>
<tr>
<td> </td>
<td>
<input type="checkbox" name="anonymous_bind" value="1" <?php
checked(get_option("\x6d\157\x5f\x6c\144\x61\x70\x5f\x6c\157\143\141\x6c\137\x61\156\157\156\x79\x6d\157\165\163\137\x62\151\156\144") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto mC;
}
echo "\144\151\163\x61\x62\x6c\145\144";
mC:
?>
onchange="enable(this)">Bind anonymously (to check connection to server).
</td>
<td> </td>
</tr>
<tr>
<td></td>
<td><input type="button" class="button button-primary button-large" id="ping_button" onclick="ping_server();" value="Contact LDAP Server" <?php
if (NddKoYsdasadJD()) {
goto fa;
}
echo "\x64\x69\163\141\142\154\x65\144";
fa:
?>
<?php
if (!(get_option("\155\x6f\x5f\154\144\x61\x70\137\x6c\x6f\143\x61\154\x5f\x61\156\x6f\156\171\155\x6f\165\x73\137\x62\x69\156\x64") == 0)) {
goto ss;
}
echo "\163\164\x79\154\x65\75\42\x64\151\x73\160\x6c\141\171\x3a\x20\x6e\157\x6e\x65\x3b\42\40";
ss:
?>
/> <span id="pingResult"></span></td>
<td></td>
</tr>
<tr><td> </td></tr>
<tr>
<td> </td>
<td>
<input type="checkbox" name="mo_ldap_local_tls_enable" value="1" <?php
checked(get_option("\x6d\x6f\137\x6c\144\x61\x70\137\154\x6f\143\141\154\x5f\165\x73\145\137\164\x6c\163") == 1);
if (NddKoYsdasadJD()) {
goto BZ;
}
echo "\144\x69\163\141\142\x6c\x65\x64";
BZ:
?>
onchange="enabletls(this)"> <b>Enable TLS</b> (Check this only if your server use TLS Connection.)
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td><b><font color="#FF0000">*</font>Service Account DN:</b></td>
<td><input class="mo_ldap_table_textbox <?php
echo $jt;
?>
" type="text" id="dn" name="dn" required placeholder="CN=service,DC=domain,DC=com" value="<?php
echo $V6;
?>
" <?php
if (NddKoYsdasadJD()) {
goto gA;
}
echo "\144\151\163\141\142\x6c\145\x64";
gA:
?>
/></td>
</tr>
<tr>
<td> </td>
<td><i>This service account will be used to establish the connection.<br>Specify the Service Account DN(distinguished Name) of the LDAP server. e.g. cn=username,cn=group,dc=domain,dc=com<br/>uid=username,ou=organisational unit,dc=domain,dc=com.</i></td>
</tr>
<tr><td> </td></tr>
<tr>
<td><b><font color="#FF0000">*</font>Service Account Password:</b></td>
<td><input class="mo_ldap_table_textbox <?php
echo $jt;
?>
" required type="password" name="admin_password" placeholder="Enter password of Service Account" value="<?php
echo $xq;
?>
" <?php
if (NddKoYsdasadJD()) {
goto oC;
}
echo "\144\x69\163\141\142\154\x65\x64";
oC:
?>
/></td>
</tr>
<tr>
<td> </td>
<td><i>Password for the Service Account in the LDAP Server.</i></td>
</tr>
<tr><td> </td></tr>
<tr>
<td> </td>
<td><input type="submit" class="button button-primary button-large" value="Test Connection & Save" <?php
if (NddKoYsdasadJD()) {
goto Mz;
}
echo "\x64\151\163\141\x62\154\145\x64";
Mz:
?>
/> <input
type="button" id="conn_help" class="help button button-large trouble_button" value="Troubleshooting" <?php
if (NddKoYsdasadJD()) {
goto iI;
}
echo "\x64\x69\163\141\142\x6c\x65\x64";
iI:
?>
/></td>
</tr>
<tr>
<td colspan="2" id="conn_troubleshoot" hidden>
<p>
<strong>Are you having trouble connecting to your LDAP server from this plugin?</strong>
<ol>
<li>Please make sure that all the values entered are correct.</li>
<li>If you are having firewall, open the firewall to allow incoming requests to your LDAP from your WordPress <b>Server IP</b> and <b>port 389.</b></li>
<li>If you are still having problems, submit a query using the support panel on the right hand side.</li>
</ol>
</p>
</td>
</tr>
</table>
</div>
</form>
</div>
<form name="f" id="mo_ldap_local_tls_enable_form" method="post" action="" style="display:none">
<input type="hidden" name="option" value="mo_ldap_local_tls_enable">
<input type="checkbox" id="mo_ldap_local_tls_enable" name="mo_ldap_local_tls_enable" value="1"> <b>Enable TLS</b> (Check this only if your server use TLS Connection.)
</form>
<form name="f" id="enable_authorized_anonymous_bind" method="post" action="" style="display:none">
<input type="hidden" name="option" value="anonymous_bind" >
<input type="checkbox" id="anonymous_bind" name="anonymous_bind" value="1" >Enable to anonymously bind.
</form>
<script>
function enabletls(enabletls){
if(enabletls.checked)
jQuery("#mo_ldap_local_tls_enable").prop('checked', true);
else
jQuery("#mo_ldap_local_tls_enable").prop('checked', false);
jQuery("#mo_ldap_local_tls_enable_form").submit();
}
function enable(enable){
if(enable.checked)
document.getElementById('ping_button').style.display = 'block';
else
document.getElementById('ping_button').style.display = 'none';
}
</script>
<script>
window.onload = function() {
if(<?php
echo get_option("\x6d\157\137\x6c\x64\x61\x70\137\x6c\157\x63\x61\154\x5f\x61\156\157\x6e\x79\155\157\165\x73\x5f\x62\x69\156\x64");
?>
== '1') {
document.getElementById('ping_button').style.display = 'block';
} else {
document.getElementById('ping_button').style.display = 'none';
}
}
</script>
<div class="mo_ldap_small_layout">
<h3>LDAP User Mapping Configuration</h3>
<form id="mo_form1" name="f" method="post" action="">
<input id="mo_ldap_local_configuration_form_action" type="hidden" name="option" value="mo_ldap_local_save_user_mapping" />
<div id="panel1">
<table class="mo_ldap_settings_table">
<tr>
<td style="width: 24%"></td>
<td></td>
</tr>
<tr>
<td><b><font color="#FF0000">*</font>Search Base(s):</b></td>
<td><input class="mo_ldap_table_textbox <?php
echo $jY;
?>
" type="text" id="search_base" name="search_base" required placeholder="dc=domain,dc=com" value="<?php
echo $iK;
?>
" <?php
if (NddKoYsdasadJD()) {
goto qP;
}
echo "\144\151\x73\x61\142\x6c\145\x64";
qP:
?>
/></td>
</tr>
<tr>
<td> </td>
<td><i>This is the LDAP Tree under which we will search for the users for authentication. If we are not able to find a user in LDAP it means they are not present in this search base or any of its sub trees. They may be present in some other search base.<br> Provide the distinguished name of the Search Base object. <b>eg. cn=Users,dc=domain,dc=com</b>. If you have users in different locations in the directory(OU's), separate the distinguished names of the search base objects by a semi-colon(;). <b>eg. cn=Users,dc=domain,dc=com; ou=people,dc=domian,dc=com</b></i><br><br></td>
</tr>
<tr>
<td><b><font color="#FF0000"></font>Search Conditions:</b></td>
<td>
<label class="switch">
<input type="checkbox" id="search_filter_check" name="ldap_search_filters" value="1" <?php
checked(get_option("\155\x6f\x5f\154\x6f\143\141\154\x5f\146\x69\x6c\164\145\x72\x5f\x63\150\x65\143\153") == 1);
if (NddKoYsdasadJD()) {
goto OL;
}
echo "\x64\151\163\x61\142\154\x65\144";
OL:
?>
>
<div class="slider round"></div>
</label>
</td>
</tr>
<tr><td></td><td><b>Enable Custom Search Filter </b>(Enable this to add more search-filter conditions.)</td></tr>
<tr>
<td></td>
<td>
<div id="user_div"
style="<?php
if (!(get_option("\155\157\x5f\154\x6f\143\141\x6c\x5f\x66\151\154\164\145\x72\137\143\x68\145\143\x6b") == 1)) {
goto eM;
}
echo "\144\151\x73\160\x6c\141\171\72\40\x6e\x6f\156\145\73";
eM:
?>
">
<table>
<tr>
<td width="130px;">
<b><font color="#FF0000">*</font>Username Attribute:</b></td>
<td>
<input class="mo_ldap_table_textbox <?php
if (empty($u5)) {
goto wb;
}
echo $jY;
wb:
?>
"
type="text" name="username_attribute_text" size="40" id="username_attribute_id"
<?php
if (!(get_option("\155\157\137\154\157\143\x61\154\x5f\x66\x69\x6c\164\x65\162\137\143\150\x65\x63\153") == 0)) {
goto FQ;
}
echo "\162\145\161\165\x69\162\145\x64";
FQ:
?>
value="<?php
echo $u5;
?>
"
placeholder="Enter Username Attribute" <?php
if (NddKoYsdasadJD()) {
goto ln;
}
echo "\144\x69\163\141\142\x6c\145\144";
ln:
?>
>
</td>
</tr>
<tr>
<td colspan="2"><i>This field is important for two reasons. <br>1. While searching for
users, this is the attribute that is going to be matched to see if the
user exists. <br>2. If you want your users to login with their username
or firstname.lastname or email - you need to specify those options in
this field. e.g. <b> LDAP_ATTRIBUTE</b>. Replace <b><LDAP_ATTRIBUTE></b>
with the attribute where your username is stored. Some common attributes
are
<ol>
<table>
<tr>
<td style="width:50%">common name</td>
<td><b>cn</b></td>
</tr>
<tr>
<td>email</td>
<td><b>mail</b></td>
</tr>
<tr>
<td>logon name</td>
<td><b>sAMAccountName</b><br/><b>userPrincipalName</b></td>
</tr>
<tr>
<td>custom attribute where you store your WordPress
usernames use
</td>
<td><b>customAttribute</b></td>
</tr>
</table>
<br>
You can even allow logging in with multiple attributes, separated
with <b>' ; ' </b>. e.g. you can allow logging in with username or
email. e.g.<b> cn;mail</b>
</ol>
</tr>
<tr>
<td colspan="2"><b>Please make clear that the attributes that we are showing are examples and the actual ones could be different. These should be confirmed with the LDAP Admin.</b></td>
</tr>
</table>
</div>
</td>
</tr>
<tr><td></td>
<td>
<div id="ldap_search_filter_div"
style="<?php
if (!(get_option("\x6d\x6f\137\x6c\x6f\143\x61\154\137\146\151\154\164\145\x72\x5f\x63\x68\145\x63\x6b") == 0)) {
goto s0;
}
echo "\x64\151\163\160\x6c\x61\x79\72\40\156\x6f\156\145\73";
s0:
?>
">
<table>
<tr>
<td width="140px;">
<b>
<font color="#FF0000">*</font>Custom Search Filter:</b></td>
<td>
<input class="mo_ldap_table_textbox <?php
echo $jY;
?>
"
type="text" id="search_filter" name="search_filter"
placeholder="(&(objectClass=*)(cn=?))"
<?php
if (!(get_option("\155\x6f\137\154\x6f\x63\141\154\x5f\x66\151\x6c\164\x65\x72\x5f\x63\150\145\x63\x6b") == 1)) {
goto B4;
}
echo "\x72\145\161\x75\151\162\145\x64";
B4:
?>
value="<?php
echo $Io;
?>
"
pattern=".*\?.*"
title="Must contain Question Mark(?) for attributes you want to match e.g. (&(objectClass=*)(uid=?))" <?php
if (NddKoYsdasadJD()) {
goto gn;
}
echo "\x64\x69\x73\141\142\154\145\x64";
gn:
?>
/>
</td>
</tr>
<tr>
<td colspan="2"><i>This field is important for two reasons. <br>1. While searching for users, this is the attribute that is going to be matched to see if the user exists. <br>2. If you want your users to login with their username or firstname.lastname or email - you need to specify those options in this field. e.g. <b>(&(objectClass=*)(<LDAP_ATTRIBUTE>=?))</b>. Replace <b><LDAP_ATTRIBUTE></b> with the attribute where your username is stored. Some common attributes are
<ol>
<table>
<tr><td style="width:50%">common name</td><td>(&(objectClass=*)(<b>cn</b>=?))</td></tr>
<tr><td>email</td><td>(&(objectClass=*)(<b>mail</b>=?))</td></tr>
<tr><td>logon name</td><td>(&(objectClass=*)(<b>sAMAccountName</b>=?))<br/>(&(objectClass=*)(<b>userPrincipalName</b>=?))</td></tr>
<tr><td>custom attribute where you store your WordPress usernames use</td> <td>(&(objectClass=*)(<b>customAttribute</b>=?))</td></tr>
</table><br>
You can even allow logging in with multiple attributes e.g. you can allow logging in with username or email e.g. (&(objectClass=*)(<b>|</b>(<b>cn=?</b>)(<b>mail=?</b>)))
</ol>
</tr>
<tr><td colspan="2" >Please make clear that the attributes that we are showing are examples and the actual ones could be different. These should be confirmed with the LDAP Admin.</td>
</tr>
</td>
</tr>
</table>
</div>
</td>
</tr>
<script>
jQuery("#search_filter_check").click(function () {
if (jQuery(this).is(":checked")) {
jQuery("#ldap_search_filter_div").slideDown();
jQuery("#user_div").slideUp();
jQuery("#username_attribute_id").attr("required", false);
jQuery("#search_filter").attr("required",true);
}
else
{
jQuery("#ldap_search_filter_div").slideUp();
jQuery("#user_div").slideDown();
jQuery("#username_attribute_id").attr("required", true);
jQuery("#search_filter").attr("required",false);
}
});
</script>
<tr><td> </td></tr>
<tr>
<td> </td>
<td><input type="submit" class="button button-primary button-large" value="Save User Mapping" <?php
if (NddKoYsdasadJD()) {
goto fx;
}
echo "\144\x69\x73\141\142\154\145\x64";
fx:
?>
/> <input
type="button" id="conn_help_user_mapping" class="help button button-large trouble_button" value="Troubleshooting" <?php
if (NddKoYsdasadJD()) {
goto sv;
}
echo "\x64\151\x73\141\142\154\x65\144";
sv:
?>
/></td>
</tr>
<tr>
<td colspan="2" id="conn_user_mapping_troubleshoot" hidden>
<strong>Are you having trouble connecting to your LDAP server from this plugin?</strong>
<ol>
<li>The <b>search base</b> URL is typed incorrectly. Please verify if that search base is present.</li>
<li>User is not present in that search base. The user may be present in the directory but in some other tree and you may have entered a tree where this users is not present.</li>
<li><b>Search filter</b> is incorrect - User is present in the search base but the username is mapped to a different attribute in the search filter. E.g. you may be logging in with username and may have mapped it to the email attribute. So this wont work. Please make sure that the right attribute is mentioned in the search filter (with which you want the mapping to happen)</li>
<li>Please make sure that the user is present and test with the right user.</li>
<li>If you are still having problems, submit a query using the support panel on the right hand side.</li>
</ol>
</td>
</tr>
</table>
</div>
</form>
</div>
<div class="mo_ldap_small_layout">
<!-- Authenticate with LDAP configuration -->
<form name="f" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_test_auth" />
<h3>Test Authentication</h3>
<div id="test_conn_msg"></div>
<div id="panel1">
<table class="mo_ldap_settings_table">
<tr>
<td style="width: 24%"><b><font color="#FF0000">*</font>Username:</b></td>
<td><input class="mo_ldap_table_textbox <?php
if (!isset($_POST["\x74\x65\163\164\137\165\x73\145\162\x6e\141\155\145"])) {
goto Hp;
}
echo $jY;
Hp:
?>
" type="text" name="test_username" required placeholder="Enter username" value="<?php
if (!isset($_POST["\164\145\163\164\137\165\163\x65\162\156\141\x6d\145"])) {
goto bs;
}
echo $_POST["\164\145\x73\x74\x5f\x75\163\145\162\x6e\x61\x6d\145"];
bs:
?>
" <?php
if (NddKoYsdasadJD()) {
goto kf;
}
echo "\x64\x69\163\x61\142\154\x65\x64";
kf:
?>
/></td>
</tr>
<tr>
<td><b><font color="#FF0000">*</font>Password:</b></td>
<td><input class="mo_ldap_table_textbox <?php
if (!($jY == "\155\157\137\x6c\144\141\160\137\x69\156\x70\x75\164\137\163\165\143\x63\145\x73\163")) {
goto FD;
}
echo $dH;
FD:
?>
" type="password" name="test_password" required placeholder="Enter password" <?php
if (NddKoYsdasadJD()) {
goto ob;
}
echo "\x64\x69\x73\141\142\154\x65\144";
ob:
?>
/></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" class="button button-primary button-large" value="Test Authentication" <?php
if (NddKoYsdasadJD()) {
goto UH;
}
echo "\x64\151\163\141\142\x6c\145\144";
UH:
?>
/> <input
type="button" id="auth_help" class="help button button-large trouble_button" value="Troubleshooting" <?php
if (NddKoYsdasadJD()) {
goto PQ;
}
echo "\144\151\163\141\x62\154\145\x64";
PQ:
?>
/></td>
</tr>
<tr>
<td colspan="2" id="auth_troubleshoot" hidden>
<p>
<strong>User is not getting authenticated? Check the following:</strong>
<ol>
<li>The username-password you are entering is correct.</li>
<li>The user is not present in the search bases you have specified against <b>SearchBase(s)</b> above.</li>
<li>Your Search Filter may be incorrect and the username mapping may be to an LDAP attribute other than the ones provided in the Search Filter</li>
</ol>
</p>
</td>
</tr>
</table>
</div>
</form>
</div>
<script>
<?php
if (Mo_Ldap_Local_Util::is_customer_registered()) {
goto Hw;
}
?>
jQuery( document ).ready(function() {
jQuery("#configurationForm :input").prop("disabled", true);
jQuery("#configurationForm :input[type=text]").val("");
jQuery("#configurationForm :input[type=url]").val("");
});
<?php
Hw:
?>
</script>
<?php
}
function NddKoYsdasadJD()
{
$st = Mo_Ldap_Local_Util::decrypt(get_option("\164\x5f\163\151\164\x65\x5f\163\164\x61\x74\x75\163"));
$Zu = get_option("\155\157\x5f\154\144\x61\160\137\154\157\x63\141\154\x5f\154\151\x63\145\156\x73\x65\x5f\x6b\x65\171");
$n3 = get_option("\x6d\157\137\x6c\144\141\160\137\x6c\x6f\143\x61\154\137\x61\144\155\x69\x6e\137\x65\x6d\141\x69\x6c");
$oV = get_option("\x6d\157\137\154\x64\x61\x70\137\154\x6f\x63\141\154\137\141\144\155\151\156\137\x63\165\163\x74\x6f\x6d\x65\x72\137\153\x65\171");
if ($st != "\164\162\165\145" && !$Zu || !$n3 || !$oV || !is_numeric(trim($oV))) {
goto RC;
}
return 1;
goto D8;
RC:
return 0;
D8:
}
function signNode()
{
if (!file_exists(plugin_dir_path(__FILE__) . "\x72\x65\163\x6f\165\162\143\x65\x73\57\145\x6e\137\154\151\x2e\155\x6f")) {
goto M2;
}
return true;
M2:
return false;
}
function mo_ldap_local_troubleshooting()
{
?>
<div class="mo_ldap_table_layout">
<table class="mo_ldap_help">
<tbody><tr>
<td class="mo_ldap_help_cell">
<div id="help_curl_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">How to enable PHP cURL extension? (Pre-requisite)</div>
</div>
<div hidden="" id="help_curl_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li style="font-size: large; font-weight: bold">Step 1 </li>
<li style="font-size: large; font-weight: bold"><b>Loaded configuration file : <?php
echo php_ini_loaded_file();
?>
</b></li>
<li style="list-style-type:square;margin-left:20px">Open php.ini file from above file path</b></li><br/>
<li style="font-size: large; font-weight: bold">Step 2</li>
<li style="font-weight: bold"><font color="#C31111"><b>For Windows users</b></font></li>
<li style="list-style-type:square;margin-left:20px">Search for <b>"extension=php_curl.dll"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li>
<li><font color="#C31111"><b>For Linux users</b></font>
<ul style="list-style-type:square;margin-left: 20px">
<li style="margin-top: 5px">Install php curl extension (If not installed yet)
<ul style="list-style-type:disc;margin-left: 15px;margin-top: 5px">
<li>For Debian, the installation command would be <b>apt-get install php-curl</b></li>
<li>For RHEL based systems, the command would be <b>yum install php-curl</b></li></ul></li></li>
<li>Search for <b>"extension=php_curl.so"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li></ul><br/>
<li style="margin-top: 5px;font-size: large; font-weight: bold">Step 3</li>
<li style="list-style-type:square;margin-left:20px">Restart your server. After that refresh the "LDAP/AD" plugin configuration page.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_ldap_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">How to enable PHP LDAP extension? (Pre-requisite)</div>
</div>
<div hidden="" style="padding: 2px 2px 2px 12px" id="help_ldap_desc" class="mo_ldap_help_desc">
<ul>
<li style="font-size: large; font-weight: bold">Step 1 </li>
<li style="font-size: large; font-weight: bold"><b>Loaded configuration file : <?php
echo php_ini_loaded_file();
?>
</b></li>
<li style="list-style-type:square;margin-left:20px">Open php.ini file from above file path</b></li><br/>
<li style="font-size: large; font-weight: bold">Step 2</li>
<li style="font-weight: bold"><font color="#C31111"><b>For Windows users using Apache Server</b></font></li>
<li style="list-style-type:square;margin-left:20px">Search for <b>"extension=php_ldap.dll"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li>
<li style="font-weight: bold"><font color="#C31111"><b>For Windows users using IIS server</b></font></li>
<li style="list-style-type:square;margin-left:20px">Search for <b>"ExtensionList"</b> in the php.ini file. Uncomment the <b>"extension=php_ldap.dll"</b> line, if not present then add this line in the file and save the file.</li>
<li><font color="#C31111"><b>For Linux users</b></font>
<ul style="list-style-type:square;margin-left: 20px">
<li style="margin-top: 5px">Install php ldap extension (If not installed yet)
<ul style="list-style-type:disc;margin-left: 15px;margin-top: 5px">
<li>For Debian, the installation command would be <b>apt-get install php-ldap</b></li>
<li>For RHEL based systems, the command would be <b>yum install php-ldap</b></li></ul></li></li>
<li>Search for <b>"extension=php_ldap.so"</b> in php.ini file. Uncomment this line, if not present then add this line in the file and save the file.</li></ul><br/>
<li style="margin-top: 5px;font-size: large; font-weight: bold">Step 3</li>
<li style="list-style-type:square;margin-left:20px">Restart your server. After that refresh the "LDAP/AD" plugin configuration page.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="connect_using_ldaps" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">How to setup/connect LDAP Server using LDAPS (LDAP over SSL)?</div>
</div>
<div hidden="" id="connect_ldaps_server" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li><a href="https://www.miniorange.com/guide-to-setup-ldaps-on-windows-server" target="_blank">Click here</a> to go through the configuration steps to connect with LDAP server over LDAPS (LDAP over SSL:636).</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_ping_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">Why is Contact LDAP Server not working?</div>
</div>
<div hidden="" id="help_ping_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. Check your LDAP Server URL to see if it is correct.<br>
eg. ldap://myldapserver.domain:389 , ldap://89.38.192.1:389. When using SSL, the host may have to take the form ldaps://host:636.</li>
<li>2. Your LDAP Server may be behind a firewall. Check if the firewall is open to allow requests from your Wordpress installation.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_selinuxboolen_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">I can connect to LDAP server through the command line(using ping/telnet) but get an error when I test connection from the plugin.</div>
</div>
<div hidden="" id="help_selinuxboolen_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>This issue usually occurs for users whose wordpress is hosted on CentOS server. this error because SELinux Boolean httpd_can_network_connect is not set.<br></li>
<li>Follow these steps to resolve the issue:</li>
<li>1. Run command: setsebool -P httpd_can_network_connect on</li>
<li>2. Restart apache server.</li>
<li>3. Run command: getsebool a | grep httpd and make sure that httpd_can_network_connect is on</li>
<li>4. Try Ldap connect from the plugin again</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_invaliddn_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">Why is Test LDAP Configuration not working?</div>
</div>
<div hidden="" id="help_invaliddn_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. Check if you have entered valid Service Account DN(distinguished Name) of the LDAP server. <br>e.g. cn=username,cn=group,dc=domain,dc=com<br>
uid=username,ou=organisational unit,dc=domain,dc=com</li>
<li>2. Check if you have entered correct Password for the Service Account.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_invalidsf_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">Why is Test Authentication not working?</div>
</div>
<div hidden="" id="help_invalidsf_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. The username/password combination you provided may be incorrect.</li>
<li>2. You may have provided a <b>Search Base(s)</b> in which the user does not exist.</li>
<li>3. Your <b>Search Filter</b> may be incorrect and the username mapping may be to an LDAP attribute other than the ones provided in the Search Filter</li>
<li>4. You may have provided an incorrect <b>Distinguished Name attribute</b> for your LDAP Server.
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_seracccre_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">What are the LDAP Service Account Credentials?</div>
</div>
<div hidden="" id="help_seracccre_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. Service account is an non privileged user which is used to bind to the LDAP Server. It is the preferred method of binding to the LDAP Server if you have to perform search operations on the directory.</li>
<li>2. The distinguished name(DN) of the service account object and the password are provided as credentials.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_sbase_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">What is meant by Search Base in my LDAP environment?</div>
</div>
<div hidden="" id="help_sbase_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. Search Base denotes the location in the directory where the search for a particular directory object begins.</li>
<li>2. It is denoted as the distinguished name of the search base directory object. eg: CN=Users,DC=domain,DC=com.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_sfilter_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">What is meant by Search Filter in my LDAP environment?</div>
</div>
<div hidden="" id="help_sfilter_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. Search Filter is a basic LDAP Query for searching users based on mapping of username to a particular LDAP attribute.</li>
<li>2. The following are some commonly used Search Filters. You will need to use a search filter which uses the attributes specific to your LDAP environment. Confirm from your LDAP administrator.</li>
<ul>
<table>
<tr><td style="width:50%">common name</td><td>(&(objectClass=*)(<b>cn</b>=?))</td></tr>
<tr><td>email</td><td>(&(objectClass=*)(<b>mail</b>=?))</td></tr>
<tr><td>logon name</td><td>(&(objectClass=*)(<b>sAMAccountName</b>=?))<br/>(&(objectClass=*)(<b>userPrincipalName</b>=?))</td></tr>
<tr><td>custom attribute where you store your WordPress usernames use</td> <td>(&(objectClass=*)(<b>customAttribute</b>=?))</td></tr>
<tr><td>if you store Wordpress usernames in multiple attributes(eg: some users login using email and others using their username)</td><td>(&(objectClass=*)(<b>|</b>(<b>cn=?</b>)(<b>mail=?</b>)))</td></tr>
</table>
</ul>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_ou_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">How do users present in different Organizational Units(OU's) login into Wordpress?</div>
</div>
<div hidden="" id="help_ou_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. You can provide multiple search bases seperated by a semi-colon to ensure users present in different OU's are able to login into Wordpress.</li>
<li>2. You can also provide the RootDN value in the Search Base so that users in all subtrees of the RootDN are able to login.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_loginusing_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">Some of my users login using their email and the rest using their usernames. How will both of them be able to login?</div>
</div>
<div hidden="" id="help_loginusing_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. You need to provide a search filter which checks for the username against multiple LDAP attributes.</li>
<li>2. For example, if you have some users who login using their email and some using their username, the following search filter can be applied: (&(objectClass=*)(|(mail=?)(cn=?)))</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_diffdist_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">What are the different Distinguished Name attributes?</div>
</div>
<div hidden="" id="help_diffdist_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. The distinguished name attribute depends on the LDAP environment.</li>
<li>2. For example, Active Directory(AD) uses distinguishedName to store the Distinguished Name(DN) attribute</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_rolemap_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">How Role Mapping works?</div>
</div>
<div hidden="" id="help_rolemap_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>1. Assign groups to Users in your LDAP.</li>
<li>2. Configure User Role Mapping against LDAP Groups. If user belongs to multiple groups, mapping which have <b>Highest WordPress Role</b> will have higher priority.</li>
<li>3. For each user login mapping will be checked and user role will be updated if different.</li>
<li>4. If user does not belong to any group, user role will be updated with default mapping value.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
<tr>
<td class="mo_ldap_help_cell">
<div id="help_multiplegroup_title" class="mo_ldap_title_panel">
<div class="mo_ldap_help_title">How Role Mapping works if user belongs to multiple groups?</div>
</div>
<div hidden="" id="help_multiplegroup_desc" class="mo_ldap_help_desc" style="display: none;">
<ul>
<li>If user belongs to multiple groups, <b>Highest Role</b> will be assigned to the User from all matched Roles.</li>
</ul>
For any further queries, please contact us.
</div>
</td>
</tr>
</tbody></table>
</div>
<?php
}
function update_status()
{
$Pg = get_option("\155\x6f\x5f\x6c\x64\x61\x70\137\154\x6f\x63\x61\x6c\x5f\x6c\151\x63\145\x6e\163\145\137\x6b\145\171");
if (empty($Pg)) {
goto nm;
}
$Bl = new Mo_Ldap_Local_Customer();
$Bl->mo_ldap_local_update_status();
nm:
}
function mo_ldap_local_rolemapping()
{
?>
<div class="mo_ldap_small_layout" style="margin-top:0px;">
<?php
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto c3;
}
if (!NddKoYsdasadJD()) {
goto fO;
}
if (!mo_ldap_local_ntlsl()) {
goto bJ;
}
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">You are on Trial version of the plugin and it will expire on <span style="color:#0073aa"><?php
echo mo_ldap_local_xhsl();
?>
</span>. <?php
if (ch_xdigit()) {
goto fb;
}
?>
If you already purchased license <a href="#activatelicense">click here to activate</a> your license.<?php
goto Zt;
fb:
?>
Click <a href="<?php
echo add_query_arg(array("\164\x61\142" => "\141\143\143\x6f\x75\x6e\164"), $_SERVER["\x52\105\121\x55\105\123\124\x5f\x55\122\x49"]);
?>
">here</a> to activate your license.<?php
Zt:
?>
</div>
<?php
bJ:
goto k7;
fO:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">
<?php
if (signNode() && !ch_xdigit()) {
goto DO1;
}
?>
Please enter your<a href="<?php
echo add_query_arg(array("\164\141\x62" => "\x61\x63\143\x6f\165\x6e\164"), $_SERVER["\122\105\x51\125\105\x53\x54\137\x55\x52\x49"]);
?>
"> license key</a> to activate the plugin.<?php
goto Au;
DO1:
?>
<a href="<?php
echo add_query_arg(array("\x74\x61\142" => "\141\143\143\157\165\156\x74"), $_SERVER["\122\x45\x51\125\x45\123\x54\x5f\125\122\x49"]);
?>
">Click here</a> to activate your 5 days FREE Trial for the plugin.<?php
Au:
?>
</div>
<?php
k7:
goto e_;
c3:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Please <a href="<?php
echo add_query_arg(array("\164\x61\142" => "\141\x63\143\157\x75\x6e\164"), $_SERVER["\x52\105\121\125\105\123\124\x5f\125\x52\x49"]);
?>
">Register or Login with miniOrange</a> to configure the miniOrange LDAP Plugin.</div>
<?php
e_:
?>
<form name="f" id="enable_role_mapping_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_enable_role_mapping" />
<h3>LDAP Groups to WP User Role Mapping</h3>
<input type="checkbox" id="enable_ldap_role_mapping" name="enable_ldap_role_mapping" value="1" <?php
checked(get_option("\155\157\x5f\154\144\141\x70\137\x6c\x6f\143\141\154\x5f\145\156\x61\142\154\145\x5f\x72\x6f\154\145\137\155\141\x70\x70\x69\156\x67") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto gF;
}
echo "\x64\151\163\x61\x62\x6c\x65\144";
gF:
?>
/>Enable Role Mapping
<p>Enabling Role Mapping will automatically map Users from LDAP Groups to below selected WordPress Role. Role mapping will not be applicable for primary admin of wordpress.</p>
</form>
<form name="f" id="keep_existing_user_roles_form" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_keep_existing_user_roles"/>
<input type="checkbox" id="keep_existing_user_roles" name="keep_existing_user_roles" value="1" <?php
checked(get_option("\x6d\x6f\x5f\154\144\141\160\x5f\154\x6f\x63\x61\x6c\137\153\x65\145\160\137\145\170\151\163\x74\x69\x6e\147\x5f\165\x73\x65\162\137\x72\x6f\154\145\x73") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto sJ;
}
echo "\x64\x69\x73\141\x62\x6c\x65\144";
sJ:
?>
/>Do not remove existing roles of users (New Roles will be added)
</form>
<form id="role_mapping_form" name="f" method="post" action="">
<input id="mo_ldap_local_user_mapping_form" type="hidden" name="option" value="mo_ldap_local_save_mapping" />
<div id="panel1">
<table class="mo_ldap_mapping_table" id="ldap_role_mapping_table" style="width:90%">
<tr>
<td colspan=2><i> Default role will be assigned to all users for which mapping is not specified.</i></td>
</tr>
<tr>
<td><font style="font-size:13px;font-weight:bold;">Default Role </font><!-- input class="mo_ldap_table_textbox" type="text" readonly name="mapping_key_default"
required value="Default Role" /-->
</td>
<td>
<select name="mapping_value_default" style="width:100%" id="default_group_mapping" <?php
if (NddKoYsdasadJD()) {
goto Oz;
}
echo "\144\151\x73\141\x62\154\x65\x64";
Oz:
?>
>
<?php
if (get_option("\155\x6f\137\x6c\144\141\x70\137\154\x6f\143\x61\154\x5f\x6d\141\160\160\151\156\x67\137\166\x61\x6c\165\145\137\x64\145\146\x61\x75\x6c\164")) {
goto gJ;
}
$Px = get_option("\144\145\146\141\x75\x6c\164\x5f\162\157\x6c\x65");
goto vy;
gJ:
$Px = get_option("\x6d\157\x5f\154\x64\x61\160\x5f\154\x6f\x63\x61\154\x5f\x6d\141\x70\x70\151\x6e\147\137\166\x61\154\165\x65\x5f\144\145\x66\x61\165\154\x74");
vy:
wp_dropdown_roles($Px);
?>
</select>
<select style="display:none" id="wp_roles_list">
<?php
wp_dropdown_roles($Px);
?>
</select>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td style="width:50%"><b>LDAP Group Name</b></td>
<td style="width:50%"><b>WordPress Role</b></td>
</tr>
<?php
$Q8 = 0;
if (!is_numeric(get_option("\155\157\137\154\144\141\160\x5f\x6c\x6f\x63\x61\154\x5f\162\157\154\145\x5f\x6d\141\x70\160\x69\156\147\x5f\x63\157\165\x6e\x74"))) {
goto hS;
}
$Q8 = intval(get_option("\155\157\137\x6c\x64\141\160\137\154\x6f\x63\x61\x6c\x5f\162\157\154\x65\x5f\155\141\x70\x70\151\x6e\x67\137\x63\x6f\165\x6e\x74"));
hS:
$GG = 1;
Te:
if (!($GG <= $Q8)) {
goto ha;
}
?>
<tr>
<td><input class="mo_ldap_table_textbox" type="text" name="mapping_key_<?php
echo $GG;
?>
"
value="<?php
echo get_option("\155\x6f\x5f\x6c\x64\x61\x70\x5f\x6c\x6f\x63\x61\x6c\x5f\x6d\x61\160\160\151\156\147\x5f\x6b\145\x79\x5f" . $GG);
?>
" placeholder="cn=group,dc=domain,dc=com" <?php
if (NddKoYsdasadJD()) {
goto N7;
}
echo "\144\151\163\141\142\x6c\x65\144";
N7:
?>
/>
</td>
<td>
<select name="mapping_value_<?php
echo $GG;
?>
" id="role" style="width:100%" <?php
if (NddKoYsdasadJD()) {
goto hl;
}
echo "\x64\151\163\x61\142\x6c\145\x64";
hl:
?>
>
<?php
wp_dropdown_roles(get_option("\x6d\x6f\137\x6c\144\141\160\x5f\154\x6f\143\x61\x6c\x5f\x6d\x61\x70\160\x69\156\147\x5f\166\141\154\165\145\x5f" . $GG));
?>
</select>
</td>
</tr>
<?php
fF:
$GG++;
goto Te;
ha:
if (!($Q8 == 0)) {
goto EY;
}
?>
<tr>
<td><input class="mo_ldap_table_textbox" type="text" name="mapping_key_1"
value="" placeholder="cn=group,dc=domain,dc=com" <?php
if (NddKoYsdasadJD()) {
goto lH;
}
echo "\x64\x69\x73\141\x62\154\145\144";
lH:
?>
/>
</td>
<td>
<select name="mapping_value_1" id="role" style="width:100%" <?php
if (NddKoYsdasadJD()) {
goto Sq;
}
echo "\x64\x69\163\x61\x62\154\x65\144";
Sq:
?>
>
<?php
wp_dropdown_roles();
?>
</select>
</td>
</tr>
<?php
EY:
?>
</table>
<table class="mo_ldap_mapping_table" style="width:90%;">
<tr><td><a style="cursor:pointer" <?php
if (!NddKoYsdasadJD()) {
goto qC;
}
echo "\x69\x64\75\42\141\144\x64\x5f\155\x61\160\x70\151\156\x67\42";
qC:
?>
>Add More Mapping</a><br><br></td><td> </td></tr>
<tr>
<td colspan=2><i> Specify attribute which stores group names to which LDAP Users belong.</i></td>
</tr>
<tr>
<td style="width:50%"><font style="font-size:13px;font-weight:bold;">LDAP Group Attributes Name </font>
</td>
<td>
<?php
if (get_option("\x6d\157\137\x6c\x64\x61\160\x5f\154\x6f\143\141\x6c\137\x6d\141\160\x70\x69\x6e\x67\137\x6d\145\155\x62\145\x72\x6f\146\x5f\x61\x74\164\x72\x69\x62\165\x74\145")) {
goto tX;
}
update_option("\x6d\157\x5f\x6c\x64\141\160\137\x6c\x6f\143\x61\154\137\155\141\x70\x70\x69\156\147\137\x6d\x65\x6d\x62\x65\x72\157\x66\137\x61\x74\164\162\151\x62\165\x74\145", "\155\145\155\x62\x65\x72\117\146");
tX:
$dI = get_option("\x6d\157\x5f\154\144\141\x70\137\154\157\x63\141\154\137\x6d\141\x70\x70\x69\x6e\147\137\155\x65\x6d\142\145\x72\157\x66\x5f\x61\x74\x74\162\151\x62\165\164\x65");
?>
<input type="text" name="mapping_memberof_attribute" required="true" placeholder="Group Attributes Name" style="width:100%;" value="<?php
echo $dI;
?>
" <?php
if (NddKoYsdasadJD()) {
goto VM;
}
echo "\144\x69\163\x61\142\154\145\144";
VM:
?>
>
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td><input type="submit" class="button button-primary button-large" value="Save Mapping" <?php
if (NddKoYsdasadJD()) {
goto l9;
}
echo "\144\x69\x73\141\142\x6c\145\x64";
l9:
?>
/></td>
<td> </td>
</tr>
</table>
</div>
</form>
<form method="post" id="rolemappingtest">
<br>
<h3>Test Role Mapping Configuration</h3>Enter LDAP username to test role mapping configuration
<table id="attributes_table" class="mo_ldap_settings_table">
<tbody><tr></tr>
<tr></tr>
<tr>
<td>Username</td>
<td><input type="text" id="mo_ldap_username" name="mo_ldap_username" required="" placeholder="Enter Username" style="width:61%;" <?php
if (NddKoYsdasadJD()) {
goto Tv;
}
echo "\x64\151\x73\141\142\x6c\x65\144";
Tv:
?>
>
</td></tr>
<tr>
<!--<td><input type="submit" value="Test Configuration" class="button button-primary button-large" /></td>-->
<td><input type="submit" value="Test Configuration" class="button button-primary button-large" <?php
if (NddKoYsdasadJD()) {
goto DQ;
}
echo "\144\151\163\x61\x62\154\x65\144";
DQ:
?>
></td>
</tr>
</tbody></table>
</form><br><br>
<?php
do_action("\155\x6f\137\x6c\144\141\x70\x5f\x62\x75\144\144\171\160\x72\145\163\x73\137\x67\162\157\x75\160\137\x66\x72\157\x6e\164");
?>
</div>
<script>
jQuery( document ).ready(function() {
jQuery("#default_group_mapping option[value='administrator']").remove();
});
jQuery('#enable_ldap_role_mapping').change(function() {
jQuery('#enable_role_mapping_form').submit();
});
jQuery("#keep_existing_user_roles").change(function(){
jQuery("#keep_existing_user_roles_form").submit();
});
jQuery('#add_mapping').click(function() {
var last_index_name = jQuery('#ldap_role_mapping_table tr:last .mo_ldap_table_textbox').attr('name');
var splittedArray = last_index_name.split("_");
var last_index = parseInt(splittedArray[splittedArray.length-1])+1;
var dropdown = jQuery("#wp_roles_list").html();
var new_row = '<tr><td><input class="mo_ldap_table_textbox" type="text" placeholder="cn=group,dc=domain,dc=com" name="mapping_key_'+last_index+'" value="" /></td><td><select name="mapping_value_'+last_index+'" style="width:100%" id="role">'+dropdown+'</select></td></tr>';
jQuery('#ldap_role_mapping_table tr:last').after(new_row);
});
jQuery("#rolemappingtest").submit(function(event ) {
event.preventDefault();
testRoleMappingConfiguration();
});
function testRoleMappingConfiguration(){
var username = jQuery("#mo_ldap_username").val();
var myWindow = window.open('<?php
echo site_url();
?>
' + '/?option=testrolemappingconfig&user='+username, "Test Role Mapping Configuration", "width=600, height=600");
}
</script>
<script>
<?php
if (Mo_Ldap_Local_Util::is_customer_registered()) {
goto Fs;
}
?>
jQuery( document ).ready(function() {
jQuery("#enable_role_mapping_form :input").prop("disabled", true);
jQuery("#enable_role_mapping_form :input[type=text]").val("");
jQuery("#enable_role_mapping_form :input[type=url]").val("");
jQuery("#keep_existing_user_roles_form").prop("disabled",true);
jQuery("#keep_existing_user_roles_form :input[type=text]").val("");
jQuery("#keep_existing_user_roles_form :input[type=url]").val("");
jQuery("#role_mapping_form :input").prop("disabled", true);
jQuery("#role_mapping_form :input[type=text]").val("");
jQuery("#role_mapping_form :input[type=url]").val("");
jQuery("#add_mapping").css("display","none");
});
<?php
Fs:
?>
</script>
<?php
}
function sanitizeElement()
{
$KL = file_get_contents(plugins_url("\162\145\x73\157\165\x72\x63\x65\163\x2f\145\156\x5f\154\151\56\x6d\x6f", __FILE__));
$vi = get_option("\155\x6f\x5f\154\x64\141\x70\x5f\x6c\x6f\x63\x61\154\x5f\143\x75\163\164\x6f\x6d\145\x72\x5f\164\x6f\x6b\145\x6e");
$KL = Mo_Ldap_Local_Util::decrypt($KL);
if (!empty($KL)) {
goto Uz;
}
return '';
Uz:
$Fl = get_option("\x6d\157\137\154\144\141\x70\137\x6c\x6f\143\141\154\137\x61\144\155\x69\x6e\137\141\160\151\137\153\x65\x79");
$KL = Mo_Ldap_Local_Util::decrypt($KL);
$Dd = simplexml_load_string($KL);
return strval($Dd->expirationTime);
}
function mo_ldap_local_default_config_page()
{
$Gv = get_option("\155\157\137\x6c\144\141\x70\x5f\x6c\x6f\x63\141\154\x5f\x64\145\146\x61\165\x6c\164\137\143\157\x6e\x66\x69\x67");
?>
<div class="mo_ldap_table_layout">
<!-- Test connection for default configuration -->
<form name="f" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_test_default_config" />
<h3>Example Configuration</h3>
<p><b><font color="#FF0000">NOTE : The values given below are mock values. So if you try copying them to the LDAP configuration tab, IT WILL NOT WORK.</font></b> You need to provide actual LDAP configuration in the LDAP configuration tab. If you need any help, please contact us at [email protected]</p>
<div id="panel1">
<table class="mo_ldap_settings_table">
<tr>
<td><b>LDAP Server:</b></td>
<td style="width:65%"><input class="mo_ldap_table_textbox fixed" type="url" value="<?php
echo $Gv["\163\145\x72\166\x65\162\x5f\165\162\x6c"];
?>
" readonly/></td>
</tr>
<tr>
<td><b>Service Account DN:</b></td>
<td><input class="mo_ldap_table_textbox fixed" type="text" name="dn" value="<?php
echo $Gv["\x73\145\x72\166\151\x63\x65\x5f\x61\143\143\157\165\x6e\x74\137\x64\x6e"];
?>
" readonly/></td>
</tr>
<tr>
<td><b>Admin Password:</b></td>
<td><input class="mo_ldap_table_textbox fixed" type="password" value="<?php
echo $Gv["\x61\144\155\151\x6e\x5f\160\141\163\x73\167\157\162\144"];
?>
" readonly/></td>
</tr>
<tr>
<td><b>Search Base:</b></td>
<td><input class="mo_ldap_table_textbox fixed" type="text" value="<?php
echo $Gv["\x73\x65\141\x72\143\x68\x5f\x62\141\163\145"];
?>
" readonly/></td>
</tr>
<tr>
<td><b>LDAP Search Filter:</b></td>
<td><input class="mo_ldap_table_textbox fixed" type="text" value="<?php
echo $Gv["\x73\145\141\162\x63\150\137\x66\x69\x6c\x74\145\x72"];
?>
" readonly/></td>
</tr>
</table>
</div>
</form>
<br><br>
</div>
<?php
}
function mo_show_export_page()
{
?>
<div class="mo_ldap_support_layout">
<?php
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto qT;
}
if (!NddKoYsdasadJD()) {
goto cI;
}
if (!mo_ldap_local_ntlsl()) {
goto dV;
}
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">You are on Trial version of the plugin and it will expire on <span style="color:#0073aa"><?php
echo mo_ldap_local_xhsl();
?>
</span>. <?php
if (ch_xdigit()) {
goto k1;
}
?>
If you already purchased license <a href="#activatelicense">click here to activate</a> your license.<?php
goto Hu;
k1:
?>
Click <a href="<?php
echo add_query_arg(array("\x74\x61\x62" => "\x61\143\x63\157\165\156\164"), $_SERVER["\x52\105\x51\x55\x45\123\124\137\x55\x52\111"]);
?>
">here</a> to activate your license.<?php
Hu:
?>
</div>
<?php
dV:
goto NU;
cI:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">
<?php
if (signNode() && !ch_xdigit()) {
goto Be;
}
?>
Please enter your<a href="<?php
echo add_query_arg(array("\164\x61\142" => "\x61\x63\x63\x6f\165\x6e\164"), $_SERVER["\122\x45\x51\x55\x45\123\124\x5f\125\122\x49"]);
?>
"> license key</a> to activate the plugin.<?php
goto BH;
Be:
?>
<a href="<?php
echo add_query_arg(array("\164\x61\x62" => "\x61\x63\143\157\x75\x6e\x74"), $_SERVER["\122\x45\x51\125\x45\x53\x54\137\x55\122\111"]);
?>
">Click here</a> to activate your 5 days FREE Trial for the plugin.<?php
BH:
?>
</div>
<?php
NU:
goto dZ;
qT:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Please <a href="<?php
echo add_query_arg(array("\164\141\142" => "\141\143\x63\157\x75\x6e\x74"), $_SERVER["\x52\x45\121\x55\x45\123\124\137\125\122\x49"]);
?>
">Register or Login with miniOrange</a> to configure the miniOrange LDAP Plugin.</div>
<?php
dZ:
?>
<div id="mo_export" style="background: white;position: relative;border-radius: 10px;">
<form method="post" action="" name="mo_export_pass">
<input type="hidden" name="option" value="mo_ldap_pass" />
<input type="hidden" name="mo_ldap_pass_nonce"
value="<?php
echo wp_create_nonce("\x6d\x6f\137\x6c\x64\141\x70\137\x70\141\163\x73\x5f\156\x6f\x6e\143\145");
?>
"/>
<table>
<tr><td><h3>Export Configurations</h3></td></tr>
<tr>
<td><p>This tab will help you to transfer your plugin configurations when you change your Wordpress instance.</p></td></tr>
<tr><td><input type="checkbox" id="enable_ldap_login" name="enable_ldap_login" value="1" onchange="this.form.submit()" <?php
checked(esc_attr(get_option("\x6d\x6f\137\154\x64\x61\160\137\145\170\x70\157\162\164")) == 1);
if (NddKoYsdasadJD()) {
goto JU;
}
echo "\144\x69\163\x61\x62\x6c\145\144";
JU:
?>
/>Export Service Account password. (This will lead to your service account password to be exported in encrypted fashion in a file)</td>
</tr><tr><td>(Enable this only when server password is needed)</td>
<td></td>
</tr>
</table>
</form></div>
<form method="post" action="" name="mo_export">
<input type="hidden" name="option" value="mo_ldap_export"/>
<input type="hidden" name="mo_ldap_export_nonce"
value="<?php
echo wp_create_nonce("\155\157\x5f\x6c\x64\141\x70\137\145\170\160\157\x72\x74\137\x6e\x6f\x6e\x63\x65");
?>
"/>
<br><table><tr><td>
<input type="button" class="button button-primary button-large" onclick="document.forms['mo_export'].submit()"; value= "Export configuration"<?php
if (NddKoYsdasadJD()) {
goto oW;
}
echo "\x64\x69\x73\x61\142\x6c\145\144";
oW:
?>
/>
</td></tr></table>
</form>
<div id="mo_import" style="background: white;position: relative;border-radius: 10px;">
<form method="post" action="" name="mo_import" enctype="multipart/form-data">
<input type="hidden" name="option" value="mo_ldap_import" />
<input type="hidden" name="mo_ldap_export_nonce"
value="<?php
echo wp_create_nonce("\x6d\157\x5f\154\x64\141\x70\x5f\x65\x78\160\157\162\x74\x5f\x6e\157\x6e\x63\145");
?>
"/>
<table>
<tr><td><h3>Import Configurations</h3></td></tr><br><br>
<tr>
<td><p>This tab will help you to transfer your plugin configurations from your older Wordpress instance.</p></td>
</tr>
<tr>
<td><input type="file" name="mo_ldap_import_file" id="mo_ldap_import_file" required <?php
if (NddKoYsdasadJD()) {
goto zQ;
}
echo "\144\151\163\x61\142\154\145\144";
zQ:
?>
></td>
</tr>
<tr><td><br><td></tr>
<tr>
<td><input type="submit" class="button button-primary button-large" value="Import Configuration" name="import_file" <?php
if (NddKoYsdasadJD()) {
goto P1;
}
echo "\144\x69\x73\x61\x62\154\x65\x64";
P1:
?>
></td>
</tr>
<tr><td></br></td></tr>
</table>
</form></div>
</div>
</div>
<?php
}
function mo_ldap_local_show_otp_verification()
{
?>
<div class="mo_ldap_table_layout">
<div id="ldap_intranet_otp_verification_div">
<table class="mo_ldap_settings_table">
<!-- Enter otp -->
<form name="f" method="post" id="ldap_form" action="">
<input type="hidden" name="option" value="mo_ldap_local_validate_otp" />
<h3>Verify Your Email</h3>
<tr>
<td><b><font color="#FF0000">*</font>Enter OTP:</b></td>
<td colspan="2"><input class="mo_ldap_table_textbox" autofocus="true" type="text" name="otp_token" required placeholder="Enter OTP" style="width:61%;" pattern="{6,8}"/>
<a style="cursor:pointer;" onclick="document.getElementById('resend_otp_form').submit();">Resend OTP over Email</a></td>
</tr>
<tr><td colspan="3"></td></tr>
<tr><td></td><td>
<input type="button" value="Back" id="back_btn" class="button button-primary button-large" />
<input type="submit" value="Validate OTP" class="button button-primary button-large" />
</td>
</form>
<td><form method="post" action="" id="mo_ldap_cancel_form">
<input type="hidden" name="option" value="mo_ldap_local_cancel" />
</form></td></tr>
<form name="f" id="resend_otp_form" method="post" action="">
<td>
<input type="hidden" name="option" value="mo_ldap_local_resend_otp"/>
</td>
</tr>
</form>
</table>
<br>
<hr>
<h3>I did not recieve any email with OTP . What should I do ?</h3>
<form id="phone_verification" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_phone_verification" />
If you can't see the email from miniOrange in your mails, please check your <b>SPAM Folder</b>. If you don't see an email even in SPAM folder, verify your identity with our alternate method.
<br><br>
<b>Enter your valid phone number here and verify your identity using one time passcode sent to your phone.</b><br><br><input class="mo_ldap_table_textbox" required="true" pattern="[\+]\d{1,3}\d{10}" autofocus="true" type="text" name="phone_number" id="phone" placeholder="Enter Phone Number" style="width:40%;" value="<?php
echo get_option("\x6d\157\x5f\154\x64\x61\x70\x5f\154\x6f\143\x61\x6c\137\141\144\x6d\x69\156\x5f\x70\x68\x6f\156\x65");
?>
" title="Enter phone number without any space or dashes."/>
<br><input type="submit" value="Send OTP" class="button button-primary button-large" />
</form>
</div>
</div>
<script>
jQuery("#phone").intlTelInput();
jQuery('#back_btn').click(function(){
jQuery('#mo_ldap_cancel_form').submit();
});
</script>
<?php
}
function mo_ldap_show_attribute_mapping_page()
{
?>
<div class="mo_ldap_table_layout">
<?php
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto YQ;
}
if (!NddKoYsdasadJD()) {
goto g3;
}
if (!mo_ldap_local_ntlsl()) {
goto p0;
}
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">You are on Trial version of the plugin and it will expire on <span style="color:#0073aa"><?php
echo mo_ldap_local_xhsl();
?>
</span>. <?php
if (ch_xdigit()) {
goto xX;
}
?>
If you already purchased license <a href="#activatelicense">click here to activate</a> your license.<?php
goto oe;
xX:
?>
Click <a href="<?php
echo add_query_arg(array("\x74\x61\142" => "\x61\x63\143\157\165\156\x74"), $_SERVER["\122\105\121\x55\105\x53\x54\x5f\x55\x52\x49"]);
?>
">here</a> to activate your license.<?php
oe:
?>
</div>
<?php
p0:
goto kV;
g3:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">
<?php
if (signNode() && !ch_xdigit()) {
goto MJ;
}
?>
Please enter your<a href="<?php
echo add_query_arg(array("\x74\x61\142" => "\x61\x63\x63\157\165\156\164"), $_SERVER["\122\x45\121\x55\x45\x53\x54\137\x55\122\111"]);
?>
"> license key</a> to activate the plugin.<?php
goto li;
MJ:
?>
<a href="<?php
echo add_query_arg(array("\164\x61\x62" => "\141\143\143\157\x75\156\x74"), $_SERVER["\122\105\x51\125\x45\123\x54\137\x55\122\x49"]);
?>
">Click here</a> to activate your 5 days FREE Trial for the plugin.<?php
li:
?>
</div>
<?php
kV:
goto M3;
YQ:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Please <a href="<?php
echo add_query_arg(array("\164\141\x62" => "\141\x63\x63\157\x75\x6e\x74"), $_SERVER["\x52\105\x51\125\105\123\124\137\125\122\x49"]);
?>
">Register or Login with miniOrange</a> to configure the miniOrange LDAP Plugin.</div>
<?php
M3:
?>
<div id="ldap_intranet_attribute_mapping_div">
<form name="f" method="post" id="attribute_config_form">
<table id="attributes_table" class="mo_ldap_settings_table">
<input type="hidden" name="option" value="mo_ldap_save_attribute_config" />
<h3>Attribute Configuration</h3>
<tr>
<td style="width:70%;"><input type="checkbox" id="mo_ldap_local_enable_attr_mapping" name="mo_ldap_local_enable_attr_mapping" value="1" <?php
checked(get_option("\155\157\x5f\154\144\141\x70\x5f\x6c\x6f\143\141\x6c\137\x65\x6e\x61\142\154\x65\x5f\x61\164\x74\162\x5f\x6d\x61\x70\160\x69\x6e\x67") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto jh;
}
echo "\144\x69\163\x61\142\154\x65\x64";
jh:
?>
/>Enable Attribute Mapping</td>
</tr>
<?php
if (!get_option("\x6d\157\x5f\x6c\x64\141\160\137\x6c\157\x63\x61\x6c\137\145\x6e\141\142\154\145\137\141\164\164\162\137\155\141\x70\160\x69\x6e\x67")) {
goto Nn;
}
?>
<tr>
<td><br><input type="checkbox" id="enable_update_ldap" name="enable_update_ldap" value="1" <?php
checked(get_option("\155\157\137\x6c\144\x61\160\137\x6c\x6f\x63\141\x6c\137\x65\156\141\142\154\145\x5f\165\160\x64\x61\x74\145\137\x6c\144\141\160") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto tT;
}
echo "\x64\151\x73\x61\x62\x6c\145\144";
tT:
?>
/>Enable updating information in LDAP when user edits profile</td>
</tr>
<?php
Nn:
?>
<tr>
<td colspan="2"><br>Enter the LDAP attribute names for Email, Phone, First Name and Last Name attributes</td>
</tr>
<tr>
<td style="width:40%;"><b><font color="#FF0000">*</font>Email Attribute</b></td>
<td><input type="text" name="mo_ldap_email_attribute" required placeholder="Enter Email attribute" style="width:80%;"
value="<?php
echo get_option("\155\x6f\137\154\144\x61\160\137\154\157\143\x61\x6c\137\145\155\x61\151\x6c\x5f\141\x74\164\162\151\142\165\x74\x65");
?>
" <?php
if (NddKoYsdasadJD()) {
goto J6;
}
echo "\144\151\x73\141\x62\154\145\x64";
J6:
?>
/></td>
</tr>
<tr>
<td style="width:40%;"><b><font color="#FF0000">*</font>Phone Attribute</b></td>
<td><input type="text" name="mo_ldap_phone_attribute" required placeholder="Enter Phone attribute" style="width:80%;"
value="<?php
echo get_option("\155\x6f\137\x6c\x64\x61\x70\137\x6c\x6f\x63\x61\x6c\137\x70\150\x6f\x6e\x65\137\x61\164\164\x72\x69\x62\x75\164\x65");
?>
" <?php
if (NddKoYsdasadJD()) {
goto GB;
}
echo "\x64\151\163\x61\x62\154\145\144";
GB:
?>
/></td>
</tr>
<tr>
<td style="width:40%;"><b><font color="#FF0000">*</font>First Name Attribute</b></td>
<td><input type="text" name="mo_ldap_fname_attribute" required placeholder="Enter First Name attribute" style="width:80%;"
value="<?php
echo get_option("\x6d\157\x5f\x6c\144\141\160\x5f\154\x6f\x63\x61\154\137\146\156\x61\x6d\x65\137\141\164\x74\162\151\x62\x75\164\145");
?>
" <?php
if (NddKoYsdasadJD()) {
goto jB;
}
echo "\x64\151\163\141\142\x6c\x65\144";
jB:
?>
/></td>
</tr>
<tr>
<td style="width:40%;"><b><font color="#FF0000">*</font>Last Name Attribute</b></td>
<td><input type="text" name="mo_ldap_lname_attribute" required placeholder="Enter Last Name attribute" style="width:80%;"
value="<?php
echo get_option("\155\157\x5f\154\144\141\x70\x5f\x6c\x6f\143\141\154\x5f\154\156\141\155\x65\137\x61\x74\x74\x72\x69\x62\165\164\x65");
?>
" <?php
if (NddKoYsdasadJD()) {
goto RP;
}
echo "\144\x69\x73\141\x62\154\145\x64";
RP:
?>
/></td>
</tr>
<tr>
<td style="width:40%;"><b><font color="#FF0000">*</font>Nickname Attribute</b></td>
<td><input type="text" name="mo_ldap_nickname_attribute" required placeholder="Enter NickName attribute" style="width:80%;"
value="<?php
echo get_option("\x6d\x6f\x5f\154\x64\x61\160\x5f\x6c\157\x63\141\x6c\x5f\156\x69\143\153\x6e\x61\x6d\145\137\141\x74\164\162\x69\142\165\x74\145");
?>
" <?php
if (NddKoYsdasadJD()) {
goto xo;
}
echo "\144\x69\163\x61\x62\x6c\145\144";
xo:
?>
/></td>
</tr>
<tr>
<td style="width:40%;"><b><font color="#FF0000">*</font>Display Name</b></td>
<td>
<select name="mo_ldap_display_name_attribute" <?php
if (NddKoYsdasadJD()) {
goto KE;
}
echo "\x64\151\x73\x61\x62\x6c\145\x64";
KE:
?>
>
<option value="nickname" <?php
if (!(get_option("\155\x6f\x5f\154\x64\141\x70\137\154\157\x63\x61\154\137\144\151\163\x70\x6c\x61\171\137\156\141\155\x65\137\x61\x74\x74\x72\151\x62\165\164\145") == "\x6e\151\x63\153\x6e\x61\x6d\145")) {
goto QX;
}
echo "\163\x65\154\x65\x63\x74\145\144\x3d\x22\x73\x65\x6c\145\x63\x74\145\144\x22";
QX:
?>
>NickName</option>
<option value="email" <?php
if (!(get_option("\155\x6f\x5f\x6c\144\141\x70\137\x6c\x6f\143\x61\154\x5f\x64\151\163\160\154\x61\x79\x5f\x6e\141\155\x65\137\x61\x74\x74\162\x69\x62\165\x74\x65") == "\145\155\141\x69\154")) {
goto HJ;
}
echo "\x73\145\154\145\x63\164\x65\x64\x3d\42\x73\145\x6c\145\143\164\x65\144\42";
HJ:
?>
>Email</option>
<option value="firstname" <?php
if (!(get_option("\155\x6f\137\154\144\141\x70\137\154\157\x63\141\x6c\x5f\144\x69\163\x70\154\x61\171\x5f\156\x61\x6d\x65\137\141\164\x74\162\151\x62\165\x74\x65") == "\x66\x69\x72\163\164\156\141\155\145")) {
goto y3;
}
echo "\163\145\154\145\143\164\145\144\x3d\x22\163\x65\x6c\145\143\164\x65\144\42";
y3:
?>
>First Name</option>
<option value="firstlast" <?php
if (!(get_option("\x6d\157\137\x6c\x64\x61\x70\137\154\157\x63\141\154\x5f\x64\x69\163\160\154\x61\x79\137\156\141\155\x65\137\x61\164\164\162\151\142\x75\164\x65") == "\146\x69\x72\163\x74\x6c\141\x73\164")) {
goto tM;
}
echo "\163\x65\x6c\x65\143\164\x65\144\x3d\42\x73\x65\x6c\145\143\x74\x65\144\42";
tM:
?>
>First Name + Last Name</option>
<option value="lastfirst" <?php
if (!(get_option("\155\157\137\154\x64\x61\x70\137\x6c\x6f\143\x61\x6c\x5f\144\151\163\x70\x6c\141\x79\137\156\x61\x6d\145\137\141\164\x74\x72\151\142\165\164\145") == "\154\141\x73\164\146\151\x72\163\164")) {
goto lo;
}
echo "\x73\x65\x6c\x65\143\x74\x65\x64\75\x22\x73\x65\154\x65\x63\x74\145\x64\x22";
lo:
?>
>Last Name + First Name</option>
</select>
</td>
</tr>
<?php
$Mh = array();
$G2 = wp_load_alloptions();
foreach ($G2 as $Zh => $Kq) {
if (strpos($Zh, "\155\157\137\154\144\141\160\x5f\154\157\143\x61\x6c\x5f\x63\165\163\x74\157\155\137\x61\164\164\162\151\142\165\x74\145\x5f") === false) {
goto OT;
}
?>
<tr>
<td><b><font color="#FF0000"></font><?php
echo $Kq;
?>
Attribute</b></td>
<td><b><?php
echo get_option($Zh);
?>
</b></td>
<td><a style="cursor:pointer;" <?php
if (!NddKoYsdasadJD()) {
goto LO;
}
echo "\x6f\156\x63\154\151\143\x6b\75\144\x65\154\x65\164\x65\x41\x74\164\x72\x69\x62\x75\164\145\50\47" . $Kq . "\47\x29";
LO:
?>
>Delete</a></td>
</tr><?php
goto D4;
OT:
D4:
CX:
}
qW:
?>
<tr><td><h3>Add Custom Attributes</h3></td></tr>
<tr>
<td>Enter extra LDAP attributes which you wish to be included in the user profile</td>
</tr>
<tr>
<td><input type="text" name="mo_ldap_local_custom_attribute_1_name" placeholder="Custom Attribute Name" style="width:61%;" <?php
if (NddKoYsdasadJD()) {
goto X_;
}
echo "\144\151\163\x61\142\x6c\x65\x64";
X_:
?>
/></td>
<td><input type="button" name="add_attribute" value="+" onclick="add_custom_attribute();" class="button button-primary" <?php
if (NddKoYsdasadJD()) {
goto U3;
}
echo "\144\x69\163\141\142\x6c\x65\144";
U3:
?>
/>
<input type="button" name="remove_attribute" value="-" onclick="remove_custom_attribute();" class="button button-primary" <?php
if (NddKoYsdasadJD()) {
goto TL;
}
echo "\144\x69\163\141\x62\154\x65\x64";
TL:
?>
/></td>
</tr>
<tr id="mo_ldap_custom_attribute"><td></td></tr>
<?php
?>
<?php
do_action("\x6d\157\137\x6c\x64\x61\x70\x5f\x61\x74\164\162\x69\142\x75\164\145\x5f\x6d\141\160\160\x69\x6e\147\x5f\145\x6e\144");
?>
<tr id="save_config_element">
<td>
<input type="submit" value="Save Configuration" class="button button-primary button-large" <?php
if (NddKoYsdasadJD()) {
goto Pb;
}
echo "\x64\151\x73\x61\x62\154\145\x64";
Pb:
?>
/>
<a id="back_button" class="button button-primary button-large" <?php
if (!NddKoYsdasadJD()) {
goto s8;
}
echo "\x68\162\x65\146\x3d\x27\47";
goto xW;
s8:
echo "\144\x69\163\141\142\x6c\145\144";
xW:
?>
>Cancel</a>
</td>
</tr>
</table>
</form>
</div>
<form id="delete_custom_attribute_form" method="post">
<input type="hidden" name="option" value="mo_ldap_delete_custom_attribute" />
<input type="hidden" id="custom_attribute_name" name="custom_attribute_name" value="" />
</form>
<form method="post" id="attribiteconfigtest">
<input type="hidden" name="option" value="mo_ldap_test_attribute_configuration" />
<table id="attributes_table" class="mo_ldap_settings_table">
<tr><h3>Test Attribute Configuration</h3></tr>
<tr>Enter LDAP username to test attribute configuration</tr>
<tr>
<td>Username</td>
<td><input type="text" id="mo_ldap_username" name="mo_ldap_username" required placeholder="Enter Username" style="width:61%;" <?php
if (NddKoYsdasadJD()) {
goto pH;
}
echo "\x64\x69\163\141\142\x6c\145\x64";
pH:
?>
/>
</tr>
<tr>
<!--<td><input type="submit" value="Test Configuration" class="button button-primary button-large" /></td>-->
<td><input type="submit" value="Test Configuration" class="button button-primary button-large" <?php
if (NddKoYsdasadJD()) {
goto XL;
}
echo "\144\151\163\x61\142\x6c\145\144";
XL:
?>
/></td>
</tr>
</table>
</form>
<script>
var countAttributes;
function add_custom_attribute(){
countAttributes += 1;
jQuery("<tr id='row_" + countAttributes + "'><td><input type='text' id='mo_ldap_local_custom_attribute_" + countAttributes + "_name' name='mo_ldap_local_custom_attribute_" + countAttributes + "_name' placeholder='Custom Attribute Name' style='width:61%;' /></td></tr>").insertBefore(jQuery("#mo_ldap_custom_attribute"));
}
function remove_custom_attribute(){
jQuery("#row_" + countAttributes).remove();
countAttributes -= 1;
if(countAttributes == 0)
countAttributes = 1;
}
jQuery("#attribiteconfigtest").submit(function(event ) {
event.preventDefault();
testConfiguration();
});
function testConfiguration(){
var username = jQuery("#mo_ldap_username").val();
var myWindow = window.open('<?php
echo site_url();
?>
' + '/?option=testattrconfig&user='+username, "Test Attribute Configuration", "width=700, height=600");
}
function deleteAttribute(attributeName){
jQuery("#custom_attribute_name").val(attributeName);
jQuery("#delete_custom_attribute_form").submit();
}
jQuery(document).ready(function(){
countAttributes = 1;
});
</script>
</div>
<?php
}
function mo_user_report_page()
{
?>
<div class="mo_ldap_small_layout" style="margin-top:0px; height: auto;">
<?php
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto Dy;
}
if (!NddKoYsdasadJD()) {
goto IV;
}
if (!mo_ldap_local_ntlsl()) {
goto qM;
}
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">You are on Trial version of the plugin and it will expire on <span style="color:#0073aa"><?php
echo mo_ldap_local_xhsl();
?>
</span>. <?php
if (ch_xdigit()) {
goto HN;
}
?>
If you already purchased license <a href="#activatelicense">click here to activate</a> your license.<?php
goto mJ;
HN:
?>
Click <a href="<?php
echo add_query_arg(array("\164\x61\x62" => "\x61\x63\143\x6f\165\x6e\x74"), $_SERVER["\x52\105\x51\x55\x45\123\x54\137\125\x52\x49"]);
?>
">here</a> to activate your license.<?php
mJ:
?>
</div>
<?php
qM:
goto o8;
IV:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">
<?php
if (signNode() && !ch_xdigit()) {
goto Xh;
}
?>
Please enter your<a href="<?php
echo add_query_arg(array("\x74\x61\x62" => "\x61\143\x63\x6f\x75\156\164"), $_SERVER["\122\105\121\125\105\123\x54\137\x55\x52\111"]);
?>
"> license key</a> to activate the plugin.<?php
goto sE;
Xh:
?>
<a href="<?php
echo add_query_arg(array("\164\x61\x62" => "\x61\x63\x63\x6f\165\x6e\164"), $_SERVER["\122\105\121\125\105\123\124\137\x55\x52\x49"]);
?>
">Click here</a> to activate your 5 days FREE Trial for the plugin.<?php
sE:
?>
</div>
<?php
o8:
goto TB;
Dy:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Please <a href="<?php
echo add_query_arg(array("\164\141\142" => "\x61\x63\143\x6f\x75\x6e\164"), $_SERVER["\122\105\121\125\105\x53\124\137\125\x52\111"]);
?>
">Register or Login with miniOrange</a> to configure the miniOrange LDAP Plugin.</div>
<?php
TB:
?>
<h2>User Report</h2>
<form name="keep_user_report_form_on_uinstall" id="keep_user_report_form_on_uinstall" method="post" action="">
<input type="hidden" name="option" value="keep_user_report_logs_on_unistall" />
<input type="checkbox" id="mo_ldap_local_keep_user_report_log" name="mo_ldap_local_keep_user_report_log" value="1" <?php
checked(get_option("\x6d\157\137\x6c\x64\141\160\137\x6c\x6f\143\141\x6c\x5f\153\145\145\x70\x5f\x75\163\x65\162\x5f\162\145\x70\x6f\x72\164\137\154\157\147\137\157\x6e\x5f\x75\x6e\151\156\x73\164\x61\154\x6c") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto lD;
}
echo "\x64\x69\x73\x61\142\154\145\144";
lD:
?>
/> Keep User Report table on Uninstall
</form><br>
<form name="f" id="user_report_form" method="post" action="">
<input type="hidden" name="option" value="user_report_logs" />
<input type="checkbox" id="mo_ldap_local_user_report_log" name="mo_ldap_local_user_report_log" value="1" <?php
checked(get_option("\x6d\157\137\x6c\x64\x61\x70\x5f\154\x6f\143\x61\x6c\x5f\x75\x73\145\162\137\162\145\160\157\x72\x74\x5f\x6c\157\147") == 1);
?>
<?php
if (NddKoYsdasadJD()) {
goto c6;
}
echo "\144\151\163\x61\142\x6c\145\144";
c6:
?>
/> Log Authentication Requests
</form><br>
<?php
$pE = get_option("\155\x6f\137\154\x64\141\160\137\x6c\157\143\141\x6c\x5f\165\x73\145\162\137\162\x65\160\x6f\162\x74\x5f\x6c\x6f\147");
if ($pE) {
goto Sw;
}
echo "\116\x6f\x20\x61\x75\x64\151\164\x20\154\x6f\147\x73\x20\x61\x72\145\40\141\x76\141\151\x6c\x61\142\x6c\145\40\x63\165\162\162\x65\x6e\164\x6c\x79\56\x20\74\142\x72\x3e\74\142\162\x3e";
goto tW;
Sw:
$D0 = LDAP_Plugin::get_instance();
$D0->plugin_settings_page();
tW:
?>
</div>
<script>
jQuery('#mo_ldap_local_user_report_log').change(function() {
jQuery('#user_report_form').submit();
});
jQuery('#mo_ldap_local_keep_user_report_log').change(function() {
jQuery('#keep_user_report_form_on_uinstall').submit();
});
</script>
<?php
}
function mo_ldap_show_user_management_page()
{
?>
<div class="mo_ldap_table_layout">
<div id="panel2">
<table class="mo_ldap_settings_table">
<form name="f" method="post" id="attribute_config_form" action="">
<input type="hidden" name="option" value="mo_ldap_user_management_config" />
<h3>User Management Configuration</h3>
<tr>
<td><b><font color="#FF0000">*</font>DN of New User Location in Directory</b></td>
<td><input type="text" name="mo_ldap_new_user_location" required placeholder="DN of New Users in LDAP" style="width:80%;"
value="<?php
echo get_option("\x6d\157\137\x6c\x64\x61\160\137\x6c\x6f\x63\x61\154\x5f\156\x65\x77\x5f\165\x73\x65\x72\137\154\x6f\143\x61\164\x69\x6f\x6e");
?>
"/></td>
</tr>
<tr>
<td><b><font color="#FF0000">*</font>Object Class of User</b></td>
<td><input type="text" name="mo_ldap_objectclass_attribute" required placeholder="Object Class of Users in LDAP" style="width:80%;"
value="<?php
echo get_option("\155\157\x5f\x6c\144\141\x70\x5f\x6c\157\143\141\x6c\x5f\x6f\142\152\x65\143\x74\x63\x6c\x61\x73\x73\x5f\141\x74\164\x72\x69\x62\x75\x74\145");
?>
"/></td>
</tr>
<tr><td colspan="3"></td></tr>
<tr>
<td> </td>
<td>
<input type="submit" value="Save Configuration" class="button button-primary button-large" />
<a id="back_button" href=""class="button button-primary button-large">Cancel</a>
</td>
</form>
</table>
</div>
</div>
<?php
}
function post_response()
{
$KL = file_get_contents(plugins_url("\x72\x65\163\x6f\x75\x72\143\145\163\57\x65\x6e\137\154\151\x2e\155\x6f", __FILE__));
$vi = get_option("\x6d\157\x5f\x6c\x64\141\x70\x5f\x6c\x6f\x63\x61\154\x5f\143\165\163\x74\x6f\x6d\145\162\137\x74\x6f\x6b\145\156");
$KL = Mo_Ldap_Local_Util::decrypt($KL);
if (!empty($KL)) {
goto vW;
}
return '';
vW:
$Fl = get_option("\155\157\x5f\x6c\144\x61\160\x5f\x6c\157\x63\141\154\137\141\144\x6d\x69\x6e\137\141\x70\151\x5f\153\145\x79");
$KL = Mo_Ldap_Local_Util::decrypt($KL);
$Dd = simplexml_load_string($KL);
return strval($Dd->code);
}
function ch_xdigit()
{
if (!get_option("\163\x69\164\145\x5f\x63\153\137\154")) {
goto vo;
}
$fc = get_option("\155\x6f\x5f\x6c\x64\141\x70\137\x6c\157\143\x61\154\x5f\143\x75\163\x74\x6f\155\145\162\x5f\164\x6f\153\x65\x6e");
if (!(Mo_Ldap_Local_Util::decrypt(get_option("\x73\151\x74\x65\x5f\143\153\137\x6c")) == "\x74\162\x75\x65")) {
goto em;
}
return true;
em:
vo:
return false;
}
function show_pricing_page()
{
?>
<div class="mo_ldap_table_layout">
<?php
if (!Mo_Ldap_Local_Util::is_customer_registered()) {
goto ld;
}
if (!NddKoYsdasadJD()) {
goto kN;
}
if (!mo_ldap_local_ntlsl()) {
goto MA;
}
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">You are on Trial version of the plugin and it will expire on <span style="color:#0073aa"><?php
echo mo_ldap_local_xhsl();
?>
</span>. <?php
if (ch_xdigit()) {
goto iq;
}
?>
If you already purchased license <a href="#activatelicense">click here to activate</a> your license.<?php
goto fX;
iq:
?>
Click <a href="<?php
echo add_query_arg(array("\164\x61\142" => "\x61\143\x63\x6f\165\156\x74"), $_SERVER["\x52\105\x51\x55\x45\123\124\x5f\x55\x52\111"]);
?>
">here</a> to activate your license.<?php
fX:
?>
</div>
<?php
MA:
goto NV;
kN:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">
<?php
if (signNode() && !ch_xdigit()) {
goto Dg;
}
?>
Please enter your<a href="<?php
echo add_query_arg(array("\164\x61\x62" => "\141\143\x63\157\165\x6e\x74"), $_SERVER["\x52\105\x51\125\x45\123\124\x5f\x55\122\x49"]);
?>
"> license key</a> to activate the plugin.<?php
goto LW;
Dg:
?>
<a href="<?php
echo add_query_arg(array("\x74\x61\142" => "\x61\143\143\x6f\165\x6e\164"), $_SERVER["\122\105\x51\x55\105\x53\x54\x5f\125\122\x49"]);
?>
">Click here</a> to activate your 5 days FREE Trial for the plugin.<?php
LW:
?>
</div>
<?php
NV:
goto YN;
ld:
?>
<div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">Please <a href="<?php
echo add_query_arg(array("\164\x61\142" => "\141\x63\143\x6f\165\156\x74"), $_SERVER["\122\x45\x51\x55\105\x53\124\137\125\x52\x49"]);
?>
">Register or Login with miniOrange</a> to configure the miniOrange LDAP Plugin.</div>
<?php
YN:
?>
<table class="mo_ldap_local_pricing_table">
<h2><!--Licensing Plans - Thanks for upgrading to premium plugin-->
<?php
if (get_option("\x6d\x6f\137\x6c\144\x61\x70\137\x6c\x6f\x63\x61\x6c\137\154\x69\x63\x65\x6e\x73\x65\137\153\x65\171")) {
goto M8;
}
if (!(signNode() && get_option("\x6d\x6f\x5f\x6c\x64\141\160\137\154\157\143\141\154\x5f\151\x73\x5f\x74\x72\x69\x61\x6c\137\141\x63\164\x69\166\x65"))) {
goto Wp;
}
?>
- You are on 5 days free trial.<?php
Wp:
goto kI;
M8:
?>
- Thanks for upgrading to premium plugin.
<span style="float:right;margin-right:15px;"><input type="button" name="ok_btn" class="button button-primary button-large" value="Get License Keys" onclick="getlicensekeysform()" /><?php
kI:
?>
</h2><hr>
<span style="float:right"><input type="button" name="ok_btn" id="ok_btn" class="button button-primary button-large" value="OK, Got It" onclick="window.location.href='admin.php?page=mo_ldap_local_login&mo2f_tab=default'" /></span>
<!--<span style="float:right"><input type="button" name="ok_btn" id="ok_btn" class="button button-primary button-large" value="OK, Got It" onclick="window.location.href='admin.php?page=mo_ldap_local_login&mo2f_tab=default'" /></span>
</h2><hr>-->
<tr style="vertical-align:top;">
<td>
<div class="mo_ldap_local_thumbnail mo_ldap_local_pricing_paid_tab" >
<h3 class="mo_ldap_local_pricing_header">Do it yourself</h3>
<span>
<?php
if (signNode() && !ch_xdigit()) {
goto PC;
}
if (get_option("\155\x6f\x5f\x6c\144\x61\x70\x5f\x6c\157\x63\x61\x6c\137\x6c\151\143\145\x6e\x73\145\x5f\x6b\x65\x79")) {
goto HZ;
}
?>
<input type="button" name="upgrade_btn" class="button button-primary button-large" value="Upgrade Now" onclick="getupgradelicensesform('wp_ldap_intranet_basic_plan')" />
<?php
goto yV;
HZ:
?>
<input type="button" name="ok_btn" class="button button-primary button-large" value="Buy More Licenses" onclick="getupgradelicensesform('wp_ldap_intranet_upgrade_plan')" /> <?php
yV:
goto mB;
PC:
?>
<input type="button" name="upgrade_btn" class="button button-primary button-large" value="Upgrade Now" onclick="getupgradelicensesform('wp_ldap_intranet_basic_plan')" /> <?php
mB:
?>
</span>
<hr>
<p class="mo_ldap_local_pricing_text" style="padding:10px;">$349 - One Time Payment</p>
<p></p><p></p>
<hr>
<p class="mo_ldap_local_pricing_text" style="padding-bottom:20px !important;">
Unlimited LDAP Authentications<br>
Customized Role Mapping<br>
Customized Attribute Mapping<br>
Login with username, email or any LDAP attribute of choice<br>
Multiple Search Bases<br>
Multi-Site Support*<br>
Integrated Windows Authentication*<br><br><br>
</p>
<hr>
<p class="mo_ldap_local_pricing_text" >Basic Support by Email</p>
</div></td>
<td>
<div class="mo_ldap_local_thumbnail mo_ldap_local_pricing_free_tab" >
<h3 class="mo_ldap_local_pricing_header">Premium<br>
<span>
<input type="button" name="upgrade_btn" class="button button-primary button-large" value="Upgrade Now" onclick="getupgradelicensesform('wp_ldap_intranet_premium_plan')" /> </span></h3>
<hr>
<p class="mo_ldap_local_pricing_text">$349 + One Time Setup Fees <br>
( $60 per hour )</p>
<hr>
<p class="mo_ldap_local_pricing_text">
Unlimited LDAP Authentications<br>
Customized Role Mapping<br>
Customized Atrribute Mapping<br>
Login with username, email or any LDAP attribute of choice<br>
Multiple Search Bases<br>
Multi-Site Support*<br>
Integrated Windows Authentication*<br>
Customization<br>
Multiple LDAP Support<br>
End to End Ldap Integration **<br>
</p>
<hr>
<p class="mo_ldap_local_pricing_text">Premium Support Plans Available</p>
</div></td>
</tr>
</table>
<form style="display:none;" id="loginform" action="<?php
echo get_option("\x6d\157\x5f\x6c\144\x61\x70\137\x6c\x6f\143\141\154\137\150\x6f\163\164\137\156\141\x6d\x65") . "\57\155\x6f\x61\163\57\154\x6f\x67\151\x6e";
?>
"
target="_blank" method="post">
<input type="email" name="username" value="<?php
echo get_option("\x6d\x6f\137\x6c\x64\141\x70\x5f\x6c\157\143\x61\x6c\x5f\x61\144\155\x69\x6e\137\x65\155\x61\x69\154");
?>
" />
<input type="text" name="redirectUrl" value="<?php
echo get_option("\155\157\137\154\x64\x61\x70\x5f\x6c\157\143\141\154\137\x68\157\163\x74\137\x6e\x61\x6d\145") . "\57\x6d\x6f\141\x73\x2f\166\151\x65\x77\154\x69\143\145\x6e\163\145\x6b\145\171\163";
?>
" />
<input type="text" name="requestOrigin" id="requestOrigin1" />
</form>
<form style="display:none;" id="licenseform" action="<?php
echo get_option("\155\157\x5f\154\144\x61\x70\x5f\x6c\x6f\x63\x61\x6c\x5f\150\x6f\163\164\x5f\156\141\x6d\x65") . "\57\155\x6f\x61\163\x2f\154\x6f\147\151\x6e";
?>
"
target="_blank" method="post">
<input type="email" name="username" value="<?php
echo get_option("\155\157\137\154\144\x61\160\x5f\154\x6f\143\x61\154\x5f\141\144\155\151\156\x5f\145\x6d\x61\x69\154");
?>
" />
<input type="text" name="redirectUrl" value="<?php
echo get_option("\155\157\137\x6c\x64\141\160\x5f\x6c\157\143\141\x6c\137\150\157\x73\x74\x5f\156\141\155\145") . "\x2f\155\157\141\163\57\151\x6e\151\164\151\141\x6c\x69\172\145\x70\x61\x79\x6d\145\156\x74";
?>
" />
<input type="text" name="requestOrigin" id="requestOrigin2" />
</form>
<script>
function getlicensekeysform(){
jQuery('#requestOrigin1').val('wp_ldap_intranet_basic_plan');
jQuery('#loginform').submit();
}
function getupgradelicensesform(planType){
jQuery('#requestOrigin2').val(planType);
jQuery('#licenseform').submit();
}
function upgradeform(planType){
//alert(planType);
jQuery('#requestOrigin2').val(planType);
jQuery('#loginform').submit();
}
</script>
<br>
<h3>* Steps to upgrade to premium plugin -</h3>
<p>1. You will be redirected to miniOrange Login Console. Enter your password with which you created an account with us. After that you will be redirected to payment page.</p>
<p>2. Enter you card details and complete the payment. On successful payment completion, you will see the link to download the premium plugin.</p>
<h3>** End to End Ldap Integration - We will setup a conference and do end to end configuration for you. We provide services to do the configuration on your behalf. </h3>
<h3>* Multi-Site Support - We have a separate plugin for the multisite version. </h3>
<h3>* Integrated Windows Authentication - Supported in separate plugin. </h3>
</div>
<?php
}
function mo_ldap_show_verify_license_page()
{
?>
<div class="mo_ldap_table_layout">
<?php
if (!signNode()) {
goto hh;
}
?>
<?php
if (mo_ldap_local_ntlsl()) {
goto Sh;
}
if (ch_xdigit()) {
goto UK;
}
?>
<table style="width:100%"><tr><td><h3>Confirm your license<hr></h3>
If you have taken 5 days free trial of premium plugin just click the below button to confirm your plan.<br><br>
<input type="button" name="submit" id="mo_ldap_local_free_trial_link" value="Activate 5 Days Free Trial" class="button button-primary button-large" /></td>
</tr>
<tr><td style="text-align:center">OR<br><br></td></tr>
<tr>
<td>If you have upgraded to <b>Do It Yourself or Premium Plan</b>, click the below button to confirm your license plan.<br><br><a href="#checklicense"><input type="button" name="submit" id="" value="Confirm Your License Plan" class="button button-primary button-large" /></a>
</td></tr></table><br><br>
<?php
UK:
goto NM;
Sh:
?>
<center><br><h3>You are on Trial Version</h3>
<span>You are using 5 days trial version of miniOrange LDAP plugin. It will expire on <span style="color:red;font-weight:bold"><?php
echo mo_ldap_local_xhsl();
?>
</span>.</span>
<br><br>
<?php
if (ch_xdigit()) {
goto Ze;
}
?>
<a href="<?php
echo add_query_arg(array("\164\x61\x62" => "\x70\x72\x69\x63\151\x6e\147"), $_SERVER["\x52\x45\121\x55\x45\x53\124\x5f\x55\122\111"]);
?>
"><input type="button" name="submit" id="" value="Click here to Upgrade" class="button button-primary button-large" /></a> <a href="#checklicense"><input type="button" name="submit" id="" value="Already upgraded? Check License" class="button button-primary button-large" /></a></center><br><br>
<?php
Ze:
?>
<?php
NM:
?>
<?php
hh:
?>
<?php
if (!(!signNode() || ch_xdigit())) {
goto Qk;
}
?>
<h3>Verify your license</h3>
<form name="f" method="post" action="">
<input type="hidden" name="option" value="mo_ldap_local_verify_license" />
<table class="mo_ldap_settings_table">
<tr>
<td><b><font color="#FF0000">*</font>License Key:</b></td>
<td><input class="mo_ldap_table_textbox" required type="text"
name="mo_ldap_local_license_key" placeholder="Enter your license key to activate the plugin" /></td>
</tr>
<tr>
<td> </td>
<td>
<input type="submit" name="submit" value="Activate License" class="button button-primary button-large" />
</tr>
</table>
</form>
<?php
Qk:
?>
</div>
<form name="f" method="post" action="" id="mo_ldap_local_forgotpassword_form">
<input type="hidden" name="option" value="mo_ldap_local_forgot_password_form_option"/>
</form>
<form name="f" method="post" action="" id="mo_ldap_local_free_trial_form">
<input type="hidden" name="option" value="mo_ldap_local_free_trial"/>
</form>
<form name="f" method="post" action="" id="mo_ldap_local_check_license">
<input type="hidden" name="option" value="mo_ldap_local_check_license"/>
</form>
<script>
jQuery('a[href="#mo_ldap_local_forgot_password_link"]').click(function(){
jQuery('#mo_ldap_local_forgotpassword_form').submit();
});
jQuery('#mo_ldap_local_free_trial_link').click(function(){
jQuery('#mo_ldap_local_free_trial_form').submit();
});
jQuery('a[href="#checklicense"]').click(function(){
jQuery('#mo_ldap_local_check_license').submit();
});
</script>
<?php
}
function mo_ldap_addon_section()
{
?>
<div class="mo_ldap_support_layout" style="margin-top:20px;">
<h3>Add-on</h3>
<?php
do_action("\155\157\137\x6c\x64\141\160\137\163\x68\x6f\x77\137\x61\x64\144\x6f\156");
?>
<br>
<div>Contact us for available add-ons.</div>
<br>
</div>
<?php
}
?>
Function Calls
None |
Stats
MD5 | ae884de55e1521d77bc2c1d62af3f2b7 |
Eval Count | 0 |
Decode Time | 126 ms |