Esempio n. 1
0
        $cookie_exp_time = 0;
    }
    setcookie($config_cookie_name, $pony_db->auth_cookie, $cookie_exp_time);
} else {
    // authentication failed
    // try to authenticate using cookie
    if ($auth_cookie) {
        $authentication_success = $pony_db->autneticate_cookie($auth_cookie);
        if ($authentication_success) {
            $authentication_login = $pony_db->login;
        }
    }
}
// ajax ping code
// should be displayed before authorization form
if ($admin_routine == 'ping' && $admin_action == 'ping' && $authentication_success && $token === assign($_REQUEST['token']) && ($show_domains && ($pony_db->priv_is_admin() || $show_domains_to_users))) {
    $domain_id = trim(assign($_REQUEST['domain_id']));
    $find_domain_result = $pony_db->find_domain($domain_id);
    if (is_array($find_domain_result) && $find_domain_result && count($find_domain_result) == 3) {
        list($ping_url, $ping_time, $ping_status) = $find_domain_result;
        if (curl_ping($ping_url)) {
            $pony_db->update_domain($domain_id, 'OK');
            die("<span class=\"check\"></span>");
        }
    }
    $pony_db->update_domain($domain_id, 'FAIL');
    die("<span class=\"cross\"></span>");
}
if ($admin_action == 'chart' && strlen($admin_routine) && $authentication_success && $token === assign($_REQUEST['token'])) {
    require_once 'includes/chart.php';
    die;
Esempio n. 2
0
        if (is_array($find_domain_result) && $find_domain_result && count($find_domain_result) == 3) {
            list($ping_url, $ping_time, $ping_status) = $find_domain_result;
            if (curl_ping($ping_url)) {
                $pony_db->update_domain($domain_id, 'OK');
                die("<span class=\"check\"></span>");
            }
        }
    }
    $pony_db->update_domain($domain_id, 'FAIL');
    die("<span class=\"cross\"></span>");
}
if ($admin_action == 'chart' && strlen($admin_routine)) {
    require_once 'includes/chart.php';
    die;
}
$smarty->assign('priv_is_admin', $pony_db->priv_is_admin());
$smarty->assign('priv_can_delete', $pony_db->priv_can_delete());
$smarty->assign('authentication_success', $authentication_success);
$smarty->assign('show_help_to_users', $show_help_to_users);
$smarty->assign('show_http_to_users', $show_http_to_users);
$smarty->assign('show_logons_to_users', $show_logons_to_users);
$smarty->assign('show_other_to_users', $show_other_to_users);
$smarty->assign('enable_http_mode', $enable_http_mode);
$smarty->assign('disable_ip_logger', $disable_ip_logger);
$smarty->assign('enable_email_mode', $enable_email_mode);
$smarty->assign('show_email_to_users', $show_email_to_users);
function smarty_assign_continents($smarty)
{
    $smarty_geo_continents = array();
    $geo_ip = new GeoIP();
    $k = 0;