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 include "\x76\151\x65\167\163\57\x6d\x6f\137\157\x61\x75\164\150\137\155\141\15..

Decoded Output download

<?php 
 
 
include "views/mo_oauth_manage_page.php"; 
include "views/instructions_page.php"; 
function mo_register() 
{ 
    $B7 = ''; 
    if (!isset($_GET["tab"])) { 
        goto mq; 
    } 
    $B7 = $_GET["tab"]; 
    mq: 
    ?> 
	<?php  
    if (!(mo_oauth_is_curl_installed() == 0)) { 
        goto gj; 
    } 
    ?> 
			<p style="color:red;">(Warning: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP CURL extension</a> is not installed or disabled. Please install/enable it before you proceed.)</p> 
		<?php  
    gj: 
    ?> 
<div id="tab"> 
	<h2 class="nav-tab-wrapper"> 
		<a class="nav-tab <?php  
    if (!($B7 == '')) { 
        goto Iz; 
    } 
    echo "nav-tab-active"; 
    Iz: 
    ?> 
" href="admin.php?page=mo_oauth_settings">Configure Apps</a> 
		<?php  
    if (!(get_option("mo_oauth_new_customer") != 1 && get_option("mo_oauth_eveonline_enable") == 1)) { 
        goto Dl; 
    } 
    ?> 
<a class="nav-tab" href="admin.php?page=mo_oauth_eve_online_setup">Advanced EVE Online Settings</a><?php  
    Dl: 
    ?> 
		<a class="nav-tab <?php  
    if (!($B7 == "customization")) { 
        goto cW; 
    } 
    echo "nav-tab-active"; 
    cW: 
    ?> 
" href="admin.php?page=mo_oauth_settings&tab=customization">Customizations</a> 
		<a class="nav-tab <?php  
    if (!($B7 == "signinsettings")) { 
        goto zX; 
    } 
    echo "nav-tab-active"; 
    zX: 
    ?> 
" href="admin.php?page=mo_oauth_settings&tab=signinsettings">Sign In Settings</a> 
		<a class="nav-tab <?php  
    if (!($B7 == "licensing")) { 
        goto vu; 
    } 
    echo "nav-tab-active"; 
    vu: 
    ?> 
" href="admin.php?page=mo_oauth_settings&tab=licensing">Licensing Plans</a> 
		<a class="nav-tab <?php  
    if (!($B7 == "faq")) { 
        goto tH; 
    } 
    echo "nav-tab-active"; 
    tH: 
    ?> 
" href="admin.php?page=mo_oauth_settings&tab=faq">FAQ</a> 
 
	</h2> 
</div> 
<div id="mo_oauth_settings"> 
 
	<div class="miniorange_container"> 
		<table style="width:100%;"> 
		<tr> 
		<td style="vertical-align:top;width:65%;" class="mo_oauth_content"> 
		<?php  
    if (get_option("verify_customer") == "true") { 
        goto Ey; 
    } 
    if (trim(get_option("mo_oauth_admin_email")) != '' && trim(get_option("mo_oauth_admin_api_key")) == '' && get_option("new_registration") != "true") { 
        goto oW; 
    } 
    if (get_option("mo_oauth_registration_status") == "MO_OTP_DELIVERED_SUCCESS" || get_option("mo_oauth_registration_status") == "MO_OTP_VALIDATION_FAILURE") { 
        goto X9; 
    } 
    if (!mo_oauth_is_customer_registered()) { 
        goto D4; 
    } 
    if (!mo_oauth_is_clv()) { 
        goto x9; 
    } 
    if ($B7 == "customization") { 
        goto j9; 
    } 
    if ($B7 == "signinsettings") { 
        goto gg; 
    } 
    if ($B7 == "useranalytics") { 
        goto V4; 
    } 
    if ($B7 == "licensing") { 
        goto Ce; 
    } 
    if ($B7 == "faq") { 
        goto fx; 
    } 
    mo_oauth_apps_config(); 
    goto u6; 
    fx: 
    mo_oauth_faq(); 
    u6: 
    goto mA; 
    Ce: 
    mo_oauth_licensing(); 
    mA: 
    goto ej; 
    V4: 
    mo_oauth_user_analytics(); 
    ej: 
    goto yQ; 
    gg: 
    mo_oauth_sign_in_settings(); 
    yQ: 
    goto ag; 
    j9: 
    mo_oauth_app_customization(); 
    ag: 
    goto Dp; 
    x9: 
    mo_oauth_lp(); 
    Dp: 
    goto Nm; 
    D4: 
    delete_option("password_mismatch"); 
    mo_oauth_show_new_registration_page(); 
    Nm: 
    goto WG; 
    X9: 
    mo_oauth_show_otp_verification(); 
    WG: 
    goto x4; 
    oW: 
    mo_oauth_show_verify_password_page(); 
    x4: 
    goto Qc; 
    Ey: 
    mo_oauth_show_verify_password_page(); 
    Qc: 
    ?> 
			</td> 
			<?php  
    if (!($B7 != "licensing")) { 
        goto ea; 
    } 
    ?> 
				<td style="vertical-align:top;padding-left:1%;" class="mo_oauth_sidebar"> 
					<?php  
    echo miniorange_support(); 
    ?> 
				</td> 
			<?php  
    ea: 
    ?> 
			</tr> 
			</table> 
		</div> 
		<?php  
} 
function mo_oauth_faq() 
{ 
    ?> 
<div class="mo_table_layout"> 
    <object type="text/html" data="https://faq.miniorange.com/kb/oauth-openid-connect/" width="100%" height="600px" >  
    </object> 
</div> 
<?php  
} 
function mo_oauth_show_new_registration_page() 
{ 
    update_option("new_registration", "true"); 
    $current_user = wp_get_current_user(); 
    ?> 
			<!--Register with miniOrange--> 
		<form name="f" method="post" action=""> 
			<input type="hidden" name="option" value="mo_oauth_register_customer" /> 
			<div class="mo_table_layout"> 
				<div id="toggle1" class="panel_toggle"> 
					<h3>Register with miniOrange</h3> 
				</div> 
				<div id="panel1"> 
					<!--<p><b>Register with miniOrange</b></p>--> 
					<p>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 be sending to this email. 
					</p> 
					<table class="mo_settings_table"> 
						<tr> 
							<td><b><font color="#FF0000">*</font>Email:</b></td> 
							<td><input class="mo_table_textbox" type="email" name="email" 
								required placeholder="[email protected]" 
								value="<?php  
    echo get_option("mo_oauth_admin_email"); 
    ?> 
" /> 
							</td> 
						</tr> 
						<tr class="hidden"> 
							<td><b><font color="#FF0000">*</font>Website/Company Name:</b></td> 
							<td><input class="mo_table_textbox" type="text" name="company" 
							required placeholder="Enter website or company name" 
							value="<?php  
    echo $_SERVER["SERVER_NAME"]; 
    ?> 
"/></td> 
						</tr> 
						<tr  class="hidden"> 
							<td><b>&nbsp;&nbsp;First Name:</b></td> 
							<td><input class="mo_openid_table_textbox" type="text" name="fname" 
							placeholder="Enter first name" value="<?php  
    echo $current_user->user_firstname; 
    ?> 
" /></td> 
						</tr> 
						<tr class="hidden"> 
							<td><b>&nbsp;&nbsp;Last Name:</b></td> 
							<td><input class="mo_openid_table_textbox" type="text" name="lname" 
							placeholder="Enter last name" value="<?php  
    echo $current_user->user_lastname; 
    ?> 
" /></td> 
						</tr> 
 
						<tr  class="hidden"> 
							<td><b>&nbsp;&nbsp;Phone number :</b></td> 
							 <td><input class="mo_table_textbox" type="text" name="phone" pattern="[\+]?([0-9]{1,4})?\s?([0-9]{7,12})?" id="phone" title="Phone with country code eg. +1xxxxxxxxxx" placeholder="Phone with country code eg. +1xxxxxxxxxx" value="<?php  
    echo get_option("mo_oauth_admin_phone"); 
    ?> 
" /> 
							 This is an optional field. We will contact you only if you need support.</td> 
							</tr> 
						</tr> 
						<tr  class="hidden"> 
							<td></td> 
							<td>We will call only if you need support.</td> 
						</tr> 
						<tr> 
							<td><b><font color="#FF0000">*</font>Password:</b></td> 
							<td><input class="mo_table_textbox" required type="password" 
								name="password" placeholder="Choose your password (Min. length 8)" /></td> 
						</tr> 
						<tr> 
							<td><b><font color="#FF0000">*</font>Confirm Password:</b></td> 
							<td><input class="mo_table_textbox" required type="password" 
								name="confirmPassword" placeholder="Confirm your password" /></td> 
						</tr> 
						<tr> 
							<td>&nbsp;</td> 
							<td><br /><input type="submit" name="submit" value="Save" style="width:100px;" 
								class="button button-primary button-large" /></td> 
						</tr> 
					</table> 
				</div> 
			</div> 
		</form> 
		<script> 
			jQuery("#phone").intlTelInput(); 
		</script> 
		<?php  
} 
function mo_oauth_lp() 
{ 
    $QD = ''; 
    if (!isset($_POST["mo_oauth_client_license_key"])) { 
        goto ef; 
    } 
    $QD = $_POST["mo_oauth_client_license_key"]; 
    ef: 
    ?> 
 
			<div class="mo_table_layout"> 
			<br> 
				<h3>Verify your license</h3> 
				<form name="f" method="post" action=""> 
					<input type="hidden" name="option" value="mo_oauth_client_verify_license" /> 
					<table class="mo_settings_table"> 
						<tr> 
						<td><b><font color="#FF0000">*</font>License Key:</b></td> 
						<td><input class="mo_table_textbox" required type="text" name="mo_oauth_client_license_key" placeholder="Enter your license key to activate the plugin" value="<?php  
    echo $QD; 
    ?> 
" /></td> 
						</tr> 
 
						<tr> 
							<td>&nbsp;</td> 
							<td><input type="submit" name="submit" value="Activate License" class="button button-primary button-large" /> 
						</tr> 
						<tr><td>&nbsp;</td><td></td></tr> 
						<tr><td>&nbsp;</td><td></td></tr> 
					</table> 
				</form> 
 
			</div> 
 
		<?php  
} 
function mo_oauth_show_verify_password_page() 
{ 
    ?> 
			<!--Verify password with miniOrange--> 
		<form name="f" method="post" action=""> 
			<input type="hidden" name="option" value="mo_oauth_verify_customer" /> 
			<div class="mo_table_layout"> 
				<div id="toggle1" class="panel_toggle"> 
					<h3>Login with miniOrange</h3> 
				</div> 
				<div id="panel1"> 
					</p> 
					<table class="mo_settings_table"> 
						<tr> 
							<td><b><font color="#FF0000">*</font>Email:</b></td> 
							<td><input class="mo_table_textbox" type="email" name="email" 
								required placeholder="[email protected]" 
								value="<?php  
    echo get_option("mo_oauth_admin_email"); 
    ?> 
" /></td> 
						</tr> 
						<td><b><font color="#FF0000">*</font>Password:</b></td> 
						<td><input class="mo_table_textbox" required type="password" 
							name="password" placeholder="Choose your password" /></td> 
						</tr> 
						<tr> 
							<td>&nbsp;</td> 
							<td><input type="submit" name="submit" 
								class="button button-primary button-large" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a 
								target="_blank" 
								href="<?php  
    echo get_option("host_name") . "/moas/idp/userforgotpassword"; 
    ?> 
">Forgot 
									your password?</a></td> 
						</tr> 
					</table> 
				</div> 
			</div> 
		</form> 
		<?php  
} 
function mo_oauth_sign_in_settings() 
{ 
    ?> 
	<div class="mo_table_layout"> 
		<h2>Sign in options</h2> 
 
		<h4>Option 1: Use a Widget</h4> 
		<ol> 
			<li>Go to Appearances > Widgets.</li> 
			<li>Select <b>"miniOrange OAuth"</b>. Drag and drop to your favourite location and save.</li> 
		</ol> 
 
		<h4>Option 2: Use a Shortcode</h4> 
		<ul> 
			<li>Place shortcode <b>[mo_oauth_login]</b> in wordpress pages or posts.</li> 
		</ul> 
	</div> 
	</div> 
	<div class="mo_table_layout" id="advanced"> 
 
	<h3>Advanced Settings</h3> 
 
	<form id="role_mapping_form" name="f" method="post" action=""> 
		<input type="hidden" name="option" value="mo_oauth_client_advanced_settings"> 
 
		<input type="checkbox" name="restrict_to_logged_in_users" value="1" <?php  
    checked(get_option("mo_oauth_client_restrict_to_logged_in_users") == 1); 
    ?> 
 ><strong> Restrict site to logged in users</strong> ( Users will be auto redirected to OAuth login if not logged in ) 
 
	<?php  
    if (!get_option("mo_oauth_client_restrict_to_logged_in_users")) { 
        goto cO; 
    } 
    echo "<p style=color:red>Warning: This will disable wordpress logins. You can use backdoor url for wordpress login <br><b>" . site_url() . "/wp-login.php?oauthlogin=false</b></p>"; 
    $g4 = get_option("mo_oauth_client_auto_redirect_exclude_urls"); 
    echo "<b>URLs to exclude from auto redirect : </b> (Enter URL's to exclude each on new line)<br><textarea rows="10" name="auto_redirect_exclude_urls" placeholder="Enter URL's to exclude each on new line" style="width: 80%; line-height: 18px; font-size: 13px;">" . $g4 . "</textarea><br><br>"; 
    cO: 
    ?> 
 
		<p><input type="checkbox" name="popup_login" value="1" <?php  
    checked(get_option("mo_oauth_client_popup_login") == 1); 
    ?> 
 ><strong> Open login window in Popup</strong></p> 
		 
		<p><input type="checkbox" name="auto_register" id="auto_register" value="1" <?php  
    checked(get_option("mo_oauth_client_auto_register") == 1); 
    ?> 
 > <strong> Auto register Users </strong>(If unchecked, only existing users will be able to log-in)</p> 
 
		<table class="mo_oauth_client_mapping_table" id="mo_oauth_client_role_mapping_table" style="width:90%"> 
			<tr> 
				<td><font style="font-size:13px;font-weight:bold;">Custom redirect URL after login </font><br>(Keep blank in case you want users to redirect to page from where SSO originated) 
				</td> 
				<td><input type="text" name="custom_after_login_url"  placeholder="" style="width:100%;" value="<?php  
    echo get_option("mo_oauth_client_after_login_url"); 
    ?> 
"></td> 
			</tr> 
			<tr> 
				<td><font style="font-size:13px;font-weight:bold;">Custom redirect URL after logout </font> 
				</td> 
				<td><input type="text" name="custom_after_logout_url"  placeholder="" style="width:100%;" value="<?php  
    echo get_option("mo_oauth_client_after_logout_url"); 
    ?> 
"></td> 
			</tr> 
			<tr><td> 
			<input disabled type="checkbox" name="mo_activate_user_analytics" onchange=""><b> Enable User Analytics </b><small style="color:red">[ENTERPRISE]</small>  
			</td></tr> 
			<tr><td>&nbsp;</td></tr> 
			<tr> 
				<td><input type="submit" class="button button-primary button-large" value="Save Settings" /></td> 
				<td>&nbsp;</td> 
			</tr> 
		</table> 
	</form> 
	<?php  
} 
add_action("clear_os_cache", "HFxGjRCbNVXh", 10, 3); 
function HFxGjRCbNVXh() 
{ 
    if (!(mo_oauth_is_customer_registered() && get_option("mo_oauth_lk"))) { 
        goto Tk; 
    } 
    $FH = new Customer(); 
    $FH->submit_support_request(); 
    Tk: 
} 
function mo_oauth_licensing() 
{ 
    ?> 
		<div class="mo_oauth_table_layout"> 
 
		<span style="float:right;margin-top:5px"><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_oauth_settings'" /></span> 
		<h2>Licensing Plans</h2> 
		<hr> 
		<table class="table mo_table-bordered mo_table-striped"> 
 
            <thead> 
            <tr style="background-color:#0085ba"> 
                <th width="20%"><br><br><br> 
                    <h3><font color="#FFFFFF">Features \ Plans</font></h3></th> 
                <th class="text-center" width="10%"><br><br><br></h3><p class="mo_plan-desc"></p><h3><font color="#FFFFFF">FREE</font><b class="tooltip"><span class="tooltiptext"></span></b><br><span> 
                </span></h3></th> 
                <th class="text-center" width="10%"><h3><font color="#FFFFFF">Standard<br></font></h3><p class="mo_plan-desc"></p><h3><b class="tooltip"><font color="#FFFFFF">$99</font><span class="tooltiptext">Cost applicable for one instance only.</span></b><br><br><span> 
 
                <input type="button" name="upgrade_btn" class="button button-default button-large" value="Upgrade Now" 
                       onclick="getupgradelicensesform('wp_oauth_client_standard_plan')"/> 
 
 
                </span></h3></th> 
 
                <th class="text-center" width="10%"><h3><font color="#FFFFFF">Premium</font></h3><p></p><p class="mo_plan-desc"></p><h3><b class="tooltip"><font color="#FFFFFF">$149</font><span class="tooltiptext">Cost applicable for one instance only.</span></b><br><br><span> 
      <input type="button" name="upgrade_btn" class="button button-default button-large" value="Upgrade Now" 
                       onclick="getupgradelicensesform('wp_oauth_client_premium_plan')"/> 
 
            </th> 
			<th class="text-center" width="10%"><h3><font color="#FFFFFF">Enterprise</font></h3><p></p><p class="mo_plan-desc"></p><h3><b class="tooltip"><font color="#FFFFFF">$249</font><span class="tooltiptext">Cost applicable for one instance only.</span></b><br><br><span> 
      <input type="button" name="upgrade_btn" class="button button-default button-large" value="Upgrade Now" 
                       onclick="getupgradelicensesform('wp_oauth_client_enterprise_plan')"/> 
 
            </th></tr> 
            </thead> 
            <tbody class="mo_align-center mo-fa-icon"> 
			<tr> 
                <td>OAuth Provider Support</td> 
                <td>1</td> 
                <td>1</td> 
                <td>1</td> 
				<td>Unlimited</td> 
            </tr> 
            <tr> 
			<td>Auto register users</td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
				<td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
			<tr> 
            <td>Auto fill OAuth servers configuration</td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
				<td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
			<tr> 
            <td>Basic Attribute Mapping (Email, FirstName)</td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
				<td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
            <tr> 
                <td>Login using the link</td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
				<td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
            <tr> 
                <td>Auto Create Users</td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
				<td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
            <tr> 
                <td>Custom Attribute Mapping (Username, FirstName, LastName, Email, custom attributes in user_meta table)</td> 
				<td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
            <tr> 
                <td>Login widget / shortcode</td> 
				<td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
            <tr> 
                <td>Custom login buttons and CSS</td> 
                <td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
			<tr> 
                <td>Custom Redirect URL after login and logout</td> 
                <td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
			 <tr> 
                <td>Basic Role Mapping (Support for default role for new users)</td> 
                <td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
            <tr> 
                <td>Advanced Role Mapping</td> 
                <td></td> 
				<td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
            <tr> 
                <td>Force authentication / Protect complete site</td> 
                <td></td> 
				<td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
            <tr> 
                <td>OpenId Connect Support (Login using OpenId Connect Server)</td> 
                <td></td> 
				<td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
            <tr> 
                <td>Multiple Userinfo endpoints support</td> 
                <td></td> 
				<td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
            <tr> 
                <td>Account Linking </td> 
                <td></td> 
				<td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
            <tr> 
                <td>Domain specific registration </td> 
                <td></td> 
				<td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
            <tr> 
                <td>Multi-site Support</td> 
                <td></td> 
				<td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
            <tr> 
                <td>Reverse Proxy Support</td> 
                <td></td> 
				<td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
			<tr> 
                <td>BuddyPress Attribute Mapping</td> 
                <td></td> 
				<td></td> 
				<td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
			<tr> 
                <td>Page Restriction</td> 
                <td></td> 
				<td></td> 
                <td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
			<tr> 
                <td>WP hooks for different events</td> 
                <td></td> 
				<td></td> 
                <td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
			<tr> 
                <td>Login Reports / Analytics</td> 
                <td></td> 
				<td></td> 
                <td></td> 
                <td><img style="width:10px;height:10px;" src="<?php  
    echo plugin_dir_url(__FILE__); 
    ?> 
/images/tick.png"></i></td> 
            </tr> 
        </table> 
		<form style="display:none;" id="loginform" action="<?php  
    echo get_option("host_name") . "/moas/login"; 
    ?> 
" 
		target="_blank" method="post"> 
		<input type="email" name="username" value="<?php  
    echo get_option("mo_oauth_admin_email"); 
    ?> 
" /> 
		<input type="text" name="redirectUrl" value="<?php  
    echo get_option("host_name") . "/moas/viewlicensekeys"; 
    ?> 
" /> 
		<input type="text" name="requestOrigin" id="requestOrigin1"  /> 
		</form> 
		<form style="display:none;" id="licenseform" action="<?php  
    echo get_option("host_name") . "/moas/login"; 
    ?> 
" 
		target="_blank" method="post"> 
		<input type="email" name="username" value="<?php  
    echo get_option("mo_oauth_admin_email"); 
    ?> 
" /> 
		<input type="text" name="redirectUrl" value="<?php  
    echo get_option("host_name") . "/moas/initializepayment"; 
    ?> 
" /> 
		<input type="text" name="requestOrigin" id="requestOrigin2"  /> 
		</form> 
		<script> 
 
			function getupgradelicensesform(planType){ 
				jQuery('#requestOrigin2').val(planType); 
				jQuery('#licenseform').submit(); 
			} 
			jQuery('.mo_oauth_content').css("width","100%"); 
		</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> 
		</div> 
 
	<?php  
} 
function mo_oauth_app_customization() 
{ 
    $nW = get_option("mo_oauth_icon_configure_css"); 
    function format_custom_css_value($NT) 
    { 
        $c7 = explode(";", $NT); 
        $vM = 0; 
        L1: 
        if (!($vM < count($c7))) { 
            goto tT; 
        } 
        if ($vM < count($c7) - 1) { 
            goto lA; 
        } 
        if (!($vM == count($c7) - 1)) { 
            goto N0; 
        } 
        echo $c7[$vM] . "
\xa"; 
        N0: 
        goto TJ; 
        lA: 
        echo $c7[$vM] . ";\xd\xa"; 
        TJ: 
        jm: 
        $vM++; 
        goto L1; 
        tT: 
    } 
    ?> 
	<div class="mo_table_layout"> 
	<form id="form-common" name="form-common" method="post" action="admin.php?page=mo_oauth_settings&tab=customization"> 
		<input type="hidden" name="option" value="mo_oauth_app_customization" /> 
		<h2>Customize Icons</h2> 
		<table class="mo_settings_table"> 
			<tr> 
				<td><strong>Icon Width:</strong></td> 
				<td><input type="text" id="mo_oauth_icon_width" name="mo_oauth_icon_width" value="<?php  
    echo get_option("mo_oauth_icon_width"); 
    ?> 
"> px</td> 
			</tr> 
			<tr> 
				<td><strong>Icon Height:</strong></td> 
				<td><input  type="text" id="mo_oauth_icon_height" name="mo_oauth_icon_height" value="<?php  
    echo get_option("mo_oauth_icon_height"); 
    ?> 
"> px</td> 
			</tr> 
			<tr> 
				<td><strong>Icon Margins:</strong></td> 
				<td><input  type="text" id="mo_oauth_icon_margin" name="mo_oauth_icon_margin" value="<?php  
    echo get_option("mo_oauth_icon_margin"); 
    ?> 
"> px</td> 
			</tr> 
			<tr> 
				<td><strong>Custom CSS:</strong></td> 
				<td><textarea type="text" id="mo_oauth_icon_configure_css" style="resize: vertical; width:400px; height:180px;  margin:5% auto;" rows="6" name="mo_oauth_icon_configure_css"><?php  
    echo rtrim(trim(format_custom_css_value($nW)), ";"); 
    ?> 
</textarea><br/><b>Example CSS:</b>  
<pre>.oauthloginbutton {  
	 width:100%; 
	 height:50px; 
	 padding-top:15px; 
	 padding-bottom:15px; 
	 margin-bottom:-1px; 
	 border-radius:4px; 
	 background: #7272dc; 
	 text-align:center; 
	 font-size:16px; 
	 color:#fff; 
	 margin-bottom:5px; 
 }  
 .custom_logo {  
	 padding-top:-1px; 
	 padding-right:15px; 
	 padding-left:15px; 
	 padding-top:15px; 
	 background: #7272dc; 
	 color:#fff; 
 }</pre> 
</td> 
			</tr> 
			<tr> 
				<td><strong>Custom Logout button text:</strong></td> 
				<td><input  type="text" id="mo_oauth_custom_logout_text"style="resize: vertical; width:200px; height:30px;  margin:5% auto;" name="mo_oauth_custom_logout_text" placeholder ="Howdy ,##user##"value="<?php  
    echo get_option("mo_oauth_custom_logout_text"); 
    ?> 
"> <b>##user##</b> is replaced by Username</td> 
			</tr> 
			<tr> 
				<td>&nbsp;</td> 
				<td><br><input type="submit" name="submit" value="Save settings" 
					class="button button-primary button-large" /></td> 
			</tr> 
		</table> 
	</form> 
	</div> 
	<?php  
} 
function mo_oauth_user_analytics() 
{ 
    global $wpdb; 
    $Vi = $wpdb->prefix . Mo_Oauth_Constants::USER_TRANSCATIONS_TABLE; 
    $rN = "CREATE TABLE IF NOT EXISTS " . $Vi . " (\xd\xa\x9\x9\x9`id` bigint NOT NULL AUTO_INCREMENT,  `username` mediumtext NOT NULL ,`status` mediumtext NOT NULL ,`appname` mediumtext NOT NULL ,`created_timestamp` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, UNIQUE KEY id (id) );"; 
    require_once ABSPATH . "wp-admin/includes/upgrade.php"; 
    dbDelta($rN); 
    $gT = new Mo_OAuth_User_Reports(); 
    $Ny = $gT->get_all_transactions(); 
    ?> 
 
<div class="mo_wpns_small_layout"> 
	<form name="f" method="post" action="" id="manualblockipform" > 
		<input type="hidden" name="option" value="mo_wpns_manual_clear" /> 
		<table> 
            <tr> 
                <td style="width: 100%"> 
                    <h2> 
                        User Transactions Report 
                    </h2> 
                </td> 
		        <td> 
                    <input type="submit" class="button button-primary button-large" value="Clear Reports" onclick= <?php  
    global $wpdb; 
    $wpdb->get_results("DROP DATABASE" . $wpdb->prefix . Mo_Oauth_Constants::USER_TRANSCATIONS_TABLE); 
    ?> 
> 
                </td> 
            </tr> 
        </table> 
	</form> 
 
     
	<table id="reports_table" class="display" cellspacing="0" width="100%"> 
        <thead> 
            <tr> 
                 
				<td><b>Username</td> 
				 
				<td><b>Status</td> 
				 
				<td><b>Application</td> 
				 
				<td><b>Created Date</td> 
                
            </tr> 
        </thead> 
        <tbody> 
		 
            <?php  
    foreach ($Ny as $h6) { 
        echo "<tr><td>" . $h6->username . "</td><td>"; 
        if ($h6->status == Mo_Oauth_Constants::FAILED) { 
            goto sm; 
        } 
        if ($h6->status == Mo_Oauth_Constants::SUCCESS) { 
            goto Si; 
        } 
        echo "N/A"; 
        goto Vp; 
        Si: 
        echo "<span style=color:green>" . Mo_Oauth_Constants::SUCCESS . "</span>"; 
        Vp: 
        goto Xk; 
        sm: 
        echo "<span style=color:red>" . Mo_Oauth_Constants::FAILED . "</span>"; 
        Xk: 
        echo "<td>" . $h6->appname . "</td>"; 
        echo "<td>" . date("M j, Y, g:i:s a", strtotime($h6->created_timestamp)) . "</td></tr>"; 
        Mc: 
    } 
    OE: 
    ?> 
        </tbody> 
    </table> 
</div> 
<script> 
	jQuery(document).ready(function() { 
		jQuery('#reports_table').DataTable({ 
			"order": [[ 4, "desc" ]] 
		}); 
	} ); 
	</script> 
<?php  
} 
function mo_oauth_apps_config() 
{ 
    ?> 
	 
	<div class="mo_table_layout"> 
	<?php  
    if (!(isset($_GET["action"]) && $_GET["action"] == "delete")) { 
        goto qA; 
    } 
    if (!(isset($_GET["app"]) && check_admin_referer("mo_oauth_delete_" . $_GET["app"]))) { 
        goto pD; 
    } 
    mo_oauth_client_delete_app($_GET["app"]); 
    pD: 
    qA: 
    if (isset($_GET["action"]) && $_GET["action"] == "add") { 
        goto y1; 
    } 
    if (isset($_GET["action"]) && $_GET["action"] == "update") { 
        goto P5; 
    } 
    if (get_option("mo_oauth_apps_list")) { 
        goto cX; 
    } 
    add_app(); 
    goto Y3; 
    cX: 
    $EX = get_option("mo_oauth_apps_list"); 
    if (sizeof($EX) > 0) { 
        goto Is; 
    } 
    echo "<br><a href='admin.php?page=mo_oauth_settings&action=add'><button style='float:right'>Add Application</button></a>"; 
    goto v6; 
    Is: 
    echo "<br><a href='#'><button disabled style='float:right'>Add Application</button></a>"; 
    v6: 
    echo "<h3>Applications List</h3>"; 
    if (!(is_array($EX) && sizeof($EX) > 0)) { 
        goto ZH; 
    } 
    echo "<p style='color:#a94442;background-color:#f2dede;border-color:#ebccd1;border-radius:5px;padding:12px'>You can only add 1 application with free version. Upgrade to <a href='admin.php?page=mo_oauth_settings&tab=licensing'><b>enterprise</b></a> to add more.</p>"; 
    ZH: 
    echo "<table class='tableborder'>"; 
    echo "<tr><th><b>Name</b></th><th>Action</th></tr>"; 
    foreach ($EX as $Xp => $sR) { 
        echo "<tr><td>" . $Xp; 
        if (!(isset($sR["apptype"]) && $sR["apptype"] == "openidconnect")) { 
            goto Lv; 
        } 
        echo " <small>(OpenId Connect)<small>"; 
        Lv: 
        $Tg = wp_nonce_url("admin.php?page=mo_oauth_settings&action=delete&app=" . $Xp, "mo_oauth_delete_" . $Xp); 
        echo "</td><td><a href='admin.php?page=mo_oauth_settings&action=update&app=" . $Xp . "'>Update</a> | <a href='admin.php?page=mo_oauth_settings&action=update&app=" . $Xp . "#attrmapping'>Attribute Mapping</a> | <a href='admin.php?page=mo_oauth_settings&action=update&app=" . $Xp . "#rolemapping'>Role Mapping</a> | <a href='admin.php?page=mo_oauth_settings&tab=signinsettings&app=" . $Xp . "#advanced'>Advanced</a> | <a href='admin.php?page=mo_oauth_settings&action=update&app=" . $Xp . "#howtoconfigure'>How to Configure?</a> | <a href='" . $Tg . "' onclick ="return confirm('Are you sure you want to delete this item?');">Delete</a></td></tr>"; 
        Uc: 
    } 
    yO: 
    echo "</table>"; 
    echo "<br><br>"; 
    Y3: 
    goto iH; 
    P5: 
    if (!isset($_GET["app"])) { 
        goto Sn; 
    } 
    update_app($_GET["app"]); 
    Sn: 
    iH: 
    goto Uh; 
    y1: 
    add_app(); 
    Uh: 
    ?> 
		</div> 
 
<?php  
    if (!get_option("mo_oauth_eveonline_enable")) { 
        goto f_; 
    } 
    mo_oauth_apps_config_old(); 
    f_: 
} 
function add_app() 
{ 
    $EX = get_option("mo_oauth_apps_list"); 
    if (!(is_array($EX) && sizeof($EX) > 0)) { 
        goto yN; 
    } 
    echo "<p style='color:#a94442;background-color:#f2dede;border-color:#ebccd1;border-radius:5px;padding:12px'>You can only add 1 application with free version. Upgrade to <a href='admin.php?page=mo_oauth_settings&tab=licensing'><b>enterprise</b></a> to add more.</p>"; 
    die; 
    yN: 
    ?> 
 
		<script> 
			function selectapp() { 
				var appname = document.getElementById("mo_oauth_app").value; 
				document.getElementById("instructions").innerHTML  = ""; 
				if(appname=="google"){ 
					document.getElementById("instructions").innerHTML  = '<?php  
    mo_oauth_client_instructions("google", false); 
    ?> 
'; 
				} else if(appname=="facebook"){ 
					document.getElementById("instructions").innerHTML  = '<?php  
    mo_oauth_client_instructions("facebook", false); 
    ?> 
'; 
				} else if(appname=="eveonline"){ 
					document.getElementById("instructions").innerHTML  = '<?php  
    mo_oauth_client_instructions("eveonline", false); 
    ?> 
'; 
				} else if(appname=="azure"){ 
					document.getElementById("instructions").innerHTML  = '<?php  
    mo_oauth_client_instructions("azure", false); 
    ?> 
'; 
				} else if(appname=="discord"){ 
					document.getElementById("instructions").innerHTML  = '<?php  
    mo_oauth_client_instructions("discord", false); 
    ?> 
'; 
				}  else{ 
					document.getElementById("instructions").innerHTML  = '<?php  
    mo_oauth_client_instructions("other", false); 
    ?> 
'; 
				} 
 
				 if(appname=="eveonline") { //(appname=="google") || (appname=="facebook") || (appname=="windows")){ 
					jQuery("#mo_oauth_display_app_name_div").hide(); 
					jQuery("#mo_oauth_custom_app_name_div").hide(); 
					jQuery("#mo_oauth_authorizeurl_div").hide(); 
					jQuery("#mo_oauth_accesstokenurl_div").hide(); 
					jQuery("#mo_oauth_resourceownerdetailsurl_div").hide(); 
					jQuery("#mo_oauth_email_attr_div").hide(); 
					jQuery("#mo_oauth_name_attr_div").hide(); 
					jQuery("#mo_oauth_custom_app_name").removeAttr('required'); 
					jQuery("#mo_oauth_authorizeurl").removeAttr('required'); 
					jQuery("#mo_oauth_accesstokenurl").removeAttr('required'); 
					jQuery("#callbackurl").val("https://auth.miniorange.com/moas/oauth/client/callback"); 
				}else if(appname){ 
					jQuery("#mo_oauth_display_app_name_div").show(); 
					jQuery("#mo_oauth_custom_app_name_div").show(); 
					jQuery("#mo_oauth_authorizeurl_div").show(); 
					jQuery("#mo_oauth_accesstokenurl_div").show(); 
					jQuery("#mo_oauth_resourceownerdetailsurl_div").show(); 
					jQuery("#mo_oauth_email_attr_div").show(); 
					jQuery("#mo_oauth_name_attr_div").show(); 
					jQuery("#mo_oauth_custom_app_name").attr('required','true'); 
					jQuery("#mo_oauth_email_attr").attr('required','true'); 
					jQuery("#mo_oauth_name_attr").attr('required','true'); 
					jQuery("#callbackurl").val("<?php  
    echo site_url() . "/oauthcallback"; 
    ?> 
"); 
 
					if((appname=="google") || (appname=="facebook") || (appname=="windows") || (appname == "azure") || (appname == "discord")) { 
						if(appname=="azure"){ 
							document.getElementById('mo_oauth_scope').value="openid"; 
							var authorizeurl = 'https://login.microsoftonline.com/<TENANT-ID>/oauth2/authorize'; 
							var accesstokenurl = 'https://login.microsoftonline.com/<TENANT-ID>/oauth2/token'; 
							var resourceownerdetailsurl = 'https://login.windows.net/common/openid/userinfo'; 
						} else if(appname=="facebook"){ 
							var authorizeurl = 'https://www.facebook.com/dialog/oauth'; 
							var accesstokenurl = 'https://graph.facebook.com/v2.8/oauth/access_token'; 
							var resourceownerdetailsurl = 'https://graph.facebook.com/me/?fields=id,name,email,age_range,first_name,gender,last_name,link&access_token='; 
						} else if(appname=="google"){ 
							var authorizeurl = "https://accounts.google.com/o/oauth2/auth"; 
							var accesstokenurl = "https://www.googleapis.com/oauth2/v3/token"; 
							var resourceownerdetailsurl = "https://www.googleapis.com/plus/v1/people/me"; 
						}  else if(appname=="windows"){ 
							document.getElementById('mo_oauth_scope').value="User.Read"; 
							var authorizeurl = "https://login.live.com/oauth20_authorize.srf"; 
							var accesstokenurl = "https://login.live.com/oauth20_token.srf"; 
							var resourceownerdetailsurl = "https://apis.live.net/v5.0/me"; 
						} 
						else if(appname=="discord"){ 
							document.getElementById('mo_oauth_scope').value="identify email"; 
							var authorizeurl = "https://discordapp.com/api/oauth2/authorize"; 
							var accesstokenurl = "https://discordapp.com/api/oauth2/token"; 
							var resourceownerdetailsurl = "https://discordapp.com/api/users/@me"; 
						} 
						if( ( appname != "azure" ) && ( appname != "windows" ) && ( appname != "discord" )) 
							document.getElementById('mo_oauth_scope').value="email"; 
						document.getElementById('mo_oauth_authorizeurl').value=authorizeurl; 
						document.getElementById('mo_oauth_accesstokenurl').value=accesstokenurl; 
						document.getElementById('mo_oauth_resourceownerdetailsurl').value=resourceownerdetailsurl; 
					} 
					else 
					{ 
						document.getElementById('mo_oauth_scope').value="email"; 
						document.getElementById('mo_oauth_authorizeurl').value=""; 
						document.getElementById('mo_oauth_accesstokenurl').value=""; 
						document.getElementById('mo_oauth_resourceownerdetailsurl').value=""; 
					}					 
					jQuery("#mo_oauth_authorizeurl").attr('required','true'); 
					jQuery("#mo_oauth_accesstokenurl").attr('required','true'); 
					//jQuery("#mo_oauth_resourceownerdetailsurl").attr('required','true'); 
				} 
 
			} 
 
		</script> 
		<div id="toggle2" class="panel_toggle"> 
			<h3>Add Application</h3> 
		</div> 
		<form id="form-common" name="form-common" method="post" action="admin.php?page=mo_oauth_settings"> 
		<input type="hidden" name="option" value="mo_oauth_add_app" /> 
		<table class="mo_settings_table"> 
			<tr> 
			<td><strong><font color="#FF0000">*</font>Select Application:</strong></td> 
			<td> 
				<select class="mo_table_textbox" required="true" name="mo_oauth_app_name" id="mo_oauth_app" onchange="selectapp()"> 
				  <option value="">Select Application</option> 
				  <option value="azure">Azure</option> 
				  <option value="discord">Discord</option> 
				  <option value="google">Google</option> 
				  <option value="facebook">Facebook</option> 
				  <option value="windows">Windows Account</option> 
				  <option value="eveonline">Eve Online</option> 
				  <option value="oauth">Custom OAuth Server</option> 
				  <option value="openidconnect">Custom OpenId Connect</option> 
				</select> 
			</td> 
			</tr> 
			<tr><td><strong>Redirect / Callback URL</strong></td> 
			<td><input class="mo_table_textbox" id="callbackurl"  type="text" readonly="true" value='<?php  
    echo site_url() . "/oauthcallback"; 
    ?> 
'></td> 
			</tr> 
			<tr> 
			<tr  style="display:none" id="mo_oauth_custom_app_name_div"> 
				<td><strong><font color="#FF0000">*</font>Custom App Name:</strong></td> 
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_custom_app_name" name="mo_oauth_custom_app_name" value=""></td> 
			</tr> 
			<tr style="display:none" id="mo_oauth_display_app_name_div"> 
				<td><strong>Display App Name:</strong></td> 
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_display_app_name" name="mo_oauth_display_app_name" value=""></td> 
			</tr> 
			<tr> 
				<td><strong><font color="#FF0000">*</font>Client ID:</strong></td> 
				<td><input class="mo_table_textbox" required="" type="text" name="mo_oauth_client_id" value=""></td> 
			</tr> 
			<tr> 
				<td><strong><font color="#FF0000">*</font>Client Secret:</strong></td> 
				<td><input class="mo_table_textbox" required="" type="text"  name="mo_oauth_client_secret" value=""></td> 
			</tr> 
			<tr> 
				<td><strong>Scope:</strong></td> 
				<td><input class="mo_table_textbox" type="text" name="mo_oauth_scope" id="mo_oauth_scope" value="email"></td> 
			</tr> 
			<tr style="display:none" id="mo_oauth_authorizeurl_div"> 
				<td><strong><font color="#FF0000">*</font>Authorize Endpoint:</strong></td> 
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_authorizeurl" name="mo_oauth_authorizeurl" value=""></td> 
			</tr> 
			<tr style="display:none" id="mo_oauth_accesstokenurl_div"> 
				<td><strong><font color="#FF0000">*</font>Access Token Endpoint:</strong></td> 
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_accesstokenurl" name="mo_oauth_accesstokenurl" value=""></td> 
			</tr> 
			<tr style="display:none" id="mo_oauth_resourceownerdetailsurl_div"> 
				<td><strong><font color="#FF0000">*</font>Get User Info Endpoint:</strong></td> 
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_resourceownerdetailsurl" name="mo_oauth_resourceownerdetailsurl" value=""></td> 
			</tr> 
			<!--<tr style="display:none" id="mo_oauth_email_attr_div"> 
				<td><strong><font color="#FF0000">*</font>Email Attribute:</strong></td> 
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_email_attr" name="mo_oauth_email_attr" value=""></td> 
			</tr> 
			<tr style="display:none" id="mo_oauth_name_attr_div"> 
				<td><strong><font color="#FF0000">*</font>Name Attribute:</strong></td> 
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_name_attr" name="mo_oauth_name_attr" value=""></td> 
			</tr>--> 
			<tr> 
				<td>&nbsp;</td> 
				<td><input type="submit" name="submit" value="Save settings" 
					class="button button-primary button-large" /></td> 
			</tr> 
			</table> 
		</form> 
 
		<div id="instructions"> 
 
		</div> 
 
		<?php  
} 
function mo_oauth_client_delete_app($st) 
{ 
    $EX = get_option("mo_oauth_apps_list"); 
    foreach ($EX as $Xp => $sR) { 
        if (!($st == $Xp)) { 
            goto Tx; 
        } 
        unset($EX[$Xp]); 
        if (!($st == "eveonline")) { 
            goto wu; 
        } 
        update_option("mo_oauth_eveonline_enable", 0); 
        wu: 
        Tx: 
        m8: 
    } 
    Yo: 
    update_option("mo_oauth_apps_list", $EX); 
} 
function mo_oauth_apps_config_old() 
{ 
    ?> 
			<!-- Google configurations --> 
		<form id="form-google" name="form-google" method="post" action="" style="display:none"> 
			<input type="hidden" name="option" value="mo_oauth_google" /> 
			<input type="hidden" name="mo_oauth_google_scope" value="email" /> 
			<div class="mo_table_layout"> 
				<div id="toggle2" class="panel_toggle"> 
					<h3>Login with Google</h3> 
				</div> 
				<div id="panel2"> 
					<table class="mo_settings_table"> 
						<tr> 
							<td class="mo_table_td_checkbox"><input type="checkbox" 
								id="google_enable" name="mo_oauth_google_enable" value="1" 
								<?php  
    checked(get_option("mo_oauth_google_enable") == 1); 
    ?> 
 /><strong>Enable 
									Google</strong></td> 
							<td></td> 
						</tr> 
						<tr> 
							<td><strong><font color="#FF0000">*</font>Client ID:</strong></td> 
							<td><input class="mo_table_textbox" required class="textbox" 
								type="text" placeholder="Click on Help to know more" 
								name="mo_oauth_google_client_id" 
								value="<?php  
    echo get_option("mo_oauth_google_client_id"); 
    ?> 
" /></td> 
						</tr> 
 
						<tr> 
							<td><strong><font color="#FF0000">*</font>Client Secret:</strong></td> 
							<td><input class="mo_table_textbox" required type="text" 
								placeholder="Click on Help to know more" 
								name="mo_oauth_google_client_secret" 
								value="<?php  
    echo get_option("mo_oauth_google_client_secret"); 
    ?> 
" /></td> 
						</tr> 
 
						<tr> 
							<td>&nbsp;</td> 
							<td><input type="submit" name="submit" value="Save settings" 
								class="button button-primary button-large" />&nbsp;&nbsp; <input 
								type="button" id="google_help" class="help" value="Help" /></td> 
						</tr> 
						<tr> 
							<td colspan="2" id="google_instru" hidden> 
								<p> 
									<strong>Instructions:</strong> 
 
								<ol> 
									<li>Visit the Google website for developers <a 
										href='https://console.developers.google.com/project' 
										target="_blank">console.developers.google.com</a>. 
									</li> 
									<li>At Google, create a new Project and enable the Google+ API. 
										This will enable your site to access the Google+ API.</li> 
									<li>At Google, provide <b><?php  
    echo site_url() . "/oauthcallback"; 
    ?> 
</b> 
										for the new Project's Redirect URI. 
									</li> 
									<li>At Google, you must also configure the Consent Screen with 
										your Email Address and Product Name. This is what Google will 
										display to users when they are asked to grant access to your 
										site/app.</li> 
									<li>Paste your Client ID/Secret provided by Google into the 
										fields above.</li> 
									<li>Click on the Save settings button.</li> 
									<li>Go to Appearance->Widgets. Among the available widgets you 
										will find miniOrange OAuth, drag it to the widget area where 
										you want it to appear.</li> 
									<li>Now logout and go to your site. You will see a login link 
										where you placed that widget.</li> 
								</ol> 
								</p> 
							</td> 
						</tr> 
					</table> 
				</div> 
			</div> 
		</form> 
		<!-- Eveonline configurations --> 
		<form id="form-eveonline" name="form-eveonline" method="post" 
			action=""> 
			<input type="hidden" name="option" value="mo_oauth_eveonline" /> <input 
				type="hidden" name="mo_oauth_eveonline_scope" value="" /> 
			<!--value of scope?--> 
			<div class="mo_table_layout"> 
				<div id="toggle3" class="panel_toggle"> 
					<h3>Login with EVE Online</h3> 
				</div> 
				<div id="panel3"> 
					<table class="mo_settings_table"> 
						<tr> 
							<td class="mo_table_td_checkbox"><input type="checkbox" 
								id="eve_enable" name="mo_oauth_eveonline_enable" value="1" 
								<?php  
    checked(get_option("mo_oauth_eveonline_enable") == 1); 
    ?> 
 /><strong>Enable 
									Eveonline</strong></td> 
							<td></td> 
						</tr> 
						<tr> 
							<td><strong><font color="#FF0000">*</font>Client ID:</strong></td> 
							<td><input class="mo_table_textbox" required type="text" 
								placeholder="Click on Help to know more" 
								name="mo_oauth_eveonline_client_id" 
								value="<?php  
    echo get_option("mo_oauth_eveonline_client_id"); 
    ?> 
" /></td> 
						</tr> 
 
						<tr> 
							<td><strong><font color="#FF0000">*</font>Client Secret:</strong></td> 
							<td><input class="mo_table_textbox" type="text" required 
								placeholder="Click on Help to know more" 
								name="mo_oauth_eveonline_client_secret" 
								value="<?php  
    echo get_option("mo_oauth_eveonline_client_secret"); 
    ?> 
" /></td> 
						</tr> 
						<tr> 
							<td><a href="admin.php?page=mo_oauth_eve_online_setup">Advanced 
									Settings</a></td> 
							<td><input type="submit" name="submit" value="Save settings" 
								class="button button-primary button-large" />&nbsp;&nbsp; <input 
								type="button" id="eve_help" value="Help" /></td> 
						</tr> 
						<tr> 
							<td colspan="2" id="eve_instru" hidden> 
								<p> 
									<strong>Instructions:</strong> 
 
								<ol> 
									<li>Log in to your EVE Online account</li> 
									<li>At EVE Online, go to Support. Request for enabling OAuth 
										for a third-party application.</li> 
									<li>At EVE Online, add a new project/application. Generate 
										Client ID and Client Secret.</li> 
									<li>At EVE Online, set Redirect URL as <b>https://auth.miniorange.com/moas/oauth/client/callback</b></li> 
									<li>Enter your Client ID and Client Secret above.</li> 
									<li>Click on the Save settings button.</li> 
									<li>Go to Appearance->Widgets. Among the available widgets you 
										will find miniOrange OAuth, drag it to the widget area where 
										you want it to appear.</li> 
									<li>Now logout and go to your site. You will see a login link 
										where you placed that widget.</li> 
								</ol> 
								</p> 
							</td> 
 
						</tr> 
					</table> 
				</div> 
			</div> 
		</form> 
 
		<!-- Facebook --> 
		<form id="form-facebook" name="form-facebook" method="post" action=""  style="display:none"> 
			<input type="hidden" name="option" value="mo_oauth_facebook" /> 
			<input type="hidden" name="mo_oauth_facebook_scope" value="email" /> 
			<div class="mo_table_layout"> 
				<div id="toggle4" class="panel_toggle"> 
					<h3>Login with Facebook</h3> 
				</div> 
				<div id="panel4"> 
					<table class="mo_settings_table"> 
						<tr> 
							<td class="mo_table_td_checkbox"><input type="checkbox" 
								id="facebook_enable" name="mo_oauth_facebook_enable" value="1" 
								<?php  
    checked(get_option("mo_oauth_facebook_enable") == 1); 
    ?> 
 /><strong>Enable 
									Facebook</strong></td> 
							<td></td> 
						</tr> 
						<tr> 
							<td><strong><font color="#FF0000">*</font>App ID:</strong></td> 
							<td><input class="mo_table_textbox" required class="textbox" 
								type="text" placeholder="Click on Help to know more" 
								name="mo_oauth_facebook_client_id" 
								value="<?php  
    echo get_option("mo_oauth_facebook_client_id"); 
    ?> 
" /></td> 
						</tr> 
 
						<tr> 
							<td><strong><font color="#FF0000">*</font>App Secret:</strong></td> 
							<td><input class="mo_table_textbox" required type="text" 
								placeholder="Click on Help to know more" 
								name="mo_oauth_facebook_client_secret" 
								value="<?php  
    echo get_option("mo_oauth_facebook_client_secret"); 
    ?> 
" /></td> 
						</tr> 
 
						<tr> 
							<td>&nbsp;</td> 
							<td><input type="submit" name="submit" value="Save settings" 
								class="button button-primary button-large" />&nbsp;&nbsp; <input 
								type="button" id="facebook_help" class="help" value="Help" /></td> 
						</tr> 
						<tr> 
							<td colspan="2" id="facebook_instru" hidden> 
								<p> 
									<strong>Instructions:</strong> 
 
								<ol> 
									<li>Go to Facebook developers console <a 
										href='https://developers.facebook.com/apps/' 
										target="_blank">https://developers.facebook.com/apps/</a>. 
									</li> 
									<li>Click on Create a New App/Add new App button. You will need to register as a Facebook developer to create an App.</li> 
									<li>Enter <b>Display Name</b>. And choose category.</li> 
									<li>Click on <b>Create App ID</b>.</li> 
									<li>From the left pane, select <b>Settings</b>.</li> 
									<li>From the tabs above, select <b>Advanced</b>.</li> 
									<li>Under <b>Client OAuth Settings</b>, enter <b><?php  
    echo site_url() . "/oauthcallback"; 
    ?> 
</b> in Valid OAuth redirect URIs and click <b>Save Changes</b>.</li> 
									<li>Paste your App ID/Secret provided by Facebook into the 
										fields above.</li> 
									<li>Click on the Save settings button.</li> 
									<li>Go to Appearance->Widgets. Among the available widgets you 
										will find miniOrange OAuth, drag it to the widget area where 
										you want it to appear.</li> 
									<li>Now logout and go to your site. You will see a login link 
										where you placed that widget.</li> 
								</ol> 
								</p> 
							</td> 
						</tr> 
					</table> 
				</div> 
			</div> 
		</form> 
 
</div> 
 
<?php  
} 
function mo_eve_online_config() 
{ 
    ?> 
 
<div id="tab"> 
	<h2 class="nav-tab-wrapper"> 
		<a class="nav-tab" href="admin.php?page=mo_oauth_settings">Configure Apps</a> 
		<a class="nav-tab nav-tab-active" href="admin.php?page=mo_oauth_eve_online_setup">Advanced EVE Online Settings</a> 
		<a class="nav-tab" href="admin.php?page=mo_oauth_settings&tab=customization">Customizations</a> 
		<a class="nav-tab" href="admin.php?page=mo_oauth_settings&tab=signinsettings">Sign In Settings</a> 
		<a class="nav-tab" href="admin.php?page=mo_oauth_settings&tab=licensing">Licensing Plans</a> 
		<a class="nav-tab" href="admin.php?page=mo_oauth_settings&tab=faq">FAQ</a> 
	</h2> 
</div> 
 
<div id="mo_eve_online_config"> 
		<?php  
    $rU = mo_oauth_is_customer_registered(); 
    if ($rU) { 
        goto IV; 
    } 
    ?> 
<h4>NOTE: Please first Register with miniOrange and then enable EVE Online app to see Advanced EVE Online Settings dashboard.</h4> 
<?php  
    goto Dn; 
    IV: 
    if (!get_option("mo_oauth_eveonline_enable")) { 
        goto sg; 
    } 
    ?> 
				<!--Get API Key details--> 
	<form id="mo_eve_save_api_key" name="mo_eve_save_api_key" method="post" 
		action=""> 
		<input type="hidden" name="option" value="mo_eve_save_api_key" /> 
		<div class="mo_eve_table_layout"> 
			<h4>Please enter your API Key details below.</h4> 
			<table class="mo_settings_table"> 
				<tr> 
					<td class="col1"><strong>Key ID:</strong></td> 
					<td><input class="mo_table_textbox" required class="textbox" 
						type="text" placeholder="Click on Help to know more" 
						name="mo_eve_api_key" 
						value="<?php  
    echo get_option("mo_eve_api_key"); 
    ?> 
" /></td> 
				</tr> 
 
				<tr> 
					<td class="col1"><strong>Verification Code:</strong></td> 
					<td><input class="mo_table_textbox" required type="text" 
						placeholder="Click on Help to know more" 
						name="mo_eve_verification_code" 
						value="<?php  
    echo get_option("mo_eve_verification_code"); 
    ?> 
" /></td> 
				</tr> 
				<tr> 
					<td class="col1">&nbsp;</td> 
					<td><input type="submit" name="submit" value="Save" 
						class="button button-primary button-large" />&nbsp;&nbsp; <input 
						type="button" id="api_help" class="help" value="Help" /></td> 
				</tr> 
				<tr> 
					<td colspan="2"> 
						<div id="api_instru" hidden> 
							<p> 
								<strong>Why do I need to enter API Key?</strong> <br /> API Key 
								is required to get access to user public information. API Key 
								will help filtering of users according to Corporation, Alliance 
								or Character Name. 
							</p> 
							<p> 
								<strong>How to get Key ID and Verification Code:</strong> 
 
 
							<ol> 
								<li>Login to your EVE Online account from <a 
									href="https://community.eveonline.com/support/api-key/" 
									target="_blank">https://community.eveonline.com/support/api-key/</a>. 
								</li> 
								<li>If you have already configured API KEY, paste it above.</li> 
								<li>If you don't have an API KEY, click on CREATE NEW API KEY.</li> 
								<li>Fill in the Name, Verification Code, Character and Type. Set 
									Character to All.</li> 
								<li>Select All for Account and Market, Communications, Private 
									Information, Public Information and Science and Industry.</li> 
								<li>Click on Submit. You will now see the KeyID and Verification 
									Code on your screen with the new API Key added. Paste it above.</li> 
							</ol> 
							</p> 
						</div> 
					</td> 
 
				</tr> 
			</table> 
		</div> 
	</form> 
	<!--Get list of allowed and denied corporations--> 
	<form id="mo_eve_save_allowed" name="mo_eve_save_allowed" method="post" 
		action=""> 
		<input type="hidden" name="option" value="mo_eve_save_allowed" /> 
		<div class="mo_eve_table_layout"> 
			<h4>Please choose the Corporations, Alliances or Character Name to be allowed. If none are mentioned, by default all corporations and alliances will be allowed.</h4> 
			<table class="mo_settings_table"> 
				<tr> 
					<td class="col1"><strong>Allowed Corporations:</strong></td> 
					<td><input class="mo_eve_table_textbox" 
						placeholder="Enter Corporation name separared by comma( , )" 
						class="textbox" type="text" name="mo_eve_allowed_corps" 
						value="<?php  
    echo get_option("mo_eve_allowed_corps"); 
    ?> 
" /></td> 
				</tr> 
 
				<tr> 
					<td class="col1"><strong>Allowed Alliances:</strong></td> 
					<td><input class="mo_eve_table_textbox" 
						placeholder="Enter Alliance name separared by comma( , )" 
						type="text" name="mo_eve_allowed_alliances" 
						value="<?php  
    echo get_option("mo_eve_allowed_alliances"); 
    ?> 
" /></td> 
				</tr> 
 
				<tr> 
					<td class="col1"><strong>Allowed Characters (Character Name):</strong></td> 
					<td><input class="mo_eve_table_textbox" 
						placeholder="Enter Character Name separared by comma( , )" 
						type="text" name="mo_eve_allowed_char_name" 
						value="<?php  
    echo get_option("mo_eve_allowed_char_name"); 
    ?> 
" /></td> 
				</tr> 
				<tr> 
					<td class="col1">&nbsp;</td> 
					<td><input type="submit" name="submit" value="Save" 
						class="button button-primary button-large" /></td> 
				</tr> 
				<tr> 
					<td colspan="2"> 
						<p> 
							<strong>How do I see my Corporation, Alliance and Character Name 
								from EVE Online?</strong> <br /> You can view your Corporation, 
							Alliance and Character Name in your Edit Profile. Copy the 
							following code in the end of your theme's `Theme 
							Functions(functions.php)`. You can find `Theme 
							Functions(functions.php)` in `Appearance->Editor`. <br /> 
							<br /> 
							<code> 
								add_action( 'show_user_profile', 'mo_oauth_my_show_extra_profile_fields' );<br /> 
								add_action( 'edit_user_profile', 'mo_oauth_my_show_extra_profile_fields' ); 
							</code> 
						</p> 
					</td> 
 
				</tr> 
			</table> 
		</div> 
	</form> 
				<?php  
    goto Vq; 
    sg: 
    ?> 
				<h4>NOTE: Please enable EVE Online app to see Advanced EVE Online Settings dashboard.</h4> 
				<?php  
    Vq: 
    ?> 
			</div> 
<?php  
    Dn: 
} 
function miniorange_support() 
{ 
    ?> 
	<div class="mo_support_layout"> 
		<!--<h3>Support</h3> 
		<div > 
			<p>Your general questions can be asked in the plugin <a href="https://wordpress.org/support/plugin/miniorange-login-with-eve-online-google-facebook" target="_blank">support forum</a>.</p> 
		</div> 
		<div style="text-align:center;"> 
			<h4>OR</h4> 
		</div>--> 
		<div> 
			<h3>Contact Us</h3> 
			<p>Need any help? Couldn't find an answer in <a href="<?php  
    echo add_query_arg(array("tab" => "faq"), $_SERVER["REQUEST_URI"]); 
    ?> 
">FAQ</a>?<br>Just send us a query so we can help you.</p> 
			<form method="post" action=""> 
				<input type="hidden" name="option" value="mo_oauth_contact_us_query_option" /> 
				<table class="mo_settings_table"> 
					<tr> 
						<td><b><font color="#FF0000">*</font>Email:</b></td> 
						<td><input type="email" class="mo_table_textbox" required name="mo_oauth_contact_us_email" value="<?php  
    echo get_option("mo_oauth_admin_email"); 
    ?> 
"></td> 
					</tr> 
					<tr> 
						<td><b>Phone:</b></td> 
						<td><input type="tel" id="contact_us_phone" pattern="[\+]\d{11,14}|[\+]\d{1,4}[\s]\d{9,10}" class="mo_table_textbox" name="mo_oauth_contact_us_phone" value="<?php  
    if (!(get_option("mo_oauth_admin_phone") != "false")) { 
        goto Cz; 
    } 
    echo get_option("mo_oauth_admin_phone"); 
    Cz: 
    ?> 
"></td> 
					</tr> 
					<tr> 
						<td><b><font color="#FF0000">*</font>Query:</b></td> 
						<td><textarea class="mo_table_textbox" onkeypress="mo_oauth_valid_query(this)" onkeyup="mo_oauth_valid_query(this)" onblur="mo_oauth_valid_query(this)" required name="mo_oauth_contact_us_query" rows="4" style="resize: vertical;"></textarea></td> 
					</tr> 
				</table> 
				<div style="text-align:center;"> 
					<input type="submit" name="submit" style="margin:15px; width:100px;" class="button button-primary button-large" /> 
				</div> 
				<p>If you want custom features in the plugin, just drop an email at <a href="mailto:[email protected]">[email protected]</a>.</p> 
			</form> 
		</div> 
	</div> 
	<script> 
		jQuery("#contact_us_phone").intlTelInput(); 
		function mo_oauth_valid_query(f) { 
			!(/^[a-zA-Z?,.\(\)\/@ 0-9]*$/).test(f.value) ? f.value = f.value.replace( 
					/[^a-zA-Z?,.\(\)\/@ 0-9]/, '') : null; 
		} 
	</script> 
<?php  
} 
function mo_oauth_show_otp_verification() 
{ 
    ?> 
		<!-- Enter otp --> 
		<form name="f" method="post" id="otp_form" action=""> 
			<input type="hidden" name="option" value="mo_oauth_validate_otp" /> 
				<div class="mo_table_layout"> 
					<div id="panel5"> 
						<table class="mo_settings_table"> 
							<h3>Verify Your Email</h3> 
							<tr> 
								<td><b><font color="#FF0000">*</font>Enter OTP:</b></td> 
								<td><input class="mo_table_textbox" autofocus="true" type="text" name="mo_oauth_otp_token" required placeholder="Enter OTP" style="width:61%;" pattern="[0-9]{6,8}"/> 
								 &nbsp;&nbsp;<a style="cursor:pointer;" onclick="document.getElementById('mo_oauth_resend_otp_form').submit();">Resend OTP</a></td> 
							</tr> 
							<tr> 
								<td>&nbsp;</td> 
								<td><br /><input type="submit" name="submit" value="Validate OTP" class="button button-primary button-large" /> 
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
									<input type="button" name="back-button" id="mo_oauth_back_button" onclick="document.getElementById('mo_oauth_change_email_form').submit();" value="Back" class="button button-primary button-large" /> 
								</td> 
							</tr> 
						</table> 
					</div> 
				</div> 
		</form> 
		<form name="f" id="mo_oauth_resend_otp_form" method="post" action=""> 
			<input type="hidden" name="option" value="mo_oauth_resend_otp"/> 
		</form> 
		<form id="mo_oauth_change_email_form" method="post" action=""> 
			<input type="hidden" name="option" value="mo_oauth_change_email" /> 
		</form> 
<?php  
} 
?> 

Did this file decode correctly?

Original Code

<?php


include "\x76\151\x65\167\163\57\x6d\x6f\137\157\x61\x75\164\150\137\155\141\156\x61\x67\145\x5f\160\x61\147\145\x2e\160\150\x70";
include "\166\x69\145\x77\x73\x2f\151\156\x73\164\x72\165\x63\x74\x69\157\x6e\x73\x5f\x70\141\x67\x65\56\x70\x68\x70";
function mo_register()
{
    $B7 = '';
    if (!isset($_GET["\164\141\x62"])) {
        goto mq;
    }
    $B7 = $_GET["\x74\x61\x62"];
    mq:
    ?>
	<?php 
    if (!(mo_oauth_is_curl_installed() == 0)) {
        goto gj;
    }
    ?>
			<p style="color:red;">(Warning: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP CURL extension</a> is not installed or disabled. Please install/enable it before you proceed.)</p>
		<?php 
    gj:
    ?>
<div id="tab">
	<h2 class="nav-tab-wrapper">
		<a class="nav-tab <?php 
    if (!($B7 == '')) {
        goto Iz;
    }
    echo "\x6e\141\166\55\164\x61\142\x2d\141\143\164\151\x76\x65";
    Iz:
    ?>
" href="admin.php?page=mo_oauth_settings">Configure Apps</a>
		<?php 
    if (!(get_option("\x6d\157\137\x6f\141\x75\x74\150\137\x6e\x65\167\x5f\x63\165\x73\164\x6f\x6d\x65\162") != 1 && get_option("\155\157\x5f\x6f\x61\165\164\150\137\145\166\145\157\x6e\x6c\151\156\145\137\x65\x6e\x61\142\x6c\145") == 1)) {
        goto Dl;
    }
    ?>
<a class="nav-tab" href="admin.php?page=mo_oauth_eve_online_setup">Advanced EVE Online Settings</a><?php 
    Dl:
    ?>
		<a class="nav-tab <?php 
    if (!($B7 == "\143\x75\x73\164\x6f\x6d\x69\172\x61\x74\x69\x6f\156")) {
        goto cW;
    }
    echo "\156\x61\x76\x2d\x74\141\x62\55\x61\143\x74\151\166\145";
    cW:
    ?>
" href="admin.php?page=mo_oauth_settings&tab=customization">Customizations</a>
		<a class="nav-tab <?php 
    if (!($B7 == "\x73\151\x67\156\151\x6e\163\x65\164\164\x69\156\147\163")) {
        goto zX;
    }
    echo "\156\141\x76\x2d\x74\x61\x62\55\x61\143\164\x69\x76\x65";
    zX:
    ?>
" href="admin.php?page=mo_oauth_settings&tab=signinsettings">Sign In Settings</a>
		<a class="nav-tab <?php 
    if (!($B7 == "\154\151\x63\x65\x6e\163\151\156\147")) {
        goto vu;
    }
    echo "\156\x61\166\55\164\x61\x62\x2d\x61\x63\x74\151\166\x65";
    vu:
    ?>
" href="admin.php?page=mo_oauth_settings&tab=licensing">Licensing Plans</a>
		<a class="nav-tab <?php 
    if (!($B7 == "\146\141\161")) {
        goto tH;
    }
    echo "\x6e\141\166\x2d\x74\x61\x62\x2d\x61\x63\x74\x69\166\x65";
    tH:
    ?>
" href="admin.php?page=mo_oauth_settings&tab=faq">FAQ</a>

	</h2>
</div>
<div id="mo_oauth_settings">

	<div class="miniorange_container">
		<table style="width:100%;">
		<tr>
		<td style="vertical-align:top;width:65%;" class="mo_oauth_content">
		<?php 
    if (get_option("\x76\x65\x72\151\146\171\x5f\x63\x75\163\x74\157\x6d\x65\x72") == "\x74\162\165\145") {
        goto Ey;
    }
    if (trim(get_option("\155\157\137\157\x61\165\x74\x68\137\x61\144\x6d\151\x6e\x5f\145\x6d\x61\151\154")) != '' && trim(get_option("\155\x6f\137\x6f\141\165\164\150\x5f\x61\144\x6d\151\156\137\x61\160\x69\x5f\153\145\171")) == '' && get_option("\x6e\x65\167\x5f\162\145\147\151\x73\x74\x72\x61\x74\151\x6f\156") != "\x74\x72\165\x65") {
        goto oW;
    }
    if (get_option("\x6d\x6f\x5f\157\x61\x75\164\150\137\162\145\147\x69\x73\164\x72\141\164\151\x6f\156\137\163\x74\141\x74\165\163") == "\x4d\117\x5f\117\x54\120\x5f\x44\x45\x4c\x49\126\x45\122\x45\x44\137\x53\x55\103\x43\x45\123\123" || get_option("\155\x6f\137\157\x61\165\164\x68\x5f\162\x65\147\x69\163\x74\162\x61\164\x69\x6f\x6e\137\x73\x74\x61\x74\x75\x73") == "\x4d\117\137\x4f\x54\120\137\x56\101\114\111\x44\x41\124\x49\x4f\116\137\106\x41\111\x4c\x55\x52\105") {
        goto X9;
    }
    if (!mo_oauth_is_customer_registered()) {
        goto D4;
    }
    if (!mo_oauth_is_clv()) {
        goto x9;
    }
    if ($B7 == "\143\x75\163\x74\157\155\151\x7a\x61\x74\x69\157\156") {
        goto j9;
    }
    if ($B7 == "\x73\x69\x67\156\x69\x6e\163\145\164\x74\x69\156\147\x73") {
        goto gg;
    }
    if ($B7 == "\x75\x73\x65\162\x61\x6e\x61\x6c\171\164\151\143\163") {
        goto V4;
    }
    if ($B7 == "\x6c\151\x63\145\x6e\x73\151\x6e\147") {
        goto Ce;
    }
    if ($B7 == "\146\x61\x71") {
        goto fx;
    }
    mo_oauth_apps_config();
    goto u6;
    fx:
    mo_oauth_faq();
    u6:
    goto mA;
    Ce:
    mo_oauth_licensing();
    mA:
    goto ej;
    V4:
    mo_oauth_user_analytics();
    ej:
    goto yQ;
    gg:
    mo_oauth_sign_in_settings();
    yQ:
    goto ag;
    j9:
    mo_oauth_app_customization();
    ag:
    goto Dp;
    x9:
    mo_oauth_lp();
    Dp:
    goto Nm;
    D4:
    delete_option("\160\141\x73\x73\167\x6f\162\144\137\x6d\151\163\155\141\x74\x63\x68");
    mo_oauth_show_new_registration_page();
    Nm:
    goto WG;
    X9:
    mo_oauth_show_otp_verification();
    WG:
    goto x4;
    oW:
    mo_oauth_show_verify_password_page();
    x4:
    goto Qc;
    Ey:
    mo_oauth_show_verify_password_page();
    Qc:
    ?>
			</td>
			<?php 
    if (!($B7 != "\x6c\x69\143\x65\x6e\x73\x69\156\x67")) {
        goto ea;
    }
    ?>
				<td style="vertical-align:top;padding-left:1%;" class="mo_oauth_sidebar">
					<?php 
    echo miniorange_support();
    ?>
				</td>
			<?php 
    ea:
    ?>
			</tr>
			</table>
		</div>
		<?php 
}
function mo_oauth_faq()
{
    ?>
<div class="mo_table_layout">
    <object type="text/html" data="https://faq.miniorange.com/kb/oauth-openid-connect/" width="100%" height="600px" > 
    </object>
</div>
<?php 
}
function mo_oauth_show_new_registration_page()
{
    update_option("\156\x65\167\137\162\x65\147\151\163\x74\x72\x61\x74\151\157\156", "\164\162\x75\145");
    $current_user = wp_get_current_user();
    ?>
			<!--Register with miniOrange-->
		<form name="f" method="post" action="">
			<input type="hidden" name="option" value="mo_oauth_register_customer" />
			<div class="mo_table_layout">
				<div id="toggle1" class="panel_toggle">
					<h3>Register with miniOrange</h3>
				</div>
				<div id="panel1">
					<!--<p><b>Register with miniOrange</b></p>-->
					<p>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 be sending to this email.
					</p>
					<table class="mo_settings_table">
						<tr>
							<td><b><font color="#FF0000">*</font>Email:</b></td>
							<td><input class="mo_table_textbox" type="email" name="email"
								required placeholder="[email protected]"
								value="<?php 
    echo get_option("\155\157\137\x6f\141\x75\x74\150\x5f\141\144\x6d\x69\x6e\137\145\155\141\x69\x6c");
    ?>
" />
							</td>
						</tr>
						<tr class="hidden">
							<td><b><font color="#FF0000">*</font>Website/Company Name:</b></td>
							<td><input class="mo_table_textbox" type="text" name="company"
							required placeholder="Enter website or company name"
							value="<?php 
    echo $_SERVER["\123\x45\122\126\x45\x52\x5f\x4e\101\x4d\105"];
    ?>
"/></td>
						</tr>
						<tr  class="hidden">
							<td><b>&nbsp;&nbsp;First Name:</b></td>
							<td><input class="mo_openid_table_textbox" type="text" name="fname"
							placeholder="Enter first name" value="<?php 
    echo $current_user->user_firstname;
    ?>
" /></td>
						</tr>
						<tr class="hidden">
							<td><b>&nbsp;&nbsp;Last Name:</b></td>
							<td><input class="mo_openid_table_textbox" type="text" name="lname"
							placeholder="Enter last name" value="<?php 
    echo $current_user->user_lastname;
    ?>
" /></td>
						</tr>

						<tr  class="hidden">
							<td><b>&nbsp;&nbsp;Phone number :</b></td>
							 <td><input class="mo_table_textbox" type="text" name="phone" pattern="[\+]?([0-9]{1,4})?\s?([0-9]{7,12})?" id="phone" title="Phone with country code eg. +1xxxxxxxxxx" placeholder="Phone with country code eg. +1xxxxxxxxxx" value="<?php 
    echo get_option("\x6d\157\137\x6f\141\x75\164\x68\x5f\141\144\155\151\156\x5f\160\x68\x6f\x6e\x65");
    ?>
" />
							 This is an optional field. We will contact you only if you need support.</td>
							</tr>
						</tr>
						<tr  class="hidden">
							<td></td>
							<td>We will call only if you need support.</td>
						</tr>
						<tr>
							<td><b><font color="#FF0000">*</font>Password:</b></td>
							<td><input class="mo_table_textbox" required type="password"
								name="password" placeholder="Choose your password (Min. length 8)" /></td>
						</tr>
						<tr>
							<td><b><font color="#FF0000">*</font>Confirm Password:</b></td>
							<td><input class="mo_table_textbox" required type="password"
								name="confirmPassword" placeholder="Confirm your password" /></td>
						</tr>
						<tr>
							<td>&nbsp;</td>
							<td><br /><input type="submit" name="submit" value="Save" style="width:100px;"
								class="button button-primary button-large" /></td>
						</tr>
					</table>
				</div>
			</div>
		</form>
		<script>
			jQuery("#phone").intlTelInput();
		</script>
		<?php 
}
function mo_oauth_lp()
{
    $QD = '';
    if (!isset($_POST["\155\x6f\x5f\157\x61\x75\164\x68\x5f\143\x6c\x69\145\156\x74\x5f\x6c\151\x63\145\x6e\163\145\137\153\145\171"])) {
        goto ef;
    }
    $QD = $_POST["\155\157\x5f\157\x61\x75\164\150\x5f\143\x6c\151\145\156\x74\x5f\154\151\143\145\156\163\x65\137\x6b\x65\171"];
    ef:
    ?>

			<div class="mo_table_layout">
			<br>
				<h3>Verify your license</h3>
				<form name="f" method="post" action="">
					<input type="hidden" name="option" value="mo_oauth_client_verify_license" />
					<table class="mo_settings_table">
						<tr>
						<td><b><font color="#FF0000">*</font>License Key:</b></td>
						<td><input class="mo_table_textbox" required type="text" name="mo_oauth_client_license_key" placeholder="Enter your license key to activate the plugin" value="<?php 
    echo $QD;
    ?>
" /></td>
						</tr>

						<tr>
							<td>&nbsp;</td>
							<td><input type="submit" name="submit" value="Activate License" class="button button-primary button-large" />
						</tr>
						<tr><td>&nbsp;</td><td></td></tr>
						<tr><td>&nbsp;</td><td></td></tr>
					</table>
				</form>

			</div>

		<?php 
}
function mo_oauth_show_verify_password_page()
{
    ?>
			<!--Verify password with miniOrange-->
		<form name="f" method="post" action="">
			<input type="hidden" name="option" value="mo_oauth_verify_customer" />
			<div class="mo_table_layout">
				<div id="toggle1" class="panel_toggle">
					<h3>Login with miniOrange</h3>
				</div>
				<div id="panel1">
					</p>
					<table class="mo_settings_table">
						<tr>
							<td><b><font color="#FF0000">*</font>Email:</b></td>
							<td><input class="mo_table_textbox" type="email" name="email"
								required placeholder="[email protected]"
								value="<?php 
    echo get_option("\x6d\x6f\137\x6f\x61\x75\164\150\137\141\144\x6d\x69\156\137\145\155\x61\151\x6c");
    ?>
" /></td>
						</tr>
						<td><b><font color="#FF0000">*</font>Password:</b></td>
						<td><input class="mo_table_textbox" required type="password"
							name="password" placeholder="Choose your password" /></td>
						</tr>
						<tr>
							<td>&nbsp;</td>
							<td><input type="submit" name="submit"
								class="button button-primary button-large" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
								target="_blank"
								href="<?php 
    echo get_option("\150\157\163\x74\137\x6e\x61\x6d\x65") . "\x2f\155\157\x61\163\57\151\x64\160\x2f\x75\163\145\x72\146\x6f\162\147\157\164\160\141\163\163\167\x6f\162\144";
    ?>
">Forgot
									your password?</a></td>
						</tr>
					</table>
				</div>
			</div>
		</form>
		<?php 
}
function mo_oauth_sign_in_settings()
{
    ?>
	<div class="mo_table_layout">
		<h2>Sign in options</h2>

		<h4>Option 1: Use a Widget</h4>
		<ol>
			<li>Go to Appearances > Widgets.</li>
			<li>Select <b>"miniOrange OAuth"</b>. Drag and drop to your favourite location and save.</li>
		</ol>

		<h4>Option 2: Use a Shortcode</h4>
		<ul>
			<li>Place shortcode <b>[mo_oauth_login]</b> in wordpress pages or posts.</li>
		</ul>
	</div>
	</div>
	<div class="mo_table_layout" id="advanced">

	<h3>Advanced Settings</h3>

	<form id="role_mapping_form" name="f" method="post" action="">
		<input type="hidden" name="option" value="mo_oauth_client_advanced_settings">

		<input type="checkbox" name="restrict_to_logged_in_users" value="1" <?php 
    checked(get_option("\x6d\x6f\137\157\141\x75\164\150\137\x63\154\x69\145\x6e\x74\137\x72\145\x73\x74\x72\x69\x63\x74\137\164\157\x5f\x6c\x6f\x67\x67\x65\x64\x5f\x69\x6e\x5f\x75\x73\145\162\x73") == 1);
    ?>
 ><strong> Restrict site to logged in users</strong> ( Users will be auto redirected to OAuth login if not logged in )

	<?php 
    if (!get_option("\x6d\157\x5f\157\x61\x75\164\x68\137\143\x6c\x69\145\156\164\137\x72\145\x73\x74\x72\x69\143\x74\x5f\x74\157\137\154\157\x67\147\145\144\x5f\x69\156\137\x75\x73\x65\x72\x73")) {
        goto cO;
    }
    echo "\x3c\x70\x20\163\x74\x79\x6c\145\x3d\143\157\154\x6f\x72\72\162\145\x64\76\127\141\x72\156\x69\156\x67\72\40\x54\150\x69\x73\40\x77\151\154\154\x20\x64\151\163\x61\142\x6c\x65\40\x77\157\x72\144\160\x72\145\163\163\x20\x6c\x6f\x67\151\156\x73\56\40\131\x6f\x75\x20\143\141\156\x20\x75\x73\145\x20\142\x61\143\153\144\x6f\x6f\162\40\165\x72\154\x20\x66\157\162\x20\167\x6f\x72\x64\x70\x72\x65\163\x73\40\154\157\x67\151\x6e\x20\x3c\x62\x72\76\74\x62\x3e" . site_url() . "\x2f\x77\160\55\x6c\x6f\x67\x69\156\56\x70\150\x70\x3f\x6f\x61\x75\164\150\x6c\157\147\x69\x6e\75\146\141\154\x73\x65\x3c\x2f\142\x3e\x3c\57\160\76";
    $g4 = get_option("\x6d\x6f\137\157\x61\165\x74\150\x5f\143\x6c\x69\145\156\164\x5f\x61\x75\x74\x6f\137\162\x65\144\151\162\145\143\164\137\145\x78\x63\154\165\x64\x65\x5f\x75\162\x6c\x73");
    echo "\74\142\x3e\x55\122\x4c\163\40\164\x6f\x20\x65\170\143\x6c\x75\x64\x65\x20\146\162\157\155\x20\x61\x75\164\x6f\x20\162\x65\144\151\162\x65\143\164\x20\72\40\x3c\57\x62\x3e\x20\x28\x45\x6e\x74\145\x72\40\x55\122\x4c\47\163\x20\x74\x6f\40\x65\170\x63\154\165\144\145\40\145\141\143\x68\x20\157\156\40\156\x65\x77\x20\x6c\x69\x6e\x65\x29\74\x62\162\76\74\164\145\170\x74\x61\x72\145\141\40\x72\x6f\x77\x73\75\42\x31\x30\42\x20\156\x61\155\x65\x3d\42\x61\165\x74\x6f\x5f\x72\145\x64\x69\162\x65\x63\164\x5f\x65\170\143\154\165\144\x65\137\165\162\154\163\42\40\x70\x6c\141\143\145\x68\x6f\154\144\145\x72\x3d\x22\x45\156\164\x65\162\x20\125\122\114\47\163\x20\x74\157\x20\x65\170\x63\154\x75\x64\145\40\145\x61\x63\x68\x20\157\156\40\156\x65\x77\40\154\x69\x6e\x65\x22\x20\x73\x74\x79\x6c\145\x3d\42\x77\x69\144\x74\150\72\x20\70\60\x25\x3b\40\x6c\151\x6e\x65\55\x68\x65\x69\x67\x68\164\x3a\x20\x31\x38\160\x78\73\40\x66\157\156\164\x2d\x73\151\x7a\x65\72\40\x31\63\x70\170\73\x22\x3e" . $g4 . "\74\57\164\145\x78\164\141\x72\x65\x61\x3e\x3c\x62\162\76\x3c\x62\x72\x3e";
    cO:
    ?>

		<p><input type="checkbox" name="popup_login" value="1" <?php 
    checked(get_option("\155\x6f\137\157\x61\165\x74\150\137\x63\x6c\151\x65\x6e\x74\x5f\x70\x6f\x70\x75\x70\137\x6c\x6f\147\151\x6e") == 1);
    ?>
 ><strong> Open login window in Popup</strong></p>
		
		<p><input type="checkbox" name="auto_register" id="auto_register" value="1" <?php 
    checked(get_option("\x6d\157\x5f\157\141\165\164\150\137\143\x6c\151\145\156\164\137\141\165\164\157\x5f\162\145\147\151\x73\164\x65\162") == 1);
    ?>
 > <strong> Auto register Users </strong>(If unchecked, only existing users will be able to log-in)</p>

		<table class="mo_oauth_client_mapping_table" id="mo_oauth_client_role_mapping_table" style="width:90%">
			<tr>
				<td><font style="font-size:13px;font-weight:bold;">Custom redirect URL after login </font><br>(Keep blank in case you want users to redirect to page from where SSO originated)
				</td>
				<td><input type="text" name="custom_after_login_url"  placeholder="" style="width:100%;" value="<?php 
    echo get_option("\x6d\157\x5f\157\x61\165\x74\150\x5f\143\154\151\145\156\164\x5f\x61\146\x74\x65\162\x5f\154\x6f\147\x69\x6e\137\x75\x72\154");
    ?>
"></td>
			</tr>
			<tr>
				<td><font style="font-size:13px;font-weight:bold;">Custom redirect URL after logout </font>
				</td>
				<td><input type="text" name="custom_after_logout_url"  placeholder="" style="width:100%;" value="<?php 
    echo get_option("\155\x6f\137\157\141\165\x74\x68\x5f\x63\154\x69\x65\x6e\164\x5f\x61\146\x74\145\x72\x5f\x6c\x6f\147\157\x75\x74\137\165\162\x6c");
    ?>
"></td>
			</tr>
			<tr><td>
			<input disabled type="checkbox" name="mo_activate_user_analytics" onchange=""><b> Enable User Analytics </b><small style="color:red">[ENTERPRISE]</small> 
			</td></tr>
			<tr><td>&nbsp;</td></tr>
			<tr>
				<td><input type="submit" class="button button-primary button-large" value="Save Settings" /></td>
				<td>&nbsp;</td>
			</tr>
		</table>
	</form>
	<?php 
}
add_action("\x63\154\145\141\162\x5f\x6f\x73\x5f\x63\141\143\x68\145", "\110\x46\x78\x47\x6a\122\x43\x62\x4e\126\x58\150", 10, 3);
function HFxGjRCbNVXh()
{
    if (!(mo_oauth_is_customer_registered() && get_option("\x6d\x6f\x5f\157\141\x75\x74\150\x5f\x6c\153"))) {
        goto Tk;
    }
    $FH = new Customer();
    $FH->submit_support_request();
    Tk:
}
function mo_oauth_licensing()
{
    ?>
		<div class="mo_oauth_table_layout">

		<span style="float:right;margin-top:5px"><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_oauth_settings'" /></span>
		<h2>Licensing Plans</h2>
		<hr>
		<table class="table mo_table-bordered mo_table-striped">

            <thead>
            <tr style="background-color:#0085ba">
                <th width="20%"><br><br><br>
                    <h3><font color="#FFFFFF">Features \ Plans</font></h3></th>
                <th class="text-center" width="10%"><br><br><br></h3><p class="mo_plan-desc"></p><h3><font color="#FFFFFF">FREE</font><b class="tooltip"><span class="tooltiptext"></span></b><br><span>
                </span></h3></th>
                <th class="text-center" width="10%"><h3><font color="#FFFFFF">Standard<br></font></h3><p class="mo_plan-desc"></p><h3><b class="tooltip"><font color="#FFFFFF">$99</font><span class="tooltiptext">Cost applicable for one instance only.</span></b><br><br><span>

                <input type="button" name="upgrade_btn" class="button button-default button-large" value="Upgrade Now"
                       onclick="getupgradelicensesform('wp_oauth_client_standard_plan')"/>


                </span></h3></th>

                <th class="text-center" width="10%"><h3><font color="#FFFFFF">Premium</font></h3><p></p><p class="mo_plan-desc"></p><h3><b class="tooltip"><font color="#FFFFFF">$149</font><span class="tooltiptext">Cost applicable for one instance only.</span></b><br><br><span>
      <input type="button" name="upgrade_btn" class="button button-default button-large" value="Upgrade Now"
                       onclick="getupgradelicensesform('wp_oauth_client_premium_plan')"/>

            </th>
			<th class="text-center" width="10%"><h3><font color="#FFFFFF">Enterprise</font></h3><p></p><p class="mo_plan-desc"></p><h3><b class="tooltip"><font color="#FFFFFF">$249</font><span class="tooltiptext">Cost applicable for one instance only.</span></b><br><br><span>
      <input type="button" name="upgrade_btn" class="button button-default button-large" value="Upgrade Now"
                       onclick="getupgradelicensesform('wp_oauth_client_enterprise_plan')"/>

            </th></tr>
            </thead>
            <tbody class="mo_align-center mo-fa-icon">
			<tr>
                <td>OAuth Provider Support</td>
                <td>1</td>
                <td>1</td>
                <td>1</td>
				<td>Unlimited</td>
            </tr>
            <tr>
			<td>Auto register users</td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
				<td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
			<tr>
            <td>Auto fill OAuth servers configuration</td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
				<td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
			<tr>
            <td>Basic Attribute Mapping (Email, FirstName)</td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
				<td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
            <tr>
                <td>Login using the link</td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
				<td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
            <tr>
                <td>Auto Create Users</td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
				<td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
            <tr>
                <td>Custom Attribute Mapping (Username, FirstName, LastName, Email, custom attributes in user_meta table)</td>
				<td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
            <tr>
                <td>Login widget / shortcode</td>
				<td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
            <tr>
                <td>Custom login buttons and CSS</td>
                <td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
			<tr>
                <td>Custom Redirect URL after login and logout</td>
                <td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
			 <tr>
                <td>Basic Role Mapping (Support for default role for new users)</td>
                <td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
            <tr>
                <td>Advanced Role Mapping</td>
                <td></td>
				<td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
            <tr>
                <td>Force authentication / Protect complete site</td>
                <td></td>
				<td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
            <tr>
                <td>OpenId Connect Support (Login using OpenId Connect Server)</td>
                <td></td>
				<td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
            <tr>
                <td>Multiple Userinfo endpoints support</td>
                <td></td>
				<td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
            <tr>
                <td>Account Linking </td>
                <td></td>
				<td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
            <tr>
                <td>Domain specific registration </td>
                <td></td>
				<td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
            <tr>
                <td>Multi-site Support</td>
                <td></td>
				<td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
            <tr>
                <td>Reverse Proxy Support</td>
                <td></td>
				<td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
			<tr>
                <td>BuddyPress Attribute Mapping</td>
                <td></td>
				<td></td>
				<td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
			<tr>
                <td>Page Restriction</td>
                <td></td>
				<td></td>
                <td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
			<tr>
                <td>WP hooks for different events</td>
                <td></td>
				<td></td>
                <td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
			<tr>
                <td>Login Reports / Analytics</td>
                <td></td>
				<td></td>
                <td></td>
                <td><img style="width:10px;height:10px;" src="<?php 
    echo plugin_dir_url(__FILE__);
    ?>
/images/tick.png"></i></td>
            </tr>
        </table>
		<form style="display:none;" id="loginform" action="<?php 
    echo get_option("\x68\x6f\x73\164\x5f\156\141\155\x65") . "\57\x6d\157\x61\163\x2f\154\157\147\x69\x6e";
    ?>
"
		target="_blank" method="post">
		<input type="email" name="username" value="<?php 
    echo get_option("\x6d\x6f\x5f\157\141\x75\164\x68\137\x61\x64\155\x69\x6e\x5f\145\x6d\141\151\154");
    ?>
" />
		<input type="text" name="redirectUrl" value="<?php 
    echo get_option("\150\x6f\163\164\137\156\141\155\x65") . "\57\x6d\x6f\141\x73\x2f\x76\151\x65\x77\154\151\143\145\x6e\x73\145\x6b\x65\x79\x73";
    ?>
" />
		<input type="text" name="requestOrigin" id="requestOrigin1"  />
		</form>
		<form style="display:none;" id="licenseform" action="<?php 
    echo get_option("\x68\x6f\x73\x74\x5f\156\141\x6d\145") . "\57\155\157\x61\163\x2f\x6c\157\147\x69\156";
    ?>
"
		target="_blank" method="post">
		<input type="email" name="username" value="<?php 
    echo get_option("\x6d\157\137\x6f\x61\165\x74\x68\x5f\x61\144\x6d\x69\156\x5f\145\x6d\141\151\x6c");
    ?>
" />
		<input type="text" name="redirectUrl" value="<?php 
    echo get_option("\150\x6f\x73\x74\x5f\x6e\141\155\x65") . "\57\155\157\141\x73\57\151\156\x69\164\x69\141\x6c\151\x7a\x65\160\141\171\155\x65\156\164";
    ?>
" />
		<input type="text" name="requestOrigin" id="requestOrigin2"  />
		</form>
		<script>

			function getupgradelicensesform(planType){
				jQuery('#requestOrigin2').val(planType);
				jQuery('#licenseform').submit();
			}
			jQuery('.mo_oauth_content').css("width","100%");
		</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>
		</div>

	<?php 
}
function mo_oauth_app_customization()
{
    $nW = get_option("\155\x6f\137\x6f\141\165\x74\x68\137\x69\143\157\156\x5f\x63\157\x6e\146\x69\147\165\162\145\137\x63\163\x73");
    function format_custom_css_value($NT)
    {
        $c7 = explode("\x3b", $NT);
        $vM = 0;
        L1:
        if (!($vM < count($c7))) {
            goto tT;
        }
        if ($vM < count($c7) - 1) {
            goto lA;
        }
        if (!($vM == count($c7) - 1)) {
            goto N0;
        }
        echo $c7[$vM] . "\15\xa";
        N0:
        goto TJ;
        lA:
        echo $c7[$vM] . "\x3b\xd\xa";
        TJ:
        jm:
        $vM++;
        goto L1;
        tT:
    }
    ?>
	<div class="mo_table_layout">
	<form id="form-common" name="form-common" method="post" action="admin.php?page=mo_oauth_settings&tab=customization">
		<input type="hidden" name="option" value="mo_oauth_app_customization" />
		<h2>Customize Icons</h2>
		<table class="mo_settings_table">
			<tr>
				<td><strong>Icon Width:</strong></td>
				<td><input type="text" id="mo_oauth_icon_width" name="mo_oauth_icon_width" value="<?php 
    echo get_option("\x6d\157\x5f\x6f\141\165\164\150\x5f\151\143\x6f\x6e\x5f\x77\x69\144\164\x68");
    ?>
"> px</td>
			</tr>
			<tr>
				<td><strong>Icon Height:</strong></td>
				<td><input  type="text" id="mo_oauth_icon_height" name="mo_oauth_icon_height" value="<?php 
    echo get_option("\155\x6f\137\x6f\141\x75\164\150\x5f\151\143\157\x6e\x5f\150\x65\x69\x67\150\164");
    ?>
"> px</td>
			</tr>
			<tr>
				<td><strong>Icon Margins:</strong></td>
				<td><input  type="text" id="mo_oauth_icon_margin" name="mo_oauth_icon_margin" value="<?php 
    echo get_option("\x6d\x6f\137\157\x61\165\164\150\137\x69\x63\157\x6e\137\155\141\162\147\x69\x6e");
    ?>
"> px</td>
			</tr>
			<tr>
				<td><strong>Custom CSS:</strong></td>
				<td><textarea type="text" id="mo_oauth_icon_configure_css" style="resize: vertical; width:400px; height:180px;  margin:5% auto;" rows="6" name="mo_oauth_icon_configure_css"><?php 
    echo rtrim(trim(format_custom_css_value($nW)), "\73");
    ?>
</textarea><br/><b>Example CSS:</b> 
<pre>.oauthloginbutton { 
	 width:100%;
	 height:50px;
	 padding-top:15px;
	 padding-bottom:15px;
	 margin-bottom:-1px;
	 border-radius:4px;
	 background: #7272dc;
	 text-align:center;
	 font-size:16px;
	 color:#fff;
	 margin-bottom:5px;
 } 
 .custom_logo { 
	 padding-top:-1px;
	 padding-right:15px;
	 padding-left:15px;
	 padding-top:15px;
	 background: #7272dc;
	 color:#fff;
 }</pre>
</td>
			</tr>
			<tr>
				<td><strong>Custom Logout button text:</strong></td>
				<td><input  type="text" id="mo_oauth_custom_logout_text"style="resize: vertical; width:200px; height:30px;  margin:5% auto;" name="mo_oauth_custom_logout_text" placeholder ="Howdy ,##user##"value="<?php 
    echo get_option("\x6d\157\x5f\157\x61\165\164\150\137\143\x75\163\x74\157\x6d\137\x6c\157\x67\x6f\165\164\x5f\x74\145\x78\x74");
    ?>
"> <b>##user##</b> is replaced by Username</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td><br><input type="submit" name="submit" value="Save settings"
					class="button button-primary button-large" /></td>
			</tr>
		</table>
	</form>
	</div>
	<?php 
}
function mo_oauth_user_analytics()
{
    global $wpdb;
    $Vi = $wpdb->prefix . Mo_Oauth_Constants::USER_TRANSCATIONS_TABLE;
    $rN = "\x43\x52\x45\101\x54\105\x20\124\101\x42\114\x45\x20\x49\x46\x20\116\117\124\40\105\x58\111\x53\124\x53\x20" . $Vi . "\x20\x28\xd\xa\x9\x9\x9\x60\151\x64\140\x20\x62\x69\147\x69\156\x74\x20\x4e\x4f\124\40\x4e\125\114\114\x20\101\125\x54\117\x5f\x49\x4e\x43\x52\105\x4d\105\116\124\54\x20\40\140\165\163\145\162\x6e\141\x6d\145\x60\40\x6d\145\144\151\165\x6d\164\x65\170\x74\40\x4e\x4f\x54\40\116\x55\x4c\x4c\40\x2c\140\163\x74\x61\164\165\163\140\40\155\x65\x64\x69\165\155\x74\x65\x78\164\x20\116\x4f\x54\x20\116\x55\x4c\x4c\x20\x2c\140\x61\x70\160\x6e\x61\x6d\x65\140\40\155\x65\x64\x69\x75\155\x74\x65\x78\164\40\116\117\124\40\116\x55\114\114\x20\x2c\x60\x63\x72\145\141\x74\145\x64\137\164\151\x6d\x65\163\164\141\155\160\140\x20\124\111\x4d\x45\x53\124\x41\x4d\x50\x20\x44\105\x46\101\125\x4c\124\x20\103\x55\x52\122\105\x4e\x54\x5f\124\x49\115\x45\x53\x54\x41\115\x50\54\x20\125\116\111\x51\125\x45\40\113\105\x59\40\151\x64\40\50\151\144\51\40\51\73";
    require_once ABSPATH . "\x77\160\55\141\144\155\151\x6e\57\x69\x6e\x63\x6c\x75\144\145\x73\x2f\x75\160\147\162\141\144\x65\x2e\x70\150\x70";
    dbDelta($rN);
    $gT = new Mo_OAuth_User_Reports();
    $Ny = $gT->get_all_transactions();
    ?>

<div class="mo_wpns_small_layout">
	<form name="f" method="post" action="" id="manualblockipform" >
		<input type="hidden" name="option" value="mo_wpns_manual_clear" />
		<table>
            <tr>
                <td style="width: 100%">
                    <h2>
                        User Transactions Report
                    </h2>
                </td>
		        <td>
                    <input type="submit" class="button button-primary button-large" value="Clear Reports" onclick= <?php 
    global $wpdb;
    $wpdb->get_results("\x44\122\x4f\x50\40\104\x41\124\101\x42\101\x53\x45" . $wpdb->prefix . Mo_Oauth_Constants::USER_TRANSCATIONS_TABLE);
    ?>
>
                </td>
            </tr>
        </table>
	</form>

    
	<table id="reports_table" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                
				<td><b>Username</td>
				
				<td><b>Status</td>
				
				<td><b>Application</td>
				
				<td><b>Created Date</td>
               
            </tr>
        </thead>
        <tbody>
		
            <?php 
    foreach ($Ny as $h6) {
        echo "\x3c\164\x72\76\74\164\144\76" . $h6->username . "\74\57\164\144\x3e\74\164\144\76";
        if ($h6->status == Mo_Oauth_Constants::FAILED) {
            goto sm;
        }
        if ($h6->status == Mo_Oauth_Constants::SUCCESS) {
            goto Si;
        }
        echo "\116\x2f\x41";
        goto Vp;
        Si:
        echo "\74\163\160\x61\156\40\163\164\x79\154\x65\75\143\157\154\x6f\x72\x3a\x67\x72\145\x65\x6e\76" . Mo_Oauth_Constants::SUCCESS . "\x3c\x2f\163\x70\141\156\x3e";
        Vp:
        goto Xk;
        sm:
        echo "\x3c\x73\160\x61\x6e\x20\x73\164\x79\x6c\145\75\143\157\x6c\x6f\x72\x3a\162\145\144\76" . Mo_Oauth_Constants::FAILED . "\74\57\163\160\x61\x6e\76";
        Xk:
        echo "\74\x74\x64\76" . $h6->appname . "\x3c\57\164\x64\76";
        echo "\74\164\x64\x3e" . date("\x4d\x20\x6a\x2c\40\x59\54\40\147\x3a\151\x3a\163\x20\141", strtotime($h6->created_timestamp)) . "\x3c\57\x74\144\x3e\74\57\x74\162\x3e";
        Mc:
    }
    OE:
    ?>
        </tbody>
    </table>
</div>
<script>
	jQuery(document).ready(function() {
		jQuery('#reports_table').DataTable({
			"order": [[ 4, "desc" ]]
		});
	} );
	</script>
<?php 
}
function mo_oauth_apps_config()
{
    ?>
	
	<div class="mo_table_layout">
	<?php 
    if (!(isset($_GET["\141\x63\164\x69\x6f\156"]) && $_GET["\141\x63\x74\151\157\x6e"] == "\144\145\x6c\x65\x74\x65")) {
        goto qA;
    }
    if (!(isset($_GET["\x61\160\x70"]) && check_admin_referer("\155\x6f\137\x6f\141\165\x74\150\x5f\x64\x65\x6c\x65\164\145\x5f" . $_GET["\x61\160\x70"]))) {
        goto pD;
    }
    mo_oauth_client_delete_app($_GET["\141\x70\x70"]);
    pD:
    qA:
    if (isset($_GET["\x61\x63\x74\151\x6f\x6e"]) && $_GET["\141\143\164\x69\x6f\x6e"] == "\x61\144\144") {
        goto y1;
    }
    if (isset($_GET["\x61\143\x74\x69\x6f\x6e"]) && $_GET["\x61\143\x74\x69\x6f\x6e"] == "\x75\160\144\x61\164\145") {
        goto P5;
    }
    if (get_option("\155\157\137\x6f\x61\165\x74\150\x5f\x61\x70\x70\x73\137\154\x69\163\164")) {
        goto cX;
    }
    add_app();
    goto Y3;
    cX:
    $EX = get_option("\x6d\x6f\137\x6f\141\165\164\x68\137\141\160\160\163\x5f\x6c\151\163\x74");
    if (sizeof($EX) > 0) {
        goto Is;
    }
    echo "\x3c\x62\x72\76\x3c\x61\40\150\162\x65\146\x3d\47\x61\144\155\x69\x6e\x2e\x70\x68\160\77\160\141\147\x65\75\x6d\157\137\157\x61\165\x74\x68\137\163\x65\164\164\151\x6e\x67\x73\x26\141\143\164\151\x6f\156\75\x61\x64\x64\47\76\x3c\x62\x75\164\164\x6f\156\x20\163\164\x79\x6c\145\x3d\x27\x66\154\157\x61\x74\x3a\162\x69\x67\150\x74\47\76\101\x64\144\40\101\160\160\x6c\151\143\141\x74\151\157\x6e\x3c\57\x62\x75\x74\164\x6f\156\76\x3c\x2f\141\76";
    goto v6;
    Is:
    echo "\74\x62\162\x3e\74\x61\40\x68\162\x65\x66\x3d\47\43\47\76\74\142\165\x74\x74\x6f\x6e\x20\144\x69\163\x61\x62\154\145\144\x20\163\164\x79\154\145\75\47\x66\x6c\157\141\164\72\x72\151\147\150\164\47\x3e\101\144\x64\x20\x41\x70\x70\154\151\x63\x61\164\151\x6f\x6e\x3c\57\x62\x75\164\x74\157\156\76\74\x2f\141\x3e";
    v6:
    echo "\x3c\150\63\76\101\x70\x70\x6c\151\143\x61\x74\x69\157\156\163\x20\x4c\151\x73\x74\x3c\x2f\x68\x33\x3e";
    if (!(is_array($EX) && sizeof($EX) > 0)) {
        goto ZH;
    }
    echo "\74\160\40\x73\164\171\154\145\x3d\47\143\157\x6c\x6f\162\x3a\x23\x61\x39\x34\64\x34\x32\73\x62\x61\143\153\x67\x72\157\165\156\x64\x2d\143\x6f\154\157\x72\x3a\x23\x66\x32\x64\x65\144\145\x3b\x62\x6f\x72\x64\x65\162\x2d\143\157\154\x6f\x72\x3a\x23\145\142\143\x63\144\61\x3b\x62\157\x72\x64\x65\162\x2d\x72\141\x64\x69\x75\163\72\x35\160\x78\x3b\160\x61\x64\144\x69\x6e\147\x3a\61\62\x70\x78\x27\76\x59\x6f\165\x20\x63\x61\156\40\x6f\156\154\171\x20\141\144\144\x20\61\40\x61\x70\160\x6c\x69\x63\x61\164\151\157\x6e\40\x77\x69\164\150\x20\146\162\145\x65\x20\166\145\162\x73\x69\x6f\156\56\40\x55\160\147\162\x61\x64\145\40\x74\x6f\x20\74\x61\40\x68\x72\145\x66\75\x27\141\x64\155\x69\x6e\x2e\160\x68\x70\77\x70\x61\147\145\75\x6d\x6f\x5f\157\x61\165\164\x68\x5f\x73\145\x74\164\151\x6e\x67\x73\x26\164\141\x62\x3d\x6c\151\143\145\x6e\163\151\156\x67\47\x3e\74\142\76\x65\156\164\x65\162\160\x72\x69\x73\145\74\x2f\142\x3e\74\x2f\141\76\x20\164\x6f\40\141\x64\144\x20\x6d\157\162\145\56\74\57\x70\x3e";
    ZH:
    echo "\x3c\164\141\x62\154\x65\40\x63\x6c\141\163\163\75\x27\x74\x61\x62\x6c\145\142\157\x72\144\x65\162\47\x3e";
    echo "\74\x74\162\x3e\x3c\164\150\76\74\142\76\116\141\155\x65\x3c\57\x62\76\x3c\57\x74\x68\76\x3c\x74\150\76\101\x63\x74\151\x6f\x6e\x3c\x2f\164\x68\76\74\x2f\x74\x72\76";
    foreach ($EX as $Xp => $sR) {
        echo "\74\x74\162\x3e\74\164\144\76" . $Xp;
        if (!(isset($sR["\141\x70\160\164\171\x70\x65"]) && $sR["\x61\x70\x70\x74\171\x70\x65"] == "\157\x70\145\x6e\151\144\x63\x6f\x6e\x6e\145\143\x74")) {
            goto Lv;
        }
        echo "\40\x3c\x73\155\141\154\x6c\x3e\x28\117\160\x65\156\111\x64\40\103\x6f\x6e\156\145\x63\x74\51\x3c\163\x6d\x61\154\154\x3e";
        Lv:
        $Tg = wp_nonce_url("\x61\144\x6d\151\x6e\x2e\160\x68\x70\x3f\x70\141\147\145\x3d\x6d\x6f\137\157\x61\165\x74\150\137\163\145\164\164\151\156\147\x73\46\x61\143\164\x69\x6f\156\75\x64\145\154\x65\164\x65\x26\x61\160\160\x3d" . $Xp, "\x6d\157\137\x6f\x61\x75\164\150\x5f\144\x65\154\x65\x74\x65\x5f" . $Xp);
        echo "\74\x2f\x74\x64\x3e\x3c\x74\x64\x3e\74\x61\x20\150\162\145\146\x3d\x27\x61\144\155\x69\156\x2e\160\150\x70\x3f\x70\141\x67\x65\x3d\x6d\x6f\137\x6f\141\165\x74\150\137\x73\145\164\x74\x69\156\x67\x73\46\x61\x63\x74\x69\157\x6e\x3d\165\x70\144\x61\164\145\46\x61\160\x70\75" . $Xp . "\47\76\x55\x70\x64\x61\x74\x65\74\57\x61\76\40\174\40\74\141\x20\x68\x72\x65\146\x3d\x27\x61\x64\x6d\151\x6e\x2e\160\x68\x70\77\x70\x61\147\145\x3d\x6d\157\137\x6f\141\x75\164\150\137\163\145\x74\164\x69\156\x67\163\x26\141\143\164\x69\x6f\x6e\75\x75\160\144\x61\x74\145\x26\141\160\x70\75" . $Xp . "\x23\141\x74\164\162\155\x61\160\160\x69\156\x67\x27\76\x41\x74\x74\162\151\142\165\164\145\x20\x4d\141\x70\x70\x69\x6e\147\74\57\141\x3e\x20\174\x20\x3c\x61\x20\150\x72\145\x66\x3d\x27\141\144\155\x69\156\56\x70\x68\160\x3f\x70\141\x67\145\75\x6d\157\x5f\157\141\x75\164\150\x5f\x73\x65\164\164\151\156\147\x73\x26\x61\143\x74\x69\x6f\156\x3d\165\160\x64\x61\164\145\x26\x61\160\x70\x3d" . $Xp . "\x23\x72\157\x6c\145\x6d\141\x70\160\151\x6e\147\47\x3e\x52\157\154\145\40\115\141\x70\160\151\x6e\147\74\x2f\x61\x3e\40\x7c\40\x3c\141\x20\x68\162\x65\x66\x3d\x27\x61\144\155\151\x6e\56\160\150\x70\77\160\141\x67\x65\x3d\155\x6f\137\157\141\165\164\150\137\163\x65\164\x74\x69\156\x67\x73\46\164\x61\142\x3d\163\x69\147\x6e\x69\156\163\145\164\164\x69\156\147\163\x26\x61\x70\x70\x3d" . $Xp . "\43\x61\x64\166\x61\156\143\x65\144\x27\76\101\144\x76\x61\156\143\x65\x64\74\x2f\x61\76\x20\x7c\x20\x3c\x61\x20\x68\x72\x65\146\x3d\x27\141\x64\x6d\151\x6e\x2e\160\x68\160\77\x70\x61\x67\145\x3d\155\x6f\x5f\157\141\x75\x74\150\x5f\163\x65\164\x74\x69\x6e\147\x73\x26\x61\143\164\x69\x6f\156\x3d\x75\160\144\141\x74\x65\46\141\x70\x70\75" . $Xp . "\43\x68\x6f\167\x74\x6f\x63\157\x6e\x66\x69\x67\165\x72\145\47\x3e\x48\x6f\167\40\164\x6f\40\x43\x6f\x6e\x66\151\147\165\x72\x65\77\x3c\57\x61\x3e\x20\x7c\x20\x3c\x61\40\150\x72\145\146\x3d\x27" . $Tg . "\47\x20\x6f\156\x63\154\151\x63\x6b\40\75\42\x72\x65\164\x75\162\x6e\x20\143\157\x6e\x66\151\162\155\50\47\101\162\x65\x20\x79\x6f\x75\40\x73\165\162\x65\x20\171\x6f\x75\x20\167\141\156\164\40\164\x6f\40\144\x65\x6c\x65\x74\x65\40\x74\x68\151\x73\40\x69\164\145\x6d\x3f\47\51\x3b\x22\76\x44\145\154\x65\164\x65\x3c\x2f\x61\x3e\74\x2f\x74\144\x3e\74\x2f\x74\162\76";
        Uc:
    }
    yO:
    echo "\x3c\57\164\x61\x62\x6c\145\x3e";
    echo "\74\142\162\76\x3c\x62\x72\x3e";
    Y3:
    goto iH;
    P5:
    if (!isset($_GET["\x61\x70\x70"])) {
        goto Sn;
    }
    update_app($_GET["\x61\x70\x70"]);
    Sn:
    iH:
    goto Uh;
    y1:
    add_app();
    Uh:
    ?>
		</div>

<?php 
    if (!get_option("\x6d\x6f\x5f\157\x61\x75\164\150\137\x65\x76\145\x6f\x6e\x6c\151\156\x65\137\145\156\141\142\154\x65")) {
        goto f_;
    }
    mo_oauth_apps_config_old();
    f_:
}
function add_app()
{
    $EX = get_option("\x6d\157\137\157\141\x75\x74\150\x5f\x61\x70\160\x73\137\x6c\x69\x73\x74");
    if (!(is_array($EX) && sizeof($EX) > 0)) {
        goto yN;
    }
    echo "\x3c\160\x20\x73\x74\x79\154\x65\75\x27\x63\x6f\154\x6f\x72\x3a\43\x61\71\64\64\64\62\73\142\x61\x63\x6b\147\162\x6f\165\156\144\55\x63\x6f\x6c\157\162\72\x23\x66\x32\144\x65\144\x65\73\142\157\x72\x64\x65\162\55\143\157\154\x6f\x72\x3a\43\145\x62\143\x63\144\x31\x3b\x62\157\x72\144\x65\x72\x2d\162\x61\144\151\x75\x73\x3a\65\160\x78\73\160\x61\x64\144\151\156\147\x3a\61\62\x70\x78\47\76\x59\x6f\165\x20\x63\x61\x6e\40\x6f\x6e\154\171\x20\141\x64\144\x20\61\40\x61\160\x70\154\151\143\x61\x74\151\x6f\x6e\40\167\x69\164\150\40\x66\x72\145\145\x20\166\145\162\163\151\157\156\x2e\40\125\x70\147\162\x61\144\x65\40\x74\157\40\74\x61\x20\150\162\x65\146\x3d\x27\141\x64\x6d\151\156\56\160\x68\x70\77\160\141\147\145\x3d\x6d\x6f\x5f\157\x61\x75\164\150\x5f\163\145\164\x74\151\156\147\163\46\x74\141\x62\75\154\151\143\x65\156\x73\151\156\147\x27\76\x3c\142\76\145\x6e\x74\x65\162\x70\x72\x69\163\x65\x3c\57\142\x3e\x3c\x2f\x61\x3e\40\x74\157\40\x61\144\x64\x20\x6d\157\x72\x65\56\x3c\57\x70\76";
    die;
    yN:
    ?>

		<script>
			function selectapp() {
				var appname = document.getElementById("mo_oauth_app").value;
				document.getElementById("instructions").innerHTML  = "";
				if(appname=="google"){
					document.getElementById("instructions").innerHTML  = '<?php 
    mo_oauth_client_instructions("\147\157\157\x67\x6c\x65", false);
    ?>
';
				} else if(appname=="facebook"){
					document.getElementById("instructions").innerHTML  = '<?php 
    mo_oauth_client_instructions("\146\141\143\145\x62\157\x6f\x6b", false);
    ?>
';
				} else if(appname=="eveonline"){
					document.getElementById("instructions").innerHTML  = '<?php 
    mo_oauth_client_instructions("\145\166\x65\157\156\x6c\x69\x6e\x65", false);
    ?>
';
				} else if(appname=="azure"){
					document.getElementById("instructions").innerHTML  = '<?php 
    mo_oauth_client_instructions("\141\x7a\x75\162\145", false);
    ?>
';
				} else if(appname=="discord"){
					document.getElementById("instructions").innerHTML  = '<?php 
    mo_oauth_client_instructions("\x64\151\x73\143\x6f\162\x64", false);
    ?>
';
				}  else{
					document.getElementById("instructions").innerHTML  = '<?php 
    mo_oauth_client_instructions("\x6f\x74\150\x65\x72", false);
    ?>
';
				}

				 if(appname=="eveonline") { //(appname=="google") || (appname=="facebook") || (appname=="windows")){
					jQuery("#mo_oauth_display_app_name_div").hide();
					jQuery("#mo_oauth_custom_app_name_div").hide();
					jQuery("#mo_oauth_authorizeurl_div").hide();
					jQuery("#mo_oauth_accesstokenurl_div").hide();
					jQuery("#mo_oauth_resourceownerdetailsurl_div").hide();
					jQuery("#mo_oauth_email_attr_div").hide();
					jQuery("#mo_oauth_name_attr_div").hide();
					jQuery("#mo_oauth_custom_app_name").removeAttr('required');
					jQuery("#mo_oauth_authorizeurl").removeAttr('required');
					jQuery("#mo_oauth_accesstokenurl").removeAttr('required');
					jQuery("#callbackurl").val("https://auth.miniorange.com/moas/oauth/client/callback");
				}else if(appname){
					jQuery("#mo_oauth_display_app_name_div").show();
					jQuery("#mo_oauth_custom_app_name_div").show();
					jQuery("#mo_oauth_authorizeurl_div").show();
					jQuery("#mo_oauth_accesstokenurl_div").show();
					jQuery("#mo_oauth_resourceownerdetailsurl_div").show();
					jQuery("#mo_oauth_email_attr_div").show();
					jQuery("#mo_oauth_name_attr_div").show();
					jQuery("#mo_oauth_custom_app_name").attr('required','true');
					jQuery("#mo_oauth_email_attr").attr('required','true');
					jQuery("#mo_oauth_name_attr").attr('required','true');
					jQuery("#callbackurl").val("<?php 
    echo site_url() . "\57\x6f\141\x75\x74\x68\x63\141\154\154\142\x61\x63\x6b";
    ?>
");

					if((appname=="google") || (appname=="facebook") || (appname=="windows") || (appname == "azure") || (appname == "discord")) {
						if(appname=="azure"){
							document.getElementById('mo_oauth_scope').value="openid";
							var authorizeurl = 'https://login.microsoftonline.com/<TENANT-ID>/oauth2/authorize';
							var accesstokenurl = 'https://login.microsoftonline.com/<TENANT-ID>/oauth2/token';
							var resourceownerdetailsurl = 'https://login.windows.net/common/openid/userinfo';
						} else if(appname=="facebook"){
							var authorizeurl = 'https://www.facebook.com/dialog/oauth';
							var accesstokenurl = 'https://graph.facebook.com/v2.8/oauth/access_token';
							var resourceownerdetailsurl = 'https://graph.facebook.com/me/?fields=id,name,email,age_range,first_name,gender,last_name,link&access_token=';
						} else if(appname=="google"){
							var authorizeurl = "https://accounts.google.com/o/oauth2/auth";
							var accesstokenurl = "https://www.googleapis.com/oauth2/v3/token";
							var resourceownerdetailsurl = "https://www.googleapis.com/plus/v1/people/me";
						}  else if(appname=="windows"){
							document.getElementById('mo_oauth_scope').value="User.Read";
							var authorizeurl = "https://login.live.com/oauth20_authorize.srf";
							var accesstokenurl = "https://login.live.com/oauth20_token.srf";
							var resourceownerdetailsurl = "https://apis.live.net/v5.0/me";
						}
						else if(appname=="discord"){
							document.getElementById('mo_oauth_scope').value="identify email";
							var authorizeurl = "https://discordapp.com/api/oauth2/authorize";
							var accesstokenurl = "https://discordapp.com/api/oauth2/token";
							var resourceownerdetailsurl = "https://discordapp.com/api/users/@me";
						}
						if( ( appname != "azure" ) && ( appname != "windows" ) && ( appname != "discord" ))
							document.getElementById('mo_oauth_scope').value="email";
						document.getElementById('mo_oauth_authorizeurl').value=authorizeurl;
						document.getElementById('mo_oauth_accesstokenurl').value=accesstokenurl;
						document.getElementById('mo_oauth_resourceownerdetailsurl').value=resourceownerdetailsurl;
					}
					else
					{
						document.getElementById('mo_oauth_scope').value="email";
						document.getElementById('mo_oauth_authorizeurl').value="";
						document.getElementById('mo_oauth_accesstokenurl').value="";
						document.getElementById('mo_oauth_resourceownerdetailsurl').value="";
					}					
					jQuery("#mo_oauth_authorizeurl").attr('required','true');
					jQuery("#mo_oauth_accesstokenurl").attr('required','true');
					//jQuery("#mo_oauth_resourceownerdetailsurl").attr('required','true');
				}

			}

		</script>
		<div id="toggle2" class="panel_toggle">
			<h3>Add Application</h3>
		</div>
		<form id="form-common" name="form-common" method="post" action="admin.php?page=mo_oauth_settings">
		<input type="hidden" name="option" value="mo_oauth_add_app" />
		<table class="mo_settings_table">
			<tr>
			<td><strong><font color="#FF0000">*</font>Select Application:</strong></td>
			<td>
				<select class="mo_table_textbox" required="true" name="mo_oauth_app_name" id="mo_oauth_app" onchange="selectapp()">
				  <option value="">Select Application</option>
				  <option value="azure">Azure</option>
				  <option value="discord">Discord</option>
				  <option value="google">Google</option>
				  <option value="facebook">Facebook</option>
				  <option value="windows">Windows Account</option>
				  <option value="eveonline">Eve Online</option>
				  <option value="oauth">Custom OAuth Server</option>
				  <option value="openidconnect">Custom OpenId Connect</option>
				</select>
			</td>
			</tr>
			<tr><td><strong>Redirect / Callback URL</strong></td>
			<td><input class="mo_table_textbox" id="callbackurl"  type="text" readonly="true" value='<?php 
    echo site_url() . "\57\x6f\141\165\164\150\143\x61\x6c\154\142\141\x63\x6b";
    ?>
'></td>
			</tr>
			<tr>
			<tr  style="display:none" id="mo_oauth_custom_app_name_div">
				<td><strong><font color="#FF0000">*</font>Custom App Name:</strong></td>
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_custom_app_name" name="mo_oauth_custom_app_name" value=""></td>
			</tr>
			<tr style="display:none" id="mo_oauth_display_app_name_div">
				<td><strong>Display App Name:</strong></td>
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_display_app_name" name="mo_oauth_display_app_name" value=""></td>
			</tr>
			<tr>
				<td><strong><font color="#FF0000">*</font>Client ID:</strong></td>
				<td><input class="mo_table_textbox" required="" type="text" name="mo_oauth_client_id" value=""></td>
			</tr>
			<tr>
				<td><strong><font color="#FF0000">*</font>Client Secret:</strong></td>
				<td><input class="mo_table_textbox" required="" type="text"  name="mo_oauth_client_secret" value=""></td>
			</tr>
			<tr>
				<td><strong>Scope:</strong></td>
				<td><input class="mo_table_textbox" type="text" name="mo_oauth_scope" id="mo_oauth_scope" value="email"></td>
			</tr>
			<tr style="display:none" id="mo_oauth_authorizeurl_div">
				<td><strong><font color="#FF0000">*</font>Authorize Endpoint:</strong></td>
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_authorizeurl" name="mo_oauth_authorizeurl" value=""></td>
			</tr>
			<tr style="display:none" id="mo_oauth_accesstokenurl_div">
				<td><strong><font color="#FF0000">*</font>Access Token Endpoint:</strong></td>
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_accesstokenurl" name="mo_oauth_accesstokenurl" value=""></td>
			</tr>
			<tr style="display:none" id="mo_oauth_resourceownerdetailsurl_div">
				<td><strong><font color="#FF0000">*</font>Get User Info Endpoint:</strong></td>
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_resourceownerdetailsurl" name="mo_oauth_resourceownerdetailsurl" value=""></td>
			</tr>
			<!--<tr style="display:none" id="mo_oauth_email_attr_div">
				<td><strong><font color="#FF0000">*</font>Email Attribute:</strong></td>
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_email_attr" name="mo_oauth_email_attr" value=""></td>
			</tr>
			<tr style="display:none" id="mo_oauth_name_attr_div">
				<td><strong><font color="#FF0000">*</font>Name Attribute:</strong></td>
				<td><input class="mo_table_textbox" type="text" id="mo_oauth_name_attr" name="mo_oauth_name_attr" value=""></td>
			</tr>-->
			<tr>
				<td>&nbsp;</td>
				<td><input type="submit" name="submit" value="Save settings"
					class="button button-primary button-large" /></td>
			</tr>
			</table>
		</form>

		<div id="instructions">

		</div>

		<?php 
}
function mo_oauth_client_delete_app($st)
{
    $EX = get_option("\155\x6f\x5f\x6f\x61\165\164\x68\x5f\141\x70\x70\163\x5f\x6c\151\x73\x74");
    foreach ($EX as $Xp => $sR) {
        if (!($st == $Xp)) {
            goto Tx;
        }
        unset($EX[$Xp]);
        if (!($st == "\x65\x76\x65\157\156\154\151\x6e\145")) {
            goto wu;
        }
        update_option("\155\157\137\157\141\165\x74\150\x5f\x65\x76\145\x6f\156\154\x69\156\145\x5f\x65\156\x61\142\x6c\145", 0);
        wu:
        Tx:
        m8:
    }
    Yo:
    update_option("\155\x6f\x5f\x6f\x61\165\x74\x68\x5f\141\160\x70\x73\x5f\x6c\x69\163\x74", $EX);
}
function mo_oauth_apps_config_old()
{
    ?>
			<!-- Google configurations -->
		<form id="form-google" name="form-google" method="post" action="" style="display:none">
			<input type="hidden" name="option" value="mo_oauth_google" />
			<input type="hidden" name="mo_oauth_google_scope" value="email" />
			<div class="mo_table_layout">
				<div id="toggle2" class="panel_toggle">
					<h3>Login with Google</h3>
				</div>
				<div id="panel2">
					<table class="mo_settings_table">
						<tr>
							<td class="mo_table_td_checkbox"><input type="checkbox"
								id="google_enable" name="mo_oauth_google_enable" value="1"
								<?php 
    checked(get_option("\x6d\x6f\137\157\141\x75\164\150\137\147\157\x6f\x67\154\x65\x5f\145\x6e\x61\x62\154\x65") == 1);
    ?>
 /><strong>Enable
									Google</strong></td>
							<td></td>
						</tr>
						<tr>
							<td><strong><font color="#FF0000">*</font>Client ID:</strong></td>
							<td><input class="mo_table_textbox" required class="textbox"
								type="text" placeholder="Click on Help to know more"
								name="mo_oauth_google_client_id"
								value="<?php 
    echo get_option("\155\157\137\x6f\x61\x75\x74\150\137\147\x6f\157\x67\154\145\137\x63\154\151\x65\156\x74\137\x69\x64");
    ?>
" /></td>
						</tr>

						<tr>
							<td><strong><font color="#FF0000">*</font>Client Secret:</strong></td>
							<td><input class="mo_table_textbox" required type="text"
								placeholder="Click on Help to know more"
								name="mo_oauth_google_client_secret"
								value="<?php 
    echo get_option("\155\157\137\x6f\141\165\164\x68\x5f\147\x6f\x6f\x67\154\x65\137\x63\x6c\151\145\156\x74\137\163\145\143\162\145\164");
    ?>
" /></td>
						</tr>

						<tr>
							<td>&nbsp;</td>
							<td><input type="submit" name="submit" value="Save settings"
								class="button button-primary button-large" />&nbsp;&nbsp; <input
								type="button" id="google_help" class="help" value="Help" /></td>
						</tr>
						<tr>
							<td colspan="2" id="google_instru" hidden>
								<p>
									<strong>Instructions:</strong>

								<ol>
									<li>Visit the Google website for developers <a
										href='https://console.developers.google.com/project'
										target="_blank">console.developers.google.com</a>.
									</li>
									<li>At Google, create a new Project and enable the Google+ API.
										This will enable your site to access the Google+ API.</li>
									<li>At Google, provide <b><?php 
    echo site_url() . "\57\157\141\x75\x74\x68\143\x61\154\154\x62\x61\143\x6b";
    ?>
</b>
										for the new Project's Redirect URI.
									</li>
									<li>At Google, you must also configure the Consent Screen with
										your Email Address and Product Name. This is what Google will
										display to users when they are asked to grant access to your
										site/app.</li>
									<li>Paste your Client ID/Secret provided by Google into the
										fields above.</li>
									<li>Click on the Save settings button.</li>
									<li>Go to Appearance->Widgets. Among the available widgets you
										will find miniOrange OAuth, drag it to the widget area where
										you want it to appear.</li>
									<li>Now logout and go to your site. You will see a login link
										where you placed that widget.</li>
								</ol>
								</p>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</form>
		<!-- Eveonline configurations -->
		<form id="form-eveonline" name="form-eveonline" method="post"
			action="">
			<input type="hidden" name="option" value="mo_oauth_eveonline" /> <input
				type="hidden" name="mo_oauth_eveonline_scope" value="" />
			<!--value of scope?-->
			<div class="mo_table_layout">
				<div id="toggle3" class="panel_toggle">
					<h3>Login with EVE Online</h3>
				</div>
				<div id="panel3">
					<table class="mo_settings_table">
						<tr>
							<td class="mo_table_td_checkbox"><input type="checkbox"
								id="eve_enable" name="mo_oauth_eveonline_enable" value="1"
								<?php 
    checked(get_option("\x6d\x6f\x5f\x6f\141\x75\164\x68\137\145\166\145\157\156\x6c\x69\156\145\x5f\145\x6e\141\x62\154\x65") == 1);
    ?>
 /><strong>Enable
									Eveonline</strong></td>
							<td></td>
						</tr>
						<tr>
							<td><strong><font color="#FF0000">*</font>Client ID:</strong></td>
							<td><input class="mo_table_textbox" required type="text"
								placeholder="Click on Help to know more"
								name="mo_oauth_eveonline_client_id"
								value="<?php 
    echo get_option("\155\157\137\x6f\141\165\x74\x68\137\x65\x76\x65\157\156\x6c\151\x6e\145\x5f\x63\154\151\145\x6e\x74\137\x69\x64");
    ?>
" /></td>
						</tr>

						<tr>
							<td><strong><font color="#FF0000">*</font>Client Secret:</strong></td>
							<td><input class="mo_table_textbox" type="text" required
								placeholder="Click on Help to know more"
								name="mo_oauth_eveonline_client_secret"
								value="<?php 
    echo get_option("\x6d\x6f\x5f\157\x61\165\x74\x68\137\x65\x76\145\x6f\x6e\x6c\151\156\x65\x5f\x63\x6c\151\145\x6e\164\x5f\163\x65\143\162\x65\x74");
    ?>
" /></td>
						</tr>
						<tr>
							<td><a href="admin.php?page=mo_oauth_eve_online_setup">Advanced
									Settings</a></td>
							<td><input type="submit" name="submit" value="Save settings"
								class="button button-primary button-large" />&nbsp;&nbsp; <input
								type="button" id="eve_help" value="Help" /></td>
						</tr>
						<tr>
							<td colspan="2" id="eve_instru" hidden>
								<p>
									<strong>Instructions:</strong>

								<ol>
									<li>Log in to your EVE Online account</li>
									<li>At EVE Online, go to Support. Request for enabling OAuth
										for a third-party application.</li>
									<li>At EVE Online, add a new project/application. Generate
										Client ID and Client Secret.</li>
									<li>At EVE Online, set Redirect URL as <b>https://auth.miniorange.com/moas/oauth/client/callback</b></li>
									<li>Enter your Client ID and Client Secret above.</li>
									<li>Click on the Save settings button.</li>
									<li>Go to Appearance->Widgets. Among the available widgets you
										will find miniOrange OAuth, drag it to the widget area where
										you want it to appear.</li>
									<li>Now logout and go to your site. You will see a login link
										where you placed that widget.</li>
								</ol>
								</p>
							</td>

						</tr>
					</table>
				</div>
			</div>
		</form>

		<!-- Facebook -->
		<form id="form-facebook" name="form-facebook" method="post" action=""  style="display:none">
			<input type="hidden" name="option" value="mo_oauth_facebook" />
			<input type="hidden" name="mo_oauth_facebook_scope" value="email" />
			<div class="mo_table_layout">
				<div id="toggle4" class="panel_toggle">
					<h3>Login with Facebook</h3>
				</div>
				<div id="panel4">
					<table class="mo_settings_table">
						<tr>
							<td class="mo_table_td_checkbox"><input type="checkbox"
								id="facebook_enable" name="mo_oauth_facebook_enable" value="1"
								<?php 
    checked(get_option("\155\x6f\x5f\157\141\165\164\x68\x5f\x66\x61\x63\x65\x62\x6f\157\x6b\x5f\145\x6e\x61\142\154\145") == 1);
    ?>
 /><strong>Enable
									Facebook</strong></td>
							<td></td>
						</tr>
						<tr>
							<td><strong><font color="#FF0000">*</font>App ID:</strong></td>
							<td><input class="mo_table_textbox" required class="textbox"
								type="text" placeholder="Click on Help to know more"
								name="mo_oauth_facebook_client_id"
								value="<?php 
    echo get_option("\x6d\157\137\x6f\141\165\164\x68\137\146\141\143\x65\142\157\157\153\x5f\143\x6c\x69\145\x6e\164\137\x69\x64");
    ?>
" /></td>
						</tr>

						<tr>
							<td><strong><font color="#FF0000">*</font>App Secret:</strong></td>
							<td><input class="mo_table_textbox" required type="text"
								placeholder="Click on Help to know more"
								name="mo_oauth_facebook_client_secret"
								value="<?php 
    echo get_option("\x6d\157\x5f\157\x61\165\x74\x68\x5f\x66\141\x63\x65\x62\x6f\x6f\153\x5f\143\154\x69\x65\x6e\x74\137\163\x65\x63\162\145\164");
    ?>
" /></td>
						</tr>

						<tr>
							<td>&nbsp;</td>
							<td><input type="submit" name="submit" value="Save settings"
								class="button button-primary button-large" />&nbsp;&nbsp; <input
								type="button" id="facebook_help" class="help" value="Help" /></td>
						</tr>
						<tr>
							<td colspan="2" id="facebook_instru" hidden>
								<p>
									<strong>Instructions:</strong>

								<ol>
									<li>Go to Facebook developers console <a
										href='https://developers.facebook.com/apps/'
										target="_blank">https://developers.facebook.com/apps/</a>.
									</li>
									<li>Click on Create a New App/Add new App button. You will need to register as a Facebook developer to create an App.</li>
									<li>Enter <b>Display Name</b>. And choose category.</li>
									<li>Click on <b>Create App ID</b>.</li>
									<li>From the left pane, select <b>Settings</b>.</li>
									<li>From the tabs above, select <b>Advanced</b>.</li>
									<li>Under <b>Client OAuth Settings</b>, enter <b><?php 
    echo site_url() . "\x2f\x6f\141\x75\x74\x68\x63\x61\154\x6c\x62\141\x63\153";
    ?>
</b> in Valid OAuth redirect URIs and click <b>Save Changes</b>.</li>
									<li>Paste your App ID/Secret provided by Facebook into the
										fields above.</li>
									<li>Click on the Save settings button.</li>
									<li>Go to Appearance->Widgets. Among the available widgets you
										will find miniOrange OAuth, drag it to the widget area where
										you want it to appear.</li>
									<li>Now logout and go to your site. You will see a login link
										where you placed that widget.</li>
								</ol>
								</p>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</form>

</div>

<?php 
}
function mo_eve_online_config()
{
    ?>

<div id="tab">
	<h2 class="nav-tab-wrapper">
		<a class="nav-tab" href="admin.php?page=mo_oauth_settings">Configure Apps</a>
		<a class="nav-tab nav-tab-active" href="admin.php?page=mo_oauth_eve_online_setup">Advanced EVE Online Settings</a>
		<a class="nav-tab" href="admin.php?page=mo_oauth_settings&tab=customization">Customizations</a>
		<a class="nav-tab" href="admin.php?page=mo_oauth_settings&tab=signinsettings">Sign In Settings</a>
		<a class="nav-tab" href="admin.php?page=mo_oauth_settings&tab=licensing">Licensing Plans</a>
		<a class="nav-tab" href="admin.php?page=mo_oauth_settings&tab=faq">FAQ</a>
	</h2>
</div>

<div id="mo_eve_online_config">
		<?php 
    $rU = mo_oauth_is_customer_registered();
    if ($rU) {
        goto IV;
    }
    ?>
<h4>NOTE: Please first Register with miniOrange and then enable EVE Online app to see Advanced EVE Online Settings dashboard.</h4>
<?php 
    goto Dn;
    IV:
    if (!get_option("\155\x6f\137\157\x61\165\164\x68\x5f\145\166\x65\157\x6e\x6c\151\x6e\145\x5f\x65\156\141\142\x6c\145")) {
        goto sg;
    }
    ?>
				<!--Get API Key details-->
	<form id="mo_eve_save_api_key" name="mo_eve_save_api_key" method="post"
		action="">
		<input type="hidden" name="option" value="mo_eve_save_api_key" />
		<div class="mo_eve_table_layout">
			<h4>Please enter your API Key details below.</h4>
			<table class="mo_settings_table">
				<tr>
					<td class="col1"><strong>Key ID:</strong></td>
					<td><input class="mo_table_textbox" required class="textbox"
						type="text" placeholder="Click on Help to know more"
						name="mo_eve_api_key"
						value="<?php 
    echo get_option("\155\157\137\x65\x76\x65\137\141\x70\151\x5f\x6b\x65\171");
    ?>
" /></td>
				</tr>

				<tr>
					<td class="col1"><strong>Verification Code:</strong></td>
					<td><input class="mo_table_textbox" required type="text"
						placeholder="Click on Help to know more"
						name="mo_eve_verification_code"
						value="<?php 
    echo get_option("\x6d\157\x5f\145\x76\x65\137\x76\x65\x72\x69\x66\x69\143\x61\x74\x69\157\x6e\x5f\143\157\x64\145");
    ?>
" /></td>
				</tr>
				<tr>
					<td class="col1">&nbsp;</td>
					<td><input type="submit" name="submit" value="Save"
						class="button button-primary button-large" />&nbsp;&nbsp; <input
						type="button" id="api_help" class="help" value="Help" /></td>
				</tr>
				<tr>
					<td colspan="2">
						<div id="api_instru" hidden>
							<p>
								<strong>Why do I need to enter API Key?</strong> <br /> API Key
								is required to get access to user public information. API Key
								will help filtering of users according to Corporation, Alliance
								or Character Name.
							</p>
							<p>
								<strong>How to get Key ID and Verification Code:</strong>


							<ol>
								<li>Login to your EVE Online account from <a
									href="https://community.eveonline.com/support/api-key/"
									target="_blank">https://community.eveonline.com/support/api-key/</a>.
								</li>
								<li>If you have already configured API KEY, paste it above.</li>
								<li>If you don't have an API KEY, click on CREATE NEW API KEY.</li>
								<li>Fill in the Name, Verification Code, Character and Type. Set
									Character to All.</li>
								<li>Select All for Account and Market, Communications, Private
									Information, Public Information and Science and Industry.</li>
								<li>Click on Submit. You will now see the KeyID and Verification
									Code on your screen with the new API Key added. Paste it above.</li>
							</ol>
							</p>
						</div>
					</td>

				</tr>
			</table>
		</div>
	</form>
	<!--Get list of allowed and denied corporations-->
	<form id="mo_eve_save_allowed" name="mo_eve_save_allowed" method="post"
		action="">
		<input type="hidden" name="option" value="mo_eve_save_allowed" />
		<div class="mo_eve_table_layout">
			<h4>Please choose the Corporations, Alliances or Character Name to be allowed. If none are mentioned, by default all corporations and alliances will be allowed.</h4>
			<table class="mo_settings_table">
				<tr>
					<td class="col1"><strong>Allowed Corporations:</strong></td>
					<td><input class="mo_eve_table_textbox"
						placeholder="Enter Corporation name separared by comma( , )"
						class="textbox" type="text" name="mo_eve_allowed_corps"
						value="<?php 
    echo get_option("\155\x6f\x5f\145\x76\145\x5f\141\x6c\x6c\157\x77\145\x64\137\143\x6f\162\160\163");
    ?>
" /></td>
				</tr>

				<tr>
					<td class="col1"><strong>Allowed Alliances:</strong></td>
					<td><input class="mo_eve_table_textbox"
						placeholder="Enter Alliance name separared by comma( , )"
						type="text" name="mo_eve_allowed_alliances"
						value="<?php 
    echo get_option("\x6d\157\x5f\x65\166\x65\x5f\x61\x6c\x6c\157\x77\145\144\137\x61\154\154\151\x61\x6e\x63\x65\163");
    ?>
" /></td>
				</tr>

				<tr>
					<td class="col1"><strong>Allowed Characters (Character Name):</strong></td>
					<td><input class="mo_eve_table_textbox"
						placeholder="Enter Character Name separared by comma( , )"
						type="text" name="mo_eve_allowed_char_name"
						value="<?php 
    echo get_option("\x6d\157\137\x65\166\145\137\141\x6c\154\157\167\145\x64\137\x63\x68\x61\x72\x5f\x6e\x61\155\x65");
    ?>
" /></td>
				</tr>
				<tr>
					<td class="col1">&nbsp;</td>
					<td><input type="submit" name="submit" value="Save"
						class="button button-primary button-large" /></td>
				</tr>
				<tr>
					<td colspan="2">
						<p>
							<strong>How do I see my Corporation, Alliance and Character Name
								from EVE Online?</strong> <br /> You can view your Corporation,
							Alliance and Character Name in your Edit Profile. Copy the
							following code in the end of your theme's `Theme
							Functions(functions.php)`. You can find `Theme
							Functions(functions.php)` in `Appearance->Editor`. <br />
							<br />
							<code>
								add_action( 'show_user_profile', 'mo_oauth_my_show_extra_profile_fields' );<br />
								add_action( 'edit_user_profile', 'mo_oauth_my_show_extra_profile_fields' );
							</code>
						</p>
					</td>

				</tr>
			</table>
		</div>
	</form>
				<?php 
    goto Vq;
    sg:
    ?>
				<h4>NOTE: Please enable EVE Online app to see Advanced EVE Online Settings dashboard.</h4>
				<?php 
    Vq:
    ?>
			</div>
<?php 
    Dn:
}
function miniorange_support()
{
    ?>
	<div class="mo_support_layout">
		<!--<h3>Support</h3>
		<div >
			<p>Your general questions can be asked in the plugin <a href="https://wordpress.org/support/plugin/miniorange-login-with-eve-online-google-facebook" target="_blank">support forum</a>.</p>
		</div>
		<div style="text-align:center;">
			<h4>OR</h4>
		</div>-->
		<div>
			<h3>Contact Us</h3>
			<p>Need any help? Couldn't find an answer in <a href="<?php 
    echo add_query_arg(array("\164\x61\x62" => "\146\141\161"), $_SERVER["\x52\105\121\125\105\123\x54\137\x55\x52\x49"]);
    ?>
">FAQ</a>?<br>Just send us a query so we can help you.</p>
			<form method="post" action="">
				<input type="hidden" name="option" value="mo_oauth_contact_us_query_option" />
				<table class="mo_settings_table">
					<tr>
						<td><b><font color="#FF0000">*</font>Email:</b></td>
						<td><input type="email" class="mo_table_textbox" required name="mo_oauth_contact_us_email" value="<?php 
    echo get_option("\x6d\157\137\x6f\x61\165\164\150\x5f\141\144\155\151\x6e\137\145\155\x61\x69\x6c");
    ?>
"></td>
					</tr>
					<tr>
						<td><b>Phone:</b></td>
						<td><input type="tel" id="contact_us_phone" pattern="[\+]\d{11,14}|[\+]\d{1,4}[\s]\d{9,10}" class="mo_table_textbox" name="mo_oauth_contact_us_phone" value="<?php 
    if (!(get_option("\155\157\137\157\141\165\164\150\x5f\141\x64\155\151\156\137\x70\x68\157\156\x65") != "\x66\x61\x6c\163\145")) {
        goto Cz;
    }
    echo get_option("\x6d\x6f\137\x6f\141\x75\164\150\x5f\141\x64\155\x69\156\137\x70\x68\x6f\156\145");
    Cz:
    ?>
"></td>
					</tr>
					<tr>
						<td><b><font color="#FF0000">*</font>Query:</b></td>
						<td><textarea class="mo_table_textbox" onkeypress="mo_oauth_valid_query(this)" onkeyup="mo_oauth_valid_query(this)" onblur="mo_oauth_valid_query(this)" required name="mo_oauth_contact_us_query" rows="4" style="resize: vertical;"></textarea></td>
					</tr>
				</table>
				<div style="text-align:center;">
					<input type="submit" name="submit" style="margin:15px; width:100px;" class="button button-primary button-large" />
				</div>
				<p>If you want custom features in the plugin, just drop an email at <a href="mailto:[email protected]">[email protected]</a>.</p>
			</form>
		</div>
	</div>
	<script>
		jQuery("#contact_us_phone").intlTelInput();
		function mo_oauth_valid_query(f) {
			!(/^[a-zA-Z?,.\(\)\/@ 0-9]*$/).test(f.value) ? f.value = f.value.replace(
					/[^a-zA-Z?,.\(\)\/@ 0-9]/, '') : null;
		}
	</script>
<?php 
}
function mo_oauth_show_otp_verification()
{
    ?>
		<!-- Enter otp -->
		<form name="f" method="post" id="otp_form" action="">
			<input type="hidden" name="option" value="mo_oauth_validate_otp" />
				<div class="mo_table_layout">
					<div id="panel5">
						<table class="mo_settings_table">
							<h3>Verify Your Email</h3>
							<tr>
								<td><b><font color="#FF0000">*</font>Enter OTP:</b></td>
								<td><input class="mo_table_textbox" autofocus="true" type="text" name="mo_oauth_otp_token" required placeholder="Enter OTP" style="width:61%;" pattern="[0-9]{6,8}"/>
								 &nbsp;&nbsp;<a style="cursor:pointer;" onclick="document.getElementById('mo_oauth_resend_otp_form').submit();">Resend OTP</a></td>
							</tr>
							<tr>
								<td>&nbsp;</td>
								<td><br /><input type="submit" name="submit" value="Validate OTP" class="button button-primary button-large" />
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									<input type="button" name="back-button" id="mo_oauth_back_button" onclick="document.getElementById('mo_oauth_change_email_form').submit();" value="Back" class="button button-primary button-large" />
								</td>
							</tr>
						</table>
					</div>
				</div>
		</form>
		<form name="f" id="mo_oauth_resend_otp_form" method="post" action="">
			<input type="hidden" name="option" value="mo_oauth_resend_otp"/>
		</form>
		<form id="mo_oauth_change_email_form" method="post" action="">
			<input type="hidden" name="option" value="mo_oauth_change_email" />
		</form>
<?php 
}
?>

Function Calls

None

Variables

None

Stats

MD5 339b9656af13a695c3e488402ba13501
Eval Count 0
Decode Time 98 ms