<?php
session_start();
require_once "main.php";
Logger::configure('log4php.xml');
$log = Logger::getLogger('logoinfo');
global $db;
$zlogo = 'uploads/'. $_SESSION['comnum'].'.png';
if ($_GET['submitType']=='cust') {

    if (file_exists($zlogo)) {
        echo '<img src="includes/' . $zlogo . '" />';

    } else {
        echo '<script>alert("No image was found!");</script>';

    }
}

?>
    <script>
        function setType(type)
        {
            //formName is the name of your form
            document.accinform.submitType.value = type;
        }
    </script>
    <p>For best results use a logo around 200x100 pixels and at this time only png files are accepted.</p>
    <form action="includes/logouploaddoc.php" method="post" target="_blank" enctype="multipart/form-data">
        <input type="hidden" name="comnum" value=" <?php echo $_SESSION['comnum']?>">
        <input type="hidden" name="MAX_FILE_SIZE" value="2000000">
        <!-- Name of input element determines name in $_FILES array -->
        <input name="userfile" type="file" id="userfile">
        <input name="upload" type="submit" id="upload" value="Upload File">
    </form>
<?php
?>