Exemplo n.º 1
0
"  name="mobfox_uid" id="mobfox_uid" size="28" class="" />									<label for="mobfox_uid">MobFox Username/E-Mail</label>
								</div>
							</div> <!-- .field-group -->
                            
                            <div class="field-group">
			
								<div class="field">
<input type="password" value=""  placeholder="Enter your MobFox Password..." name="mobfox_password" id="mobfox_password" size="28" class="" />									<label for="mobfox_password">MobFox Password</label>
								</div>
							</div> <!-- .field-group -->
                            
                            <div class="field-group">
			
								<div class="field">
									<?php 
if (mfconcheck(getconfig_var('mobfox_uid'), getconfig_var('mobfox_password'), 1)) {
    echo '<span style="margin-left:4px; color:#090;">Active</span>';
} else {
    echo '<span style="margin-left:4px; color:#900;">Failed</span>';
}
?>
									<label for="db_v">Connection Status</label>
								</div>
							</div> <!-- .field-group -->
                            
                           
                            
                             
                             
                            
                            <div class="actions">						
Exemplo n.º 2
0
function check_mf($data)
{
    if (!isset($data['mobfox_connect_type']) or $data['mobfox_connect_type'] != 1 && $data['mobfox_connect_type'] != 2) {
        global $errormessage;
        $errormessage = "Please tell us if you would like to use your existing account for MobFox:Connect, or if you'd like to create a new one.";
        global $editdata;
        $editdata = $data;
        return false;
    }
    if ($data['mobfox_connect_type'] == 1) {
        if (empty($data['mf_user']) or empty($data['mf_pass'])) {
            global $errormessage;
            $errormessage = "Please enter your MobFox User Name and Password.";
            global $editdata;
            $editdata = $data;
            return false;
        }
        if (!mfconcheck($data['mf_user'], md5($data['mf_pass']), 0)) {
            global $errormessage;
            $errormessage = "Unable to validate your MobFox login credentials. Please try again.";
            global $editdata;
            $editdata = $data;
            return false;
        }
    } else {
        if ($data['mobfox_connect_type'] == 2) {
            if (empty($data['mf_email']) or empty($data['mf_password']) or empty($data['mf_password2']) or empty($data['mf_first_name']) or empty($data['mf_last_name'])) {
                global $errormessage;
                $errormessage = "Please enter all required fields.";
                global $editdata;
                $editdata = $data;
                return false;
            }
            if ($data['mf_password'] != $data['mf_password2']) {
                global $errormessage;
                $errormessage = 'The passwords you entered to not match.';
                global $editdata;
                $editdata = $data;
                return false;
            }
            if (!c_m_f($data)) {
                global $errormessage;
                global $editdata;
                $editdata = $data;
                return false;
            }
        }
    }
    if (finalize_install($data)) {
        return true;
    } else {
        global $errormessage;
        global $editdata;
        $editdata = $data;
        return false;
    }
}
Exemplo n.º 3
0
function mf_prelogin_check()
{
    $time_since_last_mf_check = time() - getconfig_var('last_mf_check');
    if ($time_since_last_mf_check >= MAD_MFCHECK_INTERVAL_DASHBOARD or !is_numeric(getconfig_var('last_mf_check'))) {
        if (!mfconcheck(getconfig_var('mobfox_uid'), getconfig_var('mobfox_password'), 0)) {
            MAD_Admin_Redirect::redirect('settings_mfconnect.php?failed=1');
            exit;
        } else {
            update_configvar('last_mf_check', time());
        }
    }
}