<html lang="en"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="icon" href="images/favicon.ico">
    <title>New Survey</title>

    <!-- Bootstrap -->
    <link href="view/gentelella/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="view/assets/js/tigra_calendar/tcal.css">
    <script language="JavaScript" src="view/assets/js/tigra_calendar/tcal.js"></script>
    
    <style>
		body {
			background-color:#FF9;
		}
		td {
			padding: 5px;
			font-weight:bold;
		}
		.trcls:hover { 
			background-color: #CCC;
		}			
		
	</style>
</head>

<body>
    <div class="container body">
      <div class="main_container">	    
            <form action="" enctype="multipart/form-data" method="post">
            	<br>
                <table width="100%" border="1" cellpadding="5px" style="border-collapse:collapse">
                    <tr class="trcls">
                        <td width="35%">Survey ID</td>
                        <td width="65%"><input type="text" name="txt_srv_id" value="<?php echo $SEAS_Survey->get_srv_id(); ?>" style="width:30px" readonly></td>
                    </tr>
                    <tr class="trcls">
                        <td width="35%">Survey Description</td>
                        <td width="65%"><input type="text" name="txt_srv_desc" value="<?php echo $SEAS_Survey->get_srv_desc(); ?>" style="width:100%"></td>
                    </tr>                    
                    <tr class="trcls">
                        <td>Survey Type</td>
                        <td>
                                               
                        <select name="txt_srv_type">
                        	<option value=""></option>
                            <?php
                            foreach($stype_list as $st) {
								
								echo '<option value="'. $st['type_code'] . '" ';
								if($SEAS_Survey->get_srv_type() == $st['type_code']) {
									echo " selected ";
								}
								echo '>'.  $st['type_desc'] .'</option>';
							}
                            ?>
                        </select>                        
                        </td>
                    </tr>            
                    <tr class="trcls">
                        <td>Survey Market</td>
                        <td>
                        <select name="txt_srv_mrkt">
                        	<option value=""></option>
                            <?php
                            foreach($market_list as $ml) {
								
								echo '<option value="'. $ml['mkt_code'] . '" ';
								if($SEAS_Survey->get_srv_mrkt() == $ml['mkt_code']) {
									echo " selected ";
								}
								echo '>'.  $ml['mkt_name'] .'</option>';
							}
                            ?>
                        </select>
                        </td>
                    </tr>            
                    <tr class="trcls">
                        <td>Starting Date</td>
                        <td><input type="text" name="txt_srv_stdt" value="<?php echo $SEAS_Survey->get_srv_stdt(); ?>" class="tcal" style="width:150px; text-align:center" > (YYYY-MM-DD)</td>
                    </tr>            
                    <tr class="trcls">
                        <td>End Date</td>
                        <td><input type="text" name="txt_srv_eddt" value="<?php echo $SEAS_Survey->get_srv_eddt(); ?>" class="tcal" style="width:150px; text-align:center" > (YYYY-MM-DD)</td>
                    </tr>          
                    
                    <?php
					if(strlen($err_msg) >0) {
					?>
                    <tr class="trcls">
                        <td colspan="2" style="text-align:center"><?php echo $err_msg; ?>&nbsp;</td>
                    </tr>          
                    <?php
					}
					?>
                    <tr style="height:120px; text-align:center">
                        <td colspan="3">
                        <button type="submit" name="save_btn" class="btn btn-primary">Save</button>
                        <button type="submit" class="btn btn-danger" onClick="close_form()">Cancel</button>                
                        </td>
                    </tr>            
        
                </table>
            </form>
		</div>
     </div>

<script>
	function close_form() {
		window.close();	
	}
</script>
      
</body>
</html>


