<?php
    $db = mysqli_connect("localhost", "cvartir", "سهیل بچه خش", "cvartir_check");
    $chat_id=$_GET['id'];
    $query="select * from downlod WHERE chat_id=$chat_id";
    $res=mysqli_query($db,$query);
    $row = $res -> fetch_assoc();
    // var_dump($row);
    $level = $row["check_request"];

    switch($level){
        case 5 :
        header("Location: https://instagram.com/10x.co");
    $query="update downlod set check_request='6'where chat_id=$chat_id";
    mysqli_query($db,$query);
        break;
        
            case 4 :
        header("Location: https://instagram.com/fx.mobina");
    $query="update downlod set check_request='5'where chat_id=$chat_id";
    mysqli_query($db,$query);
        break;

        case 3 :
        header("Location: https://instagram.com/olimpp2000");
    $query="update downlod set check_request='4'where chat_id=$chat_id";
    mysqli_query($db,$query);
        break;

        case 2 :
        header("Location: https://instagram.com/asad.forex");
    $query="update downlod set check_request='3'where chat_id=$chat_id";
    mysqli_query($db,$query);
        break;

       case "1" :
        header("Location: https://instagram.com/1sky.ir");
    $query="update downlod set check_request='2'where chat_id=$chat_id";
    mysqli_query($db,$query);
        break;
        
        case "" :
        header("Location: https://instagram.com/zburse.vip");
    $query="update downlod set check_request='1'where chat_id=$chat_id";
    mysqli_query($db,$query);
        break;

    }