Ejemplo n.º 1
0
function loantin(&$ch, $url, &$startURLList, &$countSuccess, $MAX_COUNT_SUCCESS, $index, &$db)
{
    if ($countSuccess >= $MAX_COUNT_SUCCESS) {
        return true;
    }
    echo $url . "\n";
    $id = $url;
    if (!checkVisited($db, $index, $id)) {
        curl_setopt($ch, CURLOPT_URL, "http://muachung.vn/ajax.php?act=connect&mccode=check-loantin");
        initCommonCURL($ch);
        $params = array("item_id" => $id, "yahoo" => "1", "facebook" => "0", "content" => "", "rand" => randomFloat());
        curl_setopt($ch, CURLOPT_POST, count($params));
        $fields_string = "";
        foreach ($params as $key => $value) {
            $fields_string .= $key . '=' . urlencode($value) . '&';
        }
        rtrim($fields_string, '&');
        curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
        $output = curl_exec($ch);
        echo "id:" . $id . ", result:" . $output . "\n";
        if ('{"err":-1,"msg":"done"}' == trim($output)) {
            visited($db, $index, $id);
        }
        if (startsWith(trim($output), '{"err":0,"msg":"done"')) {
            visited($db, $index, $id);
            $countSuccess = $countSuccess + 1;
            if ($countSuccess >= $MAX_COUNT_SUCCESS) {
                return true;
            }
        }
        if ('{"err":-1,"msg":"not_login"}' == trim($output)) {
            return true;
        }
    }
    return false;
}
Ejemplo n.º 2
0
	include_once('ressources/class.squid.inc');
	include_once('ressources/class.dansguardian.inc');
	header("Pragma: no-cache");	
	header("Expires: 0");
	header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
	header("Cache-Control: no-cache, must-revalidate");	
	$user=new usersMenus();
	if(!$user->AsSquidAdministrator){
		$tpl=new templates();
		echo "alert('".$tpl->javascript_parse_text("{ERROR_NO_PRIVS}").");";
		exit;
		
	}
	
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["visited"])){visited();exit;}
	if(isset($_GET["visited-list"])){visited_list();exit;}
	
	if(isset($_GET["no-cat"])){not_categorized();exit;}
	if(isset($_GET["no-cat-list"])){not_categorized_list();exit;}
	
	if(isset($_GET["yes-cat"])){categorized();exit;}
	if(isset($_GET["yes-cat-list"])){categorized_list();exit;}	
	
	
	if(isset($_GET["free-cat"])){free_catgorized();exit;}
	if(isset($_POST["textToParseCats"])){free_catgorized_save();exit;}
	
	if(isset($_GET["params"])){parameters();exit;}
	if(isset($_GET["EnableCommunityFilters"])){parameters_save();exit;}
	
    die;
}
if (isset($_GET["popup"])) {
    popup();
    exit;
}
if (isset($_GET["tabs"])) {
    tabs();
    exit;
}
if (isset($_GET["display-synthesis"])) {
    synthesis();
    exit;
}
if (isset($_GET["visited"])) {
    visited();
    exit;
}
if (isset($_GET["websites-search"])) {
    visited_search();
    exit;
}
if (isset($_GET["users-form"])) {
    users_form();
    exit;
}
if (isset($_GET["users-search"])) {
    users_search();
    exit;
}
if (isset($_GET["paragraphe1"])) {