<?php include('session.php') ?>
<?php include('upload.php') ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    
    <!-- SEO Meta Tags -->
    <meta name="description" content="Tivo is a HTML landing page template built with Bootstrap to help you crate engaging presentations for SaaS apps and convert visitors into users.">
    <meta name="author" content="Inovatik">

    <!-- OG Meta Tags to improve the way the post looks when you share the page on LinkedIn, Facebook, Google+ -->
    <meta property="og:site_name" content="" /> <!-- website name -->
    <meta property="og:site" content="" /> <!-- website link -->
    <meta property="og:title" content=""/> <!-- title shown in the actual shared post -->
    <meta property="og:description" content="" /> <!-- description shown in the actual shared post -->
    <meta property="og:image" content="" /> <!-- image link, make sure it's jpg -->
    <meta property="og:url" content="" /> <!-- where do you want your post to link to -->
    <meta property="og:type" content="article" />

    <!-- Website Title -->
    <title>Files - MinSU Office of Planning, Monitoring and Evaluation </title>

    <!-- Styles -->
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700&display=swap&subset=latin-ext" rel="stylesheet">
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/fontawesome-all.css" rel="stylesheet">
    <link href="css/swiper.css" rel="stylesheet">
    <link href="css/magnific-popup.css" rel="stylesheet">
    <link href="css/sstyle.css" rel="stylesheet">
    <link href="css/mystyle.css" rel="stylesheet">
    <link href="css/pme_style.css" rel="stylesheet">

    <!-- Favicon  -->
    <link rel="icon" href="images/logos.png">
</head>
<style>
    button {
    border: 1px solid #0066cc;
    background-color: #1a870e;
    color: #ffffff;
    padding: 5px 10px;
    }

    button:hover {
    border: 1px solid #0099cc;
    background-color: #3d8735;
    color: #ffffff;
    padding: 5px 10px;
    }

    button:disabled,
    button[disabled]{
    border: 1px solid #999999;
    background-color: #cccccc;
    color: #666666;
    }

    /* Unsubmit Modal Box */
    .modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 10000000; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    right: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    }

    /* Modal Content */
    .modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    }
    .close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    }
    .close:hover,
    .close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
    }

    /* Private Comments */
    .modal3 {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 10000000; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    }

    .modal-content3 {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    }

    .close3 {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    }

    .close3:hover,
    .close3:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
    }


</style>
<body data-spy="scroll" data-target=".fixed-top">

    <!-- Preloader -->
    <div class="spinner-wrapper">
        <div class="spinner">
            <div class="bounce1"></div>
            <div class="bounce2"></div>
            <div class="bounce3"></div>
        </div>
    </div>
    <!-- end of preloader -->

    

    <!-- Navigation -->
    <nav class="navbar navbar-expand-lg navbar-dark navbar-custom fixed-top" style="background-color: #11823b; ">
        <div class="container">

            <!-- Text Logo - Use this if you don't have a graphic logo -->
            <!-- <a class="navbar-brand logo-text page-scroll" href="index.html">Tivo</a> -->

            <!-- Image Logo -->
            <a class="navbar-brand logo-image" href="home.php"><img src="images/Minsu.png" alt="alternative" style="height:100px; width: 100px; "></a> 
            
            <!-- Mobile Menu Toggle Button -->
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-awesome fas fa-bars"></span>
                <span class="navbar-toggler-awesome fas fa-times"></span>
            </button>
            <!-- end of mobile menu toggle button -->

            <div class="collapse navbar-collapse" id="navbarsExampleDefault">
                <ul class="navbar-nav ml-auto">
                    <li class="nav-item">
                        <a class="nav-link page-scroll" href="home.php">HOME <span class="sr-only">(current)</span></a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link page-scroll" href="index.html#features">ABOUT</a>
                    </li>

                    <!-- Dropdown Menu -->
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle page-scroll" href="profile.php" id="navbarDropdown" role="button" aria-haspopup="true" aria-expanded="false">PROFILE</a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                            <a class="dropdown-item" href="gallery.php"><span class="item-text">GALLERY</span></a>
                            <div class="dropdown-items-divide-hr"></div>
                            <a class="dropdown-item" href="files.php"><span class="item-text">FILES</span></a>
                            <div class="dropdown-items-divide-hr"></div>
                            <a class="dropdown-item" href="min-sahe.php"><span class="item-text">MIN-SAHE</span></a>
                        </div>
                    </li>
                    <!-- end of dropdown menu -->

                    <li class="nav-item">
                        <a class="nav-link page-scroll" href="announcements.php">ANNOUNCEMENTS</a>
                    </li>
                </ul>
                <span class="nav-item">
                    <a class="btn-outline-sm" href="logout.php">LOGOUT</a>
                </span>
            </div>
        </div> <!-- end of container -->
    </nav> <!-- end of navbar -->
    <!-- end of navigation -->
     <br><br><br><br><br><br><br>
    
    <?php
        $sess = $_SESSION['login_user'];

        $title = "";
        $instructions = "";
        $due_date = "";
        $due_time = "";
        $attached_file = "";
        $date_posted = "";
        $time_posted = "";
          
        $ID = $_GET["ID"];
        $sql_assignment = mysqli_query($db, "SELECT * FROM requirements WHERE ID='$ID'");
        while($DB_ROW = mysqli_fetch_array($sql_assignment)) {
    
            $title = $DB_ROW["Title"];
            $instructions = $DB_ROW["Instructions"];
            $due_date = $DB_ROW['Due_Date'];
            $due_time = $DB_ROW['Due_Time'];
            $attached_file = $DB_ROW["Attached_File"];
            $date_posted = $DB_ROW['Date_Posted'];
            $time_posted = $DB_ROW['Time_Posted'];
        }
        
    ?>

     <div id="page-inner" style="padding-left: 30px; padding-right: 30px; margin-top: 20px;">
                <div class="row">
                    <div class="col-md-12">
                    <a href="files.php"><button style="float: left; margin-top: 20px; cursor: pointer; background-color: #313131; border-radius: 5px; margin-left: 10px;" title="Click to go back"><img src="images/back_btn.png" width="25px" height= "25px" style="border: none; background-color: #313131; border-radius: 5px; padding: 3px;"></button></a><p style="color: white; background-color: #3c5755; padding: 18px; margin-top: -0.1px; font-family: Arial; font-weight: bold; font-size: 27px;">&nbsp<img src="images/requirement_white.png" style="width: 40px; height: 40px; margin-top: -5px;">&nbsp<?php echo $title;?></p>   
                </div>
                <?php
                    $sql_members2 = "SELECT * FROM tasks WHERE Email='$sess' AND Assignment_Code='$ID'";
                    if($result2 = $db->query($sql_members2)){
                        if($result2->num_rows > 0){
                            while($mem_row2 = $result2->fetch_array()){
                                $date_submitted2 = $mem_row2['Date_Submitted'];
                            }
                        }
                        else{
                            $date_submitted2 = "";
                        }
                    }
                     // Get the current time adn date
                    date_default_timezone_set('Asia/Manila');
                    $date_today = date("m-d-Y");
                    $time = date("h:i A");

                    if($due_date == "None" || $due_time == "None"){
                        $due = "No due date";
                        $due_date = "";
                        $due_time = "";
                        $late = "";
                      }
                    else{
                      $due = "Due";
                        if($date_submitted2 != ""){
                            if($date_submitted2 > $due_date){
                                $late = "late";
                            }
                            else{
                                $late = "";
                            }
                        }
                        else{
                            $late = "";
                        }
                    }
                    if($attached_file == "None")
                    {
                        $attached_file = "";
                    }

                    if($attached_file != ""){
                        //Check the file extension and display icon based on the file format
                        $ext1 = pathinfo($attached_file, PATHINFO_EXTENSION);
                        if($ext1 == "jpg" || $ext1 == "jpeg" || $ext1 == "JPG" || $ext1 == "png" || $ext1 == "PNG" || $ext1 == "bmp"){
                            $icon1 = "image_icon.png";
                        }
                        else if($ext1 == "docx" || $ext1 == "doc"){
                            $icon1 = "word_icon.png";
                        }
                        else if($ext1 == "xlsx" || $ext1 == "xlsm" || $ext1 == "xlsb" || $ext1 == "xltx" || $ext1 == "xltm" || $ext1 == "xls" || $ext1 == "xlt" || $ext1 == "xltm" || $ext1 == "xml" || $ext1 == "xlam" || $ext1 == "xla" || $ext1 == "xlw" || $ext1 == "xlr"){
                            $icon1 = "excel_icon.png";
                        }
                        else if($ext1 == "txt"){
                            $icon1 = "docu_icon.png";
                        }
                        else if($ext1 == "pdf"){
                            $icon1 = "pdf_icon.png";
                        }
                        else if($ext1 == "pptx" || $ext1 == "ppt"){
                            $icon1 = "powerpoint_icon.png";
                        }
                        else{
                            $icon1 = "unknown_icon.png";
                        }
                    }

                    echo '<div style="width: 100%; background-color: #f9f9f9; padding-top: 20px; padding-bottom: 30px;">';
                    echo '<p style="margin-left: 40px; font-size: 14px; color: #696969;">Posted '.$date_posted. ' <span style="float: right; padding-right: 80px; font-weight: bold;">'.$due. ' ' . $due_date . ' ' . $due_time .'</span></p>';
                    echo '<hr><p style="margin-left: 40px; margin-top:; font-size: 14px; padding-right: 30px; ">'.$instructions.'</p>';
                    
                    if($attached_file != ""){
                    echo '<div style="width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; float: left; border-radius: 10px; margin-top: 10px; margin-left: 35px; border: none; padding-left: 10px; padding-right: 30px; padding-bottom: 20px; font-weight: bold; font-family: Arial; width: 300px; border-style:solid; border-width: thin; border-color: #d6d6d6; background-color: #fafafa;">';
                    echo '<br><img src="../images/'.$icon1.'" alt="Icon" style="width:50px;height:45px;"><a href="../attached_files/'.$attached_file.'" style="margin-left: 10px; margin-top:; font-size: 14px; padding-right: 30px; ">'.$attached_file.'</a>';
                    echo '</div>';
                    }
                    
                    echo '</div><hr>';
                ?>        
                </div>
            </div>
            <hr>
            <div style="border-style: solid; border-radius: 10px; width: 300px; margin-left:55px; height: 260px; border-width: thin; border-color: #d6d6d6; background-color: #f4f4f4;">
                <p style="margin-left:20px; margin-top: 20px; font-size: 15px; font-family: Arial; font-size: 22px; color:;">Your work</p>
                <?php
                    require_once "config.php";
                    $already_uploaded = 0;
                    $sql_members = "SELECT * FROM tasks WHERE Email='$sess' AND Assignment_Code='$ID'";
                    if($result1 = $db->query($sql_members)){
                        if($result1->num_rows > 0){
                            while($mem_row = $result1->fetch_array()){
                                //Check the file extension and display icon based on the file format
                                $fl = $mem_row['File_Link'];
                                $ext = pathinfo($fl, PATHINFO_EXTENSION);
                                if($ext == "jpg" || $ext == "jpeg" || $ext == "JPG" || $ext == "png" || $ext == "PNG" || $ext == "bmp"){
                                    $icon = "image_icon.png";
                                }
                                else if($ext == "docx" || $ext == "doc"){
                                    $icon = "word_icon.png";
                                }
                                else if($ext == "xlsx" || $ext == "xlsm" || $ext == "xlsb" || $ext == "xltx" || $ext == "xltm" || $ext == "xls" || $ext == "xlt" || $ext == "xltm" || $ext == "xml" || $ext == "xlam" || $ext == "xla" || $ext == "xlw" || $ext == "xlr"){
                                    $icon = "excel_icon.png";
                                }
                                else if($ext == "txt"){
                                    $icon = "docu_icon.png";
                                }
                                else if($ext == "pdf"){
                                    $icon = "pdf_icon.png";
                                }
                                else if($ext == "pptx" || $ext == "ppt"){
                                    $icon = "powerpoint_icon.png";
                                }
                                else{
                                    $icon = "unknown_icon.png";
                                }

                                $code_from_task = $mem_row['Code'];
                                $my_uploaded_file = $mem_row['File_Link'];
                                $work_status = $mem_row['File_Status'];
                                if($work_status == "pending"){
                                    $stat_color = "firebrick";
                                }
                                else if($work_status == "returned"){
                                    $stat_color = "orange";
                                }
                                else{
                                    $stat_color = "green";
                                }
                            }
                            if($my_uploaded_file != ""){
                                $already_uploaded = 2;
                            }
                            else if($my_uploaded_file == ""){
                                $already_uploaded = 1;
                            }
                        }
                        else{
                            $already_uploaded = 0;
                            $code_from_task = "";
                        }
                    }
                    // Count the private comments
                    $sql = "SELECT * FROM private_comment WHERE Code='$code_from_task'";
                    if ($result=mysqli_query($db,$sql)) {
                        $rowcount=mysqli_num_rows($result);
                        echo '<div style="font-family: Arial; font-weight: bold; color: #3a3a3a; float: left; margin-bottom: -13px; margin-left: 215px; width: 20px; height: 20px;">' . $rowcount . '</div>';
                    }
                ?>

                <a id="com"><img src="../images/private_comment.png" width="38px" height= "38px" style="border: none; border-radius: 5px; float: left; margin-top: -10px; margin-left:235px; cursor: pointer; border-radius: 5px;" title="Private comments"></a>
                <br>
                <?php
                $sql_select = mysqli_query($db, "SELECT * FROM members WHERE Email='$sess'");
                while($DB_ROW = mysqli_fetch_array($sql_select)) {

                    $my_lname = $DB_ROW['Last_Name'];
                    $my_fname = $DB_ROW['First_Name'];
                    $my_mi = $DB_ROW['Middle_Initial'];
                    $profile_pic = $DB_ROW['Profile_Picture'];

                    $my_username = "".$my_fname. " " .$my_mi. ". " .$my_lname."";
                }
                ?>
                
                <!-- The Modal 3 -->
                    <div id="myModal3" class="modal3">

                    <!-- Modal content 3 -->
                    <div class="modal-content3" style="border-radius: 20px; height: 355px; width: 400px;">
                    <span class="close3">&times;</span>
                    
                    <?php
                    // Count the private comments
                    require_once "config.php";
                    $sql = "SELECT * FROM private_comment WHERE Code='$code_from_task'";
                    if ($result=mysqli_query($db,$sql)) {
                        $rowcount=mysqli_num_rows($result);
                        echo '<h4 style="font-family: Arial; color: #3a3a3a;">' . $rowcount . ' private comments</h4>';
                    }
                    echo '<div style="overflow-y: auto; height: 270px;">';
                    $sql2 = "SELECT * FROM private_comment WHERE Code='$code_from_task' ORDER BY ID ASC";
                    if($result2 = $db->query($sql2)){
                    if($result2->num_rows > 0){
                        while($row = $result2->fetch_array()){
                        echo "<img src='../profile_pic/" . $row['Profile_Picture'] . "'" .  " height=35 width=43 style='border-radius: 25px; float:left; padding-right: 7px; padding-top: -10px;'></img>";
                        echo '<p style="font-weight:bold; font-family: Arial; font-size:15px; color: #3a3a3a; margin-top: 10px;">'.$row["Username"]. "</p><span style='margin-top: -30px; float: right; font-family: Arial; font-size:12px; color: #373737;'>" .$row['Date']. " " .$row['Time']. '</span>';
                        echo '<p style="font-family: Arial; font-size:15px; color: #3a3a3a; margin-top: -10px; margin-left: 40px; padding-bottom: 5px;">'.$row["Private_Comments"].'</p>';
                        }
                    }
                    else{
                        echo '<div style="margin-top: 70px; margin-left: 120px; font-size: 18px;">No comments</div>';
                    }
                    }
                    echo '</div>';
                    // Close connection
                    $db->close();
                    ?>
                    </div>
                    </div>

                <?php
                if($already_uploaded == 2){
                    echo '<form method="post" action="send_work_assign.php" enctype="multipart/form-data">
                            <input name="ID" value="'.$ID.'" type="hidden">
                            <input name="ass_code" value="'.$ID.'" type="hidden">
                            <input name="profile_pic" value="'.$profile_pic.'" type="hidden">
                            <input name="my_username" value="'.$my_username.'" type="hidden">
                            <input name="my_email" value="'.$sess.'" type="hidden">
                            <input name="due_date" value="'.$due_date.'" type="hidden">
                            <input name="due_time" value="'.$due_time.'" type="hidden">
                            <p style="float: left; margin-left: 25px; margin-top: -40px; font-size: 16px; color: '.$stat_color.';">'.$work_status.'</p>
                            <p style="float: right; margin-top: -80px; margin-right: 16px;">Turned in '.$late.'</p>';
                    echo '<br><a href="../submitted_files/'.$my_uploaded_file.'" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap; float: left; margin-left: 16px; border-radius: 10px; padding:10px; margin-top: 20px; border: none; padding-left: 10px; padding-right: 30px; margin-top: -10px; padding-bottom: 10px; font-weight: bold; font-family: Arial; width: 87%; border-style:solid; border-width: thin; border-color: #d6d6d6; background-color: #fafafa;"><img src="../images/'.$icon.'" alt="File" style="width:35px;height:35px;"> '.$my_uploaded_file.'</a>';
                    echo '<a id="myBtn" name="unsubmit" style="cursor: pointer; float: left; margin-left: 16px; border-radius: 5px; padding:5px; margin-top: 20px; border: none; padding-left: 30px; padding-right: 30px; padding-top: 10px; padding-bottom: 10px; font-weight: bold; font-family: Arial; width: 87%; border-style:solid; border-width: thin; border-color: #d6d6d6; background-color: #d11a2a ; color: white; text-align: center;" >Unsubmit</a>
                          </form>';
                }
                else if($already_uploaded == 0){
                    echo '<form method="post" action="send_work_assign.php" enctype="multipart/form-data">
                            <input name="ID" value="'.$ID.'" type="hidden">
                            <input name="ass_code" value="'.$ID.'" type="hidden">
                            <input name="profile_pic" value="'.$profile_pic.'" type="hidden">
                            <input name="my_username" value="'.$my_username.'" type="hidden">
                            <input name="my_email" value="'.$sess.'" type="hidden">
                            <input name="due_date" value="'.$due_date.'" type="hidden">
                            <input name="due_time" value="'.$due_time.'" type="hidden">
                          <br><input type="file" name="file[]" id="file" accept=".xlsx,.xls,image/*,.doc, .docx,.ppt, .pptx,.txt,.pdf" style="margin-left:16px; margin-top:; background-color: gray; border: none; color: white; border-radius: 5px; padding:8px; cursor: pointer; width: 240px; font-size: 15px; width: 87%;" />
                          <button id="submitID" type="submit" name="upload" style="float: left; margin-left: 16px; border-radius: 5px; padding:5px; margin-top: 20px; border: none; padding-left: 30px; padding-right: 30px; padding-top: 10px; padding-bottom: 10px; font-weight: bold; font-family: Arial; width: 87%;" disabled>Turn in</button>
                          </form>';
                }
                else if($already_uploaded == 1){
                    echo '<form method="post" action="update_work_assign.php" enctype="multipart/form-data">
                          <input name="ID" value="'.$ID.'" type="hidden">
                          <input name="code" value="'.$code_from_task.'" type="hidden">
                          <input name="due_date" value="'.$due_date.'" type="hidden">
                          <input name="due_time" value="'.$due_time.'" type="hidden">
                          <br><input type="file" name="file[]" id="file" accept=".xlsx,.xls,image/*,.doc, .docx,.ppt, .pptx,.txt,.pdf" style="margin-left:16px; margin-top:; background-color: gray; border: none; color: white; border-radius: 5px; padding:8px; cursor: pointer; width: 240px; font-size: 15px; width: 87%;">
                          <button id="subm" type="submit" name="update" style="float: left; margin-left: 16px; border-radius: 5px; padding:5px; margin-top: 20px; border: none; padding-left: 30px; padding-right: 30px; padding-top: 10px; padding-bottom: 10px; font-weight: bold; font-family: Arial; width: 87%;" disabled>Turn in</button>
                          </form>';
                }
                ?>

                <!-- The Modal 3 -->
                <div id="myModal" class="modal">

                <!-- Modal content 3 -->
                <div class="modal-content" style="border-radius: 20px; height: 255px; width: 400px;">
                <span class="close" style="margin-left: 340px;">&times;</span>
                <h5>Are you sure you want to unsubmit?</h5>
                <p>Warning: Your file will be removed automatically.</p>
                <br>
                <a onclick="document.getElementById('myModal').style.display='none'" class="logout" style="cursor: pointer; width: 100px; margin-left: 250px; width: 70px; padding: 10px; color:white; margin-top:20px; text-align: center; background-color: gray; border-radius: 5px; width: 100px;">No</a>
                
                <form method="post" action="unsubmit_work_assign.php">
                <input name="ID" value="<?php echo $ID ?>" type="hidden">
                <input name="code" value="<?php echo $code_from_task; ?>" type="hidden">
                <input name="my_uploaded_file" value="<?php echo $my_uploaded_file ?>" type="hidden">
                <button type="submit" style="cursor: pointer; width: 70px; padding: 10px; color:white; text-align: center; float:left; border: none; margin-top:-45px; margin-left: 145px; background-color: #4c9be1; border-radius: 5px; width: 100px;">Yes</button>
                </form>

                </div>
                </div>

            </div>
            <br><br><br><br><br><br><br><br><br><br><br>

<!-- Footer -->
<svg class="ex-footer-frame" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" viewBox="0 0 1920 79"><defs><style>.cls-2{fill:#11823b;}</style></defs><title>footer-frame</title><path class="cls-2" d="M0,72.427C143,12.138,255.5,4.577,328.644,7.943c147.721,6.8,183.881,60.242,320.83,53.737,143-6.793,167.826-68.128,293-60.9,109.095,6.3,115.68,54.364,225.251,57.319,113.58,3.064,138.8-47.711,251.189-41.8,104.012,5.474,109.713,50.4,197.369,46.572,89.549-3.91,124.375-52.563,227.622-50.155A338.646,338.646,0,0,1,1920,23.467V79.75H0V72.427Z" transform="translate(0 -0.188)"/></svg>
<div class="footer">
    <div class="container">
        <div class="row">
            <div class="col-md-4">
                <div class="footer-col first">
                    <h4>About Tivo</h4>
                    <p class="p-small">We're passionate about offering some of the best business growth services for start more words</p>
                </div>
            </div> <!-- end of col -->
            <div class="col-md-4">
                <div class="footer-col middle">
                    <h4>Important Links</h4>
                    <ul class="list-unstyled li-space-lg p-small">
                        <li class="media">
                            <i class="fas fa-square"></i>
                            <div class="media-body">Our business partners <a class="white" href="#your-link">startupguide.com</a></div>
                        </li>
                        <li class="media">
                            <i class="fas fa-square"></i>
                            <div class="media-body">Read our <a class="white" href="terms-conditions.html">Terms & Conditions</a>, <a class="white" href="privacy-policy.html">Privacy Policy</a></div>
                        </li>
                    </ul>
                </div>
            </div> <!-- end of col -->
            <div class="col-md-4">
                <div class="footer-col last">
                    <h4>Contact</h4>
                    <ul class="list-unstyled li-space-lg p-small">
                        <li class="media">
                            <i class="fas fa-map-marker-alt"></i>
                            <div class="media-body">22 Innovative, San Francisco, CA 94043, US</div>
                        </li>
                        <li class="media">
                            <i class="fas fa-envelope"></i>
                            <div class="media-body"><a class="white" href="mailto:contact@Tivo.com">contact@Tivo.com</a> <i class="fas fa-globe"></i><a class="white" href="#your-link">www.Tivo.com</a></div>
                        </li>
                    </ul>
                </div> 
            </div> <!-- end of col -->
        </div> <!-- end of row -->
    </div> <!-- end of container -->
</div> <!-- end of footer -->  
<!-- end of footer -->


<!-- Copyright -->
<div class="copyright">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <p class="p-small">Copyright © 2020 <a href="https://inovatik.com">Template by Inovatik</a></p>
            </div> <!-- end of col -->
        </div> <!-- enf of row -->
    </div> <!-- end of container -->
</div> <!-- end of copyright --> 
<!-- end of copyright -->


<!-- Scripts -->
<script src="js/jquery.min.js"></script> <!-- jQuery for Bootstrap's JavaScript plugins -->
<script src="js/popper.min.js"></script> <!-- Popper tooltip library for Bootstrap -->
<script src="js/bootstrap.min.js"></script> <!-- Bootstrap framework -->
<script src="js/jquery.easing.min.js"></script> <!-- jQuery Easing for smooth scrolling between anchors -->
<script src="js/swiper.min.js"></script> <!-- Swiper for image and text sliders -->
<script src="js/jquery.magnific-popup.js"></script> <!-- Magnific Popup for lightboxes -->
<script src="js/validator.min.js"></script> <!-- Validator.js - Bootstrap plugin that validates forms -->
<script src="js/scripts.js"></script> <!-- Custom scripts -->
<script>
    $('input[type=file]').change(function(){
    if($('input[type=file]').val()==''){
        $('button').attr('disabled',true)
    } 
    else{
      $('button').attr('disabled',false);
    }
})
</script>

<script>
    // Get the modal
    var modal = document.getElementById("myModal");

    // Get the button that opens the modal
    var btn = document.getElementById("myBtn");

    // Get the <span> element that closes the modal
    var span = document.getElementsByClassName("close")[0];

    // When the user clicks the button, open the modal 
    btn.onclick = function() {
    modal.style.display = "block";
    }

    // When the user clicks on <span> (x), close the modal
    span.onclick = function() {
    modal.style.display = "none";
    }

    // When the user clicks anywhere outside of the modal, close it
    window.onclick = function(event) {
    if (event.target == modal) {
        modal.style.display = "none";
    }
    }
</script>

<script>
    // Get the modal
    var modal3 = document.getElementById("myModal3");

    // Get the button that opens the modal
    var btn = document.getElementById("com");

    // Get the <span> element that closes the modal
    var span = document.getElementsByClassName("close3")[0];

    // When the user clicks the button, open the modal 
    btn.onclick = function() {
    modal3.style.display = "block";
    }

    // When the user clicks on <span> (x), close the modal
    span.onclick = function() {
      modal3.style.display = "none";
    }

    // When the user clicks anywhere outside of the modal, close it
    window.onclick = function(event) {
    if (event.target == modal3) {
      modal3.style.display = "none";
    }
    }
    </script>

</body>
</html>