<html>
    <body>


        <?php
            session_start();
    if ($_SESSION['company'] == "") { 
        exit("Please Login");
    }
    if ($_SESSION['CURRENT_USER'] == "") { 
        exit("Please Login");
    }
      
        $cuscode=str_replace("/", "", $_GET["cus_id"])  ; 
        if ($_GET["cou"] == "image1") {
            $path = "upload/image1/" . $cuscode;
        }

        if ($_GET["cou"] == "image2") {
            $path = "upload/image2/" . $cuscode;
        }

        if ($_GET["cou"] == "image3") {
            $path = "upload/image3/" . $cuscode;
        }
        if ($_GET["cou"] == "image4") {
            $path = "upload/image4/" . $cuscode;
        }
        if ($_GET["cou"] == "image5") {
            $path = "upload/image5/" . $cuscode;
        }
        if ($_GET["cou"] == "image6") {
            $path = "upload/image6/" . $cuscode;
        }
      
	  
	    if ($_GET["cou"] == "image7") {
            $path = "upload/image7/" . $cuscode;
        }
            if ($_GET["cou"] == "image8") {
            $path = "upload/image8/" . $cuscode;
        }
		
        if ($_GET["cou"] == "image9") {
            $path = "upload/image9/" . $cuscode;
        }

        if ($_GET["cou"] == "br_copy") {
            $path = "upload/br_copy/" . $cuscode;
        }

        $full_path = $path . ".jpg";

        if (file_exists($full_path)) {
            echo "<img src=\"" . $full_path . "\">";
        } else {

            $full_path = $path . ".jpeg";
            if (file_exists($full_path)) {
                echo "<img src=\"" . $full_path . "\">";
            } else {

                $full_path = $path . ".gif";
                if (file_exists($full_path)) {
                    echo "<img src=\"" . $full_path . "\">";
                } else {

                    $full_path = $path . ".png";
                    if (file_exists($full_path)) {
                        echo "<img src=\"" . $full_path . "\">";
                    } else {

                        $full_path = $path . ".JPG";
                        if (file_exists($full_path)) {
                            echo "<img src=\"" . $full_path . "\">";
                        } else {

                            $full_path = $path . ".JPEG";
                            if (file_exists($full_path)) {
                                echo "<img src=\"" . $full_path . "\">";
                            } else {

                                $full_path = $path . ".GIF";
                                if (file_exists($full_path)) {
                                    echo "<img src=\"" . $full_path . "\">";
                                } else {

                                    $full_path = $path . ".PNG";
                                    if (file_exists($full_path)) {
                                        echo "<img src=\"" . $full_path . "\">";
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        ?>

    </body>
</html> 