Aldigim hata:
Fatal error: Cannot redeclare callback() (previously declared in /var/www/vhosts/******/httpdocs/Sources/Functions_Boot.php:21) in /var/www/vhosts/*****/httpdocs/Posts/add_mirror.php on line 3
add-mirror.php
[QUOTE]
function callback($class, $text){
return '
'.$text.'
';
}
function get_site_content($site){
$ch = curl_init();
$agent = "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7";
curl_setopt($ch,CURLOPT_URL,$site);
curl_setopt($ch,CURLOPT_AUTOREFERER,1);
curl_setopt($ch,CURLOPT_USERAGENT,$agent);
curl_exec($ch);
curl_close($ch);
}
$user = urlencode(__P('user'));
$cause = __P('cause');
$adrs = strip_tags($_POST["address"]);
$technic = __P('technic');
$_type = __P('add-type');
if($user == "" || $cause == "" || $adrs == "" || $technic == ""){
_refresh('2', URL.'/add-mirror');
die(callback('red', 'Form alanını doldurun.'));
}
// User Control
if($db->num_rows("SELECT Username FROM users WHERE Username='$user'") <= 0){
_refresh('2', URL.'/add-mirror');
die(callback("red", "Böyle bir kullanıcı yok. Kayıt ekleyebilmek için önce üye olmalısın."));
}
$userID = _username_to_id($user);
if ($_type != "mass") {
$address = str_replace(array("http://", "https://"), "", $adrs);
if(strstr(trim($address, '/'), '/')){
$_home = '0';
}else{
$_home = '1';
}
if(strstr($adrs, "https://")){
$site_content = file_get_contents('https://'.$address);
}else{
$site_content = file_get_contents('http://'.$address);
}
$site_content = $db->escape_string($site_content);
if(empty($site_content)){die(callback("red", "Eklenen site içeriği boş."));}
$addm = $db->query("INSERT INTO `mirrors` (`id`, `UserID`, `SiteURL`, `SiteContent`, `Cause`, `Technic`, `Time`, `Verify`, `Home`)
VALUES (NULL, '$userID', '$address', '$site_content', '$cause', '$technic', '".time()."', NULL, '$_home')");
if(!$addm){
echo callback("red", "Bir hata oluştu. Lütfen daha sonra deneyin.".$db->error);
}else{
_refresh("1", URL."/hacker/".$user);
echo callback("green", "Mirror başarıyla eklendi.");
}
}else{// ! mass
$as = explode("
", nl2br($adrs));
$_count = count($as);
$ai = 0;
while ($ai < $_count) {
$address = str_replace(array("http://", "https://"), "", $as[$ai]);
if(strstr(trim($address, '/'), '/')){
$_home = '0';
}else{
$_home = '1';
}
if(strstr($adrs, "https://")){
$site_content = file_get_contents('https://'.$address);
}else{
$site_content = file_get_contents('http://'.$address);
}
$site_content = $db->escape_string($site_content);
//if(empty($site_content)){die(callback("red", "Eklenen site içeriği boş."));}
$addm = $db->query("INSERT INTO `mirrors` (`id`, `UserID`, `SiteURL`, `SiteContent`, `Cause`, `Technic`, `Time`, `Verify`, `Home`)
VALUES (NULL, '$userID', '$address', '$site_content', '$cause', '$technic', '".time()."', NULL, '$_home')");
if(!$addm){
echo callback("red", "Bir hata oluştu. Lütfen daha sonra deneyin : ".$address.' '.$db->error);
}else{
echo callback("green", "Mirror başarıyla eklendi : ".$address);
}
$ai++;
}
_refresh("1", URL."/hacker/".$user);
}
?>/QUOTE]