<?
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////   MISOFT 2018 V. 1.0.0.0    ////////////////////////////////////
///////////////////////////////////  OFSITE - www.misoft.store  ////////////////////////////////////
/////////////////////////////////// MAIL - support@misoft.store ////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

session_start();
set_time_limit( 0 );
header( 'Content-type: text/html; charset=windows-1251' );

define( 'ROOT_DIR', $_SERVER['DOCUMENT_ROOT'] );
include_once ROOT_DIR . '/engine/config.php'; /// config base
include_once ROOT_DIR . '/engine/function.php'; /// php_function
define( 'ROOT', 'http://'.$config_site['site_url'] );

### Оплата за просмотр динамической ссылки
if ( $_GET['func'] == 'serf_ok' ) {
    
    if ( !isset( $_SESSION['iduser'] ) ) exit();
    
    if ( $_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest' ) exit();
	
	$Num = check_text( $_POST['num'] );
	$Answer = check_text( $_POST['answer'] );
	
	if ( !$config_user['activate'] ) {
		exit();
	} else
    
    if ( $_SESSION['timer_serf'] > time() ) {
        $json['ok'] = 1;
        $json['text'] = iconv( 'windows-1251', 'UTF-8', 'Ошибка!' );
        print json_encode( $json );
        exit();
    }
	
	if( isset($Answer) AND isset($Num) AND isset($_SESSION["captcha_keystring"]) AND md5(strtoupper(limpiar($Answer))) == md5(strtoupper($_SESSION["captcha_keystring"])) AND strtoupper(limpiar($Num)) == strtoupper(md5($_SESSION["codes"])) ) {

		unset($_SESSION["captcha_keystring"]);
		unset($_SESSION["hash1"]);
		unset($_SESSION["hash2"]);
		unset($_SESSION["codes"]);
			
		$get_serf = mysql_query( "SELECT * FROM dynlink t1  WHERE t1.paused = 1 and t1.id = '" . ( int ) $_POST['id'] . "' and NOT EXISTS ( SELECT ident, iduser FROM dynlink_temp t2 WHERE t1.id = t2.ident and t2.iduser = '" . $_SESSION['iduser'] . "' ) LIMIT 1" );
		
		if ( mysql_num_rows( $get_serf ) < 1 ) {
			$json['ok'] = 1;
			$json['text'] = iconv( 'windows-1251', 'UTF-8', 'Вы уже просматривали данную ссылку!' );
			print json_encode( $json );
			exit();
		}
		
		$get_serf_row = mysql_fetch_array( $get_serf );
		
		#если стоит функция только для свободных рефералов
		if ( $get_serf_row['freeid'] and $config_user['referer'] != 0 ) {
			$json['ok'] = 1;
			$json['text'] = iconv( 'windows-1251', 'UTF-8', 'Просмотр не доступен!' );
			print json_encode( $json );
			exit();
		}
		
		if ( $get_serf_row['plus'] ) {
			$prov_serf_plus = mysql_query( "SELECT id FROM dynlink_plus WHERE iduser = '" . $_SESSION['iduser'] . "' LIMIT 1" );
			if ( !mysql_num_rows( $prov_serf_plus ) ) {
				$json['ok'] = 1;
				$json['text'] = iconv( 'windows-1251', 'UTF-8', 'Вы не активировали серфинг Plus!' );
				print json_encode( $json );
				exit();
			}
		}
		
		switch ( $get_serf_row['timer'] ) {
			case 0: $stymer = $config['dyn10']; break;
			case 1: $stymer = $config['dyn20']; break;
			case 2: $stymer = $config['dyn30']; break;
			case 3: $stymer = $config['dyn40']; break;
			case 4: $stymer = $config['dyn50']; break;
			case 5: $stymer = $config['dyn60']; break;
			case 6: $stymer = $config['dyn70']; break;
			case 7: $stymer = $config['dyn80']; break;
			case 8: $stymer = $config['dyn90']; break;
			case 9: $stymer = $config['dyn100']; break;
			case 10: $stymer = $config['dyn125']; break;
			case 11: $stymer = $config['dyn150']; break;
			case 12: $stymer = $config['dyn200']; break;
			case 13: $stymer = $config['dyn250']; break;
			case 14: $stymer = $config['dyn300']; break;
		}
		
		if ( $get_serf_row['balance'] < ( $get_serf_row['obper'] * $config['obper'] ) + ( $get_serf_row['vip'] * $config['vipdyn'] ) + $stymer and $get_serf_row['testdrive'] == 0) {
			$json['ok'] = 1;
			$json['text'] = iconv( 'windows-1251', 'UTF-8', 'Недостаточно средств на балансе!' );
			print json_encode( $json );
			exit();
		}
		
		#зачисляем рефбек рефералу I уровня
		if ( $config_user['referer'] != 0 ) {
			$ref_1 = mysql_fetch_array( mysql_query( "SELECT reyting FROM user WHERE id = '" . $config_user['referer'] . "'" ) );
			
			if ( $ref_1['reyting'] >= $config_site['status_meaning_1a'] and $ref_1['reyting'] <= $config_site['status_meaning_1b'] ) {
				$ref1_back = ( $stymer * $config['factor'] * $config['st1'] );
			} else
			if ( $ref_1['reyting'] >= $config_site['status_meaning_2a'] and $ref_1['reyting'] <= $config_site['status_meaning_2b'] ) {
				$ref1_back = ( $stymer * $config['factor'] * $config['st2'] );
			} else
			if ( $ref_1['reyting'] >= $config_site['status_meaning_3a'] and $ref_1['reyting'] <= $config_site['status_meaning_3b'] ) {
				$ref1_back = ( $stymer * $config['factor'] * $config['st3'] );
			} else
			if ( $ref_1['reyting'] >= $config_site['status_meaning_4a'] and $ref_1['reyting'] <= $config_site['status_meaning_4b'] ) {
				$ref1_back = ( $stymer * $config['factor'] * $config['st4'] );
			} else
			if ( $ref_1['reyting'] >= $config_site['status_meaning_5a'] and $ref_1['reyting'] <= $config_site['status_meaning_5b'] ) {
				$ref1_back = ( $stymer * $config['factor'] * $config['st5'] );
			} else
			if ( $ref_1['reyting'] >= $config_site['status_meaning_6a'] ) {
				$ref1_back = ( $stymer * $config['factor'] * $config['st6'] );
			} else {
				$ref1_back = 0;
			}
			
			if ( !is_numeric( $ref1_back ) ) $ref1_back = 0;
			$my_refback = $ref1_back * ( $config_user['autoproc'] / 100 );
			if ( !is_numeric( $my_refback ) ) $my_refback = 0;
			$ref1_refback = $ref1_back - $my_refback;
			if ( !is_numeric( $ref1_refback ) ) $ref1_refback = 0;
			mysql_query( "UPDATE user SET money = money + '" . $ref1_refback . "' WHERE id = '" . $config_user['referer'] . "' LIMIT 1" );
		}
		#зачисляем рефбек рефералу II уровня
		if ( $config_user['referer2'] != 0 ) {
			$ref_2 = mysql_fetch_array( mysql_query( "SELECT reyting FROM user WHERE id = '" . $config_user['referer2'] . "' LIMIT 1" ) );
			
			if ( $ref_2['reyting'] >= $config_site['status_meaning_1a'] and $ref_2['reyting'] <= $config_site['status_meaning_1b'] ) {
				$ref2_back = $config['st7'];
			} else
			if ( $ref_2['reyting'] >= $config_site['status_meaning_2a'] and $ref_2['reyting'] <= $config_site['status_meaning_2b'] ) {
				$ref2_back = $config['st8'];
			} else
			if ( $ref_2['reyting'] >= $config_site['status_meaning_3a'] and $ref_2['reyting'] <= $config_site['status_meaning_3b'] ) {
				$ref2_back = $config['st9'];
			} else
			if ( $ref_2['reyting'] >= $config_site['status_meaning_4a'] and $ref_2['reyting'] <= $config_site['status_meaning_4b'] ) {
				$ref2_back = $config['st10'];
			} else
			if ( $ref_2['reyting'] >= $config_site['status_meaning_5a'] and $ref_2['reyting'] <= $config_site['status_meaning_5b'] ) {
				$ref2_back = $config['st11'];
			} else
			if ( $ref_2['reyting'] >= $config_site['status_meaning_6a'] ) {
				$ref2_back = $config['st12'];
			} else {
				$ref2_back = 0;
			}
			
			if ( !is_numeric( $ref2_back ) ) $ref2_back = 0;
			mysql_query( "UPDATE user SET money = money + '" . $ref2_back . "' WHERE id = '" . $config_user['referer2'] . "' LIMIT 1" );
		}
		
		$money_minus = ( $get_serf_row['obper'] * $config['obper'] ) + ( $get_serf_row['vip'] * $config['vipdyn'] ) + $stymer;
		$my_money = moneyraund( ( $stymer * $config['factor'] ) + $my_refback, 3 );
		
		#тут мы списание средст с рекламной площадки сделаи только в том случае, если это платная площадка (не тест драйв)
		if($get_serf_row['testdrive'] == 0) {
			mysql_query( "UPDATE dynlink SET balance = balance - '" . $money_minus . "', visits = visits + 1 WHERE id = '" . ( int ) $_POST['id'] . "' LIMIT 1" );
		} else {
			mysql_query( "UPDATE dynlink SET visits = visits + 1 WHERE id = '" . ( int ) $_POST['id'] . "' LIMIT 1" );
		}
		
		#Зачисляем оплату кликеру
		mysql_query( "UPDATE user SET earnings_serf = earnings_serf + '" . $my_money . "', money = money + '" . $my_money . "', toref = toref + '" . $ref1_refback . "', toref2 = toref2 + '" . $ref2_back . "', serf_view = serf_view + 1 WHERE id = '" . $_SESSION['iduser'] . "' LIMIT 1" );
		mysql_query( "INSERT INTO dynlink_temp SET ident = '" . ( int ) $_POST['id'] . "', iduser = '" . $_SESSION['iduser'] . "', date = '" . time() . "' + 86400" );
		
		#тут мы сделали запись прибили в статистику только если это платная площадка, в случае тестдрайва, мы наоборот отнимаем с прибили деньги выплаченые кликеру и рефбек
		if($get_serf_row['testdrive'] == 0) {
			$viruchka = $money_minus - $ref1_refback - $my_money - $ref2_back;
			mysql_query( "UPDATE viruchka SET money = money + '" . $viruchka . "' WHERE ident = 1" );
		} else {
			$viruchka = $ref1_refback + $my_money + $ref2_back;
			mysql_query( "UPDATE viruchka SET money = money - '" . $viruchka . "' WHERE ident = 1" );
		}
		
		#конкурсы от реферера
		if ( $config_user['referer'] != 0 and $config_user['activate'] == 1) {
			#кликер
			$chKonkursWan = mysql_query( "SELECT * FROM contests WHERE type = 0 and date_end > '". time() ."' and autor = '".$config_user['referer']."' LIMIT 1" );
			if ( mysql_num_rows( $chKonkursWan ) > 0 ) {
				$chKonkursRowWan = mysql_fetch_array( $chKonkursWan );
				$chKonkursTempWan = mysql_query( "SELECT id FROM contests_temp WHERE iduser = '" . $_SESSION['iduser'] . "' and id_konkurs = '" . $chKonkursRowWan['id'] . "' and type = 0" );
				if ( mysql_num_rows( $chKonkursTempWan ) > 0 ) {
					mysql_query( "UPDATE contests_temp SET summ = summ + 1 WHERE iduser = '" . $_SESSION['iduser'] . "' and type = 0 and id_konkurs = '" . $chKonkursRowWan['id'] . "' LIMIT 1" );
				} else {
					mysql_query( "INSERT INTO contests_temp SET id_konkurs = '" . $chKonkursRowWan['id'] . "', iduser = '" . $_SESSION['iduser'] . "', summ = 1, type = 0" );
				}
			}
			#комплексный
			$chKonkursComplex = mysql_query( "SELECT * FROM contests WHERE type = 3 and date_end > '". time() ."' and autor = '".$config_user['referer']."' LIMIT 1" );
			if ( mysql_num_rows( $chKonkursComplex ) > 0 ) {
				$chKonkursRowComplex = mysql_fetch_array( $chKonkursComplex );
				$chKonkursTempComplex = mysql_query( "SELECT id FROM contests_temp WHERE iduser = '" . $_SESSION['iduser'] . "' and id_konkurs = '" . $chKonkursRowComplex['id'] . "' and type = 3" );
				if ( mysql_num_rows( $chKonkursTempComplex ) > 0 ) {
					mysql_query( "UPDATE contests_temp SET summ = summ + 1 WHERE iduser = '" . $_SESSION['iduser'] . "' and type = 3 and id_konkurs = '" . $chKonkursRowComplex['id'] . "' LIMIT 1" );
				} else {
					mysql_query( "INSERT INTO contests_temp SET id_konkurs = '" . $chKonkursRowComplex['id'] . "', iduser = '" . $_SESSION['iduser'] . "', summ = 1, type = 3" );
				}
			}
		}
		
		#Создаем по днях статистику зароботка
		mysql_query( "INSERT INTO earnings_statistics SET iduser = '" . $_SESSION['iduser'] . "', summ = '1', date = '" . time() . "', ident = '" . $get_serf_row['id'] . "', type = '1'" );
		
		#Создаем по днях статистику площадки
		if ( empty( $get_serf_row['statistic'] ) ) {
			$array[date( 'dmY' )] = 1;
			mysql_query( "UPDATE dynlink SET statistic = '" . serialize( $array ) . "' WHERE id = '" . $get_serf_row['id'] . "' LIMIT 1" );
		} else {
			$array = unserialize( $get_serf_row['statistic'] );
			if ( array_key_exists( date( 'dmY' ), $array ) ) {
				$arrayValue = $array[date( 'dmY' )];
				$arrayValueNew = array( date( 'dmY' ) => $arrayValue + 1 );
				$array = @array_replace( $array, $arrayValueNew );
				mysql_query( "UPDATE dynlink SET statistic = '" . serialize( $array ) . "' WHERE id = '" . $get_serf_row['id'] . "' LIMIT 1" );
			} else {
				$array[date( 'dmY' )] = 1;
				mysql_query( "UPDATE dynlink SET statistic = '" . serialize( $array ) . "' WHERE id = '" . $get_serf_row['id'] . "' LIMIT 1" );
			}
		}
		
		if ( $get_serf_row['obper'] == 1 ) {
			$json['ok'] = 2;
			print json_encode( $json );
			exit();
		} else {
			$json['ok'] = 1;
			$json['text'] = iconv( 'windows-1251', 'UTF-8', '<i class="fa fa-money" aria-hidden="true"></i> Вам зачислено: <b>' . $my_money . '</b> ' . $config['valutaname'] .' '  );
		}
		
		print json_encode( $json );
		exit();
	
	} else {
		unset($_SESSION["captcha_keystring"]);
		unset($_SESSION["hash1"]);
		unset($_SESSION["hash2"]);
		unset($_SESSION["codes"]);
			
		$json['ok'] = 1;
		$json['text'] = iconv( 'windows-1251', 'UTF-8', '<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Просмотр не засчитан, капча не пройдена!' );
		print json_encode( $json );
		exit();
	}
}

### Оплата за просмотр авто-серфинг ссылки
if ( $_GET['func'] == 'autoserf_ok' ) {
    
    if ( !isset( $_SESSION['iduser'] ) ) exit();
    
    if ( $_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest' ) exit();
    
	if ( !$config_user['activate'] ) {
		exit();
	} else
	
    if ( $_SESSION['timer_serf'] > time() ) {
        $json['ok'] = 1;
        $json['text'] = iconv( 'windows-1251', 'UTF-8', 'Ошибка!' );
        print json_encode( $json );
        exit();
    }
    
    $get_serf = mysql_query( "SELECT * FROM autodynlink t1  WHERE t1.paused = 1 and t1.id = '" . ( int ) $_POST['id'] . "' and NOT EXISTS ( SELECT ident, iduser FROM autodynlink_temp t2 WHERE t1.id = t2.ident and t2.iduser = '" . $_SESSION['iduser'] . "' ) LIMIT 1" );
    
    if ( mysql_num_rows( $get_serf ) < 1 ) {
        $json['ok'] = 1;
        $json['text'] = iconv( 'windows-1251', 'UTF-8', 'Вы уже просматривали данную ссылку!' );
        print json_encode( $json );
        exit();
    }
    
    $get_serf_row = mysql_fetch_array( $get_serf );
    
    #если стоит функция только для свободных рефералов
    if ( $get_serf_row['freeid'] and $config_user['referer'] != 0 ) {
        $json['ok'] = 1;
        $json['text'] = iconv( 'windows-1251', 'UTF-8', 'Просмотр не доступен!' );
        print json_encode( $json );
        exit();
    }   

    switch ( $get_serf_row['timer'] ) {
        case 0: $stymer = $config['autodyn10']; break;
        case 1: $stymer = $config['autodyn20']; break;
        case 2: $stymer = $config['autodyn30']; break;
        case 3: $stymer = $config['autodyn40']; break;
        case 4: $stymer = $config['autodyn50']; break;
        case 5: $stymer = $config['autodyn60']; break;
    }
    
    if ( $get_serf_row['balance'] < $stymer ) {
        $json['ok'] = 1;
        $json['text'] = iconv( 'windows-1251', 'UTF-8', 'Недостаточно средств на балансе!' );
        print json_encode( $json );
        exit();
    }
    
	#зачисляем рефбек рефералу I уровня
    if ( $config_user['referer'] != 0 ) {
        $ref_1 = mysql_fetch_array( mysql_query( "SELECT reyting FROM user WHERE id = '" . $config_user['referer'] . "'" ) );
        
        if ( $ref_1['reyting'] >= $config_site['status_meaning_1a'] and $ref_1['reyting'] <= $config_site['status_meaning_1b'] ) {
            $ref1_back = ( $stymer * $config['factor'] * $config['st1'] );
        } else
        if ( $ref_1['reyting'] >= $config_site['status_meaning_2a'] and $ref_1['reyting'] <= $config_site['status_meaning_2b'] ) {
            $ref1_back = ( $stymer * $config['factor'] * $config['st2'] );
        } else
        if ( $ref_1['reyting'] >= $config_site['status_meaning_3a'] and $ref_1['reyting'] <= $config_site['status_meaning_3b'] ) {
            $ref1_back = ( $stymer * $config['factor'] * $config['st3'] );
        } else
        if ( $ref_1['reyting'] >= $config_site['status_meaning_4a'] and $ref_1['reyting'] <= $config_site['status_meaning_4b'] ) {
            $ref1_back = ( $stymer * $config['factor'] * $config['st4'] );
        } else
        if ( $ref_1['reyting'] >= $config_site['status_meaning_5a'] and $ref_1['reyting'] <= $config_site['status_meaning_5b'] ) {
            $ref1_back = ( $stymer * $config['factor'] * $config['st5'] );
        } else
        if ( $ref_1['reyting'] >= $config_site['status_meaning_6a'] ) {
            $ref1_back = ( $stymer * $config['factor'] * $config['st6'] );
        } else {
            $ref1_back = 0;
        }
        
        if ( !is_numeric( $ref1_back ) ) $ref1_back = 0;
        $my_refback = $ref1_back * ( $config_user['autoproc'] / 100 );
        if ( !is_numeric( $my_refback ) ) $my_refback = 0;
        $ref1_refback = $ref1_back - $my_refback;
        if ( !is_numeric( $ref1_refback ) ) $ref1_refback = 0;
        mysql_query( "UPDATE user SET money = money + '" . $ref1_refback . "' WHERE id = '" . $config_user['referer'] . "' LIMIT 1" );
    }
    
	#зачисляем рефбек рефералу II уровня
    if ( $config_user['referer2'] != 0 ) {
        $ref_2 = mysql_fetch_array( mysql_query( "SELECT reyting FROM user WHERE id = '" . $config_user['referer2'] . "' LIMIT 1" ) );
        
        if ( $ref_2['reyting'] >= $config_site['status_meaning_1a'] and $ref_2['reyting'] <= $config_site['status_meaning_1b'] ) {
            $ref2_back = $config['st7'];
        } else
        if ( $ref_2['reyting'] >= $config_site['status_meaning_2a'] and $ref_2['reyting'] <= $config_site['status_meaning_2b'] ) {
            $ref2_back = $config['st8'];
        } else
        if ( $ref_2['reyting'] >= $config_site['status_meaning_3a'] and $ref_2['reyting'] <= $config_site['status_meaning_3b'] ) {
            $ref2_back = $config['st9'];
        } else
        if ( $ref_2['reyting'] >= $config_site['status_meaning_4a'] and $ref_2['reyting'] <= $config_site['status_meaning_4b'] ) {
            $ref2_back = $config['st10'];
        } else
        if ( $ref_2['reyting'] >= $config_site['status_meaning_5a'] and $ref_2['reyting'] <= $config_site['status_meaning_5b'] ) {
            $ref2_back = $config['st11'];
        } else
        if ( $ref_2['reyting'] >= $config_site['status_meaning_6a'] ) {
            $ref2_back = $config['st12'];
        } else {
            $ref2_back = 0;
        }
        
        if ( !is_numeric( $ref2_back ) ) $ref2_back = 0;
        mysql_query( "UPDATE user SET money = money + '" . $ref2_back . "' WHERE id = '" . $config_user['referer2'] . "' LIMIT 1" );
    }
    
    $money_minus = $stymer;
    $my_money = moneyraund( ( $stymer * $config['factor'] ) + $my_refback, 4 );
    
    mysql_query( "UPDATE autodynlink SET balance = balance - '" . $money_minus . "', visits = visits + 1 WHERE id = '" . ( int ) $_POST['id'] . "' LIMIT 1" );
    
	mysql_query( "UPDATE user SET money = money + '" . $my_money . "', toref = toref + '" . $ref1_refback . "', toref2 = toref2 + '" . $ref2_back . "', autoserf_view = autoserf_view + 1, autoserf_kolvo = autoserf_kolvo + 1, autoserf_sum = autoserf_sum + '" . $my_money . "'  WHERE id = '" . $_SESSION['iduser'] . "' LIMIT 1" );
    mysql_query( "INSERT INTO autodynlink_temp SET ident = '" . ( int ) $_POST['id'] . "', iduser = '" . $_SESSION['iduser'] . "', date = '" . time() . "' + 86400" );
    
    $viruchka = $money_minus - $ref1_refback - $my_money - $ref2_back;
	mysql_query( "UPDATE viruchka SET money = money + '" . $viruchka . "' WHERE ident = 27" );
	
	#Создаем по днях статистику зароботка
	mysql_query( "INSERT INTO earnings_statistics SET iduser = '" . $_SESSION['iduser'] . "', summ = '1', date = '" . time() . "', ident = '" . $get_serf_row['id'] . "', type = '2'" );
    
    #Создаем статистику по дням
    if ( empty( $get_serf_row['statistic'] ) ) {
        $array[date( 'dmY' )] = 1;
        mysql_query( "UPDATE autodynlink SET statistic = '" . serialize( $array ) . "' WHERE id = '" . $get_serf_row['id'] . "' LIMIT 1" );
    } else {
        $array = unserialize( $get_serf_row['statistic'] );
        if ( array_key_exists( date( 'dmY' ), $array ) ) {
            $arrayValue = $array[date( 'dmY' )];
            $arrayValueNew = array( date( 'dmY' ) => $arrayValue + 1 );
            $array = array_replace( $array, $arrayValueNew );
            mysql_query( "UPDATE autodynlink SET statistic = '" . serialize( $array ) . "' WHERE id = '" . $get_serf_row['id'] . "' LIMIT 1" );
        } else {
            $array[date( 'dmY' )] = 1;
            mysql_query( "UPDATE autodynlink SET statistic = '" . serialize( $array ) . "' WHERE id = '" . $get_serf_row['id'] . "' LIMIT 1" );
        }
    }
    
    $json['ok'] = 1;
    print json_encode( $json );
    exit();
}

#Бан ссылки, нежелаемой пользователем
if ( $_GET['func'] == 'autoserf_block_url' ) {
    
    if ( !isset( $_SESSION['iduser'] ) ) exit();
    
    if ( $_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest' ) exit();
    
    $proverka = mysql_query( "SELECT balance, timer, paused FROM autodynlink WHERE id = '" . ( int ) $_POST['id'] . "' and iduser = '" . $_SESSION['iduser'] . "' LIMIT 1" );
    
    if ( mysql_num_rows( $proverka ) == 0 ) {
        exit();
    } else {
		mysql_query( "INSERT INTO autoserf_ban_url SET ident = '" . ( int ) $_POST['id'] . "', iduser = '" . $_SESSION['iduser'] . "', date = '" . time() . "' " );
		echo 1;
		exit();
	}
} 














































?>