<!DOCTYPE html>
<?php session_start();?>

<?php
	if($_SESSION ["role"]=="Evaluator")
	{
		
		$role = $_SESSION["role"];
		$email = $_SESSION["email"];
		
		// header('location:form.php');
	}
	else
	{
		header('location:expired.php');
		// $userName = $_SESSION["userName"]; $userRole = $_SESSION["userRole"];
		}
?>
<?
require ("_common/global.php");
require ("_common/conn.php");
//require ("_common/function.php");
require ("_common/check_session.php");
?>
<html lang="en">
    <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
        <title>VAC-DOS | Vaccine Dossier Mapping Tool</title>
        <meta content="Admin Dashboard" name="description" />
        <meta content="ThemeDesign" name="author" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />

        <link rel="shortcut icon" href="assets/images/favicon.ico">

        <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
        <link href="assets/css/icons.css" rel="stylesheet" type="text/css">
        <link href="assets/css/style.css" rel="stylesheet" type="text/css">

    </head>


    <body>

        <!-- Loader -->
        <div id="preloader"><div id="status"><div class="spinner"></div></div></div>

        <!-- Navigation Bar-->
        <header id="topnav">
            <div class="topbar-main">
                <div class="container-fluid">

                    <!-- Logo container-->
                    <div class="logo">
                        <!-- Image Logo -->
                        <a href="index.html" class="logo">
                            <img src="assets/images/logo-sm.png" alt="" height="32" class="logo-small">
                            <img src="assets/images/logo.png" alt="" height="20" class="logo-large">
                        </a>

                    </div>
                    <!-- End Logo container-->


                    <div class="menu-extras topbar-custom">

                        
                        <ul class="list-inline float-right mb-0">
                            <!-- Search -->
                            
                            <!-- Messages-->
                            
                            <!-- notification-->
                            
                            <!-- User-->
                            <li class="list-inline-item dropdown notification-list">
                                <a class="nav-link dropdown-toggle arrow-none waves-effect nav-user" data-toggle="dropdown" href="#" role="button"
                                    aria-haspopup="false" aria-expanded="false">
                                    <img src="assets/images/users/user-1.jpg" alt="user" class="rounded-circle">
                                </a>
                                <div class="dropdown-menu dropdown-menu-right dropdown-menu-animated profile-dropdown ">
                                    <a class="dropdown-item" href="#"><i class="mdi mdi-account-circle m-r-5 text-muted"></i> Profile</a>
                                   
                                    <a class="dropdown-item" href="logout.php"><i class="mdi mdi-logout m-r-5 text-muted"></i> Logout</a>
                                </div>

                            </li>
                            <li class="menu-item list-inline-item">
                                <!-- Mobile menu toggle-->
                                <a class="navbar-toggle nav-link">
                                    <div class="lines">
                                        <span></span>
                                        <span></span>
                                        <span></span>
                                    </div>
                                </a>
                                <!-- End mobile menu toggle-->
                            </li>

                        </ul>
                    </div>
                    <!-- end menu-extras -->

                    <div class="clearfix"></div>

                </div> <!-- end container -->
            </div>
            <!-- end topbar-main -->

            <!-- MENU Start -->
            <div class="navbar-custom">
                <div class="container-fluid">
                    <div id="navigation">
                        <!-- Navigation Menu-->
                        <ul class="navigation-menu">

                            <li class="has-submenu">
                                <a href="dashboard.php"><i class="dripicons-meter"></i>Dashboard</a>
                            </li>

                            

                            <li class="has-submenu">
                                <a href="#"><i class="dripicons-broadcast"></i>Task</a>
                                <ul class="submenu">
									<li><a href="list.php">New</a></li>									
                                    <li><a href="listcomplete.php">Completed</a></li>
									
									
                                    
                                </ul>
                            </li>

                            

                            <li class="has-submenu">
                                <a href="#"><i class="dripicons-graph-bar"></i>About</a>
                                <ul class="submenu">
                                    <li><a href="#">About VAC-DOS</a></li>
                                    <li><a href="#">User Manual</a></li>
                                    
                                </ul>
                            </li>

                            

                        </ul>
                        <!-- End navigation menu -->
                    </div> <!-- end #navigation -->
                </div> <!-- end container -->
            </div> <!-- end navbar-custom -->
        </header>
        <!-- End Navigation Bar-->


        <div class="wrapper">
            <div class="container-fluid">
<?php
$idvac =$_REQUEST['idvac'];
?>
                <!-- Page-Title -->
                <div class="row">
                    <div class="col-sm-12">
                        <div class="page-title-box">
                            <div class="btn-group float-right">
                                <ol class="breadcrumb hide-phone p-0 m-0">
                                    <li class="breadcrumb-item"><a href="#">Task</a></li>
                                    <li class="breadcrumb-item"><a href="list.php">New</a></li>
                                    <li class="breadcrumb-item active"><a href="dossierform2.php?idvac=<?php echo $idvac ?>">Dossier Form</a></li>
                                    <li class="breadcrumb-item active"><a href="#">Documents</a></li>
                                </ol>
                            </div>
                            <h4 class="page-title">Vaccine Dossier Scoring Form</h4>
                        </div>
						<div class="col-sm-1">
                                        <a href="dossierform2.php?idvac=<?php echo $idvac ?>"><button class="btn btn-primary btn-block waves-effect waves-light">Go Back</button></a>
										
                        </div>
                    </div>
                </div>
                <!-- end page title end breadcrumb -->
				
				
<?php
$idvac =$_REQUEST['idvac'];
$conn = mysql_connect('localhost', 'dvsvigov_vacc', 'DVSvacdos123');
	 if (!$conn)
    {
	 die('Could not connect: ' . mysql_error());
	}
	mysql_select_db("dvsvigov_vacdos", $conn);
$result = mysql_query("SELECT * FROM vacc WHERE idvac  = '$idvac'");
$test = mysql_fetch_array($result);
if (!$result)
		{
		die("Error: Data not found..");
		}
				$tradename=$test['tradename'] ;
mysql_close($conn);
?>
 <?php
//$idvac =$_REQUEST['idvac'];
//$name =$_REQUEST['name'];
$email =$_SESSION['email'];
	$conn = mysql_connect('localhost', 'dvsvigov_vacc', 'DVSvacdos123');
	 if (!$conn)
    {
	 die('Could not connect: ' . mysql_error());
	}
	mysql_select_db("dvsvigov_vacdos", $conn);
$result = mysql_query("SELECT * FROM user WHERE email='$email'");
$test = mysql_fetch_array($result);
if (!$result)
		{
		die("Error: Data not found..");
		}
				$Assess=$test['name'] ;	
mysql_close($conn);
?>
				<br>
				<div class="row">
                    <div class="col-xl-12">
                        <div class="card m-b-30">
                            <div class="card-body">
								
                                
								 <form action="adddatadocuments.php" method="post"> 
                                <div class="form-group row">
                                    <label for="example-text-input" class="col-sm-2 col-form-label">ID</label>
                                    <div class="col-sm-10">
                                        <input class="form-control" type="text" value="<?php echo $idvac ?>" name="idvac"/readonly>
                                    </div>
                                </div>
								<div class="form-group row">
                                    <label for="example-text-input" class="col-sm-2 col-form-label">Trade Name</label>
                                    <div class="col-sm-10">
                                        <input class="form-control" type="text" value="<?php echo $tradename ?>" name="tradename"/readonly>
                                    </div>
                                </div>
								<div class="form-group row">
                                    <label for="example-text-input" class="col-sm-2 col-form-label">Evaluator</label>
                                    <div class="col-sm-10">
                                        <input class="form-control" type="text" value="<?php echo $Assess ?>" name="Assess"/readonly>
                                    </div>
                                </div>

  <?php
//$idvac =$_REQUEST['idvac'];
//$name =$_REQUEST['name'];
//$email =$_SESSION['email'];
	$conn = mysql_connect('localhost', 'dvsvigov_vacc', 'DVSvacdos123');
	 if (!$conn)
    {
	 die('Could not connect: ' . mysql_error());
	}
	mysql_select_db("dvsvigov_vacdos", $conn);
$result = mysql_query("SELECT * FROM dossierform WHERE idvac='$idvac' AND Assess='$Assess'");
$test = mysql_fetch_array($result);
if (!$result)
		{
		die("Error: Data not found..");
		}
				$vacctype=$test['vacctype'] ;
				$Assess=$test['Assess'] ;
				$Q4=$test['Q4'] ;
				$Q4comment=$test['Q4comment'] ;
				$Q4AI=$test['Q4AI'] ;
				$Q5=$test['Q5'] ;
				$Q5comment=$test['Q5comment'] ;
				$Q5AI=$test['Q5AI'] ;
				$Q6=$test['Q6'] ;
				$Q6comment=$test['Q6comment'] ;
				$Q6AI=$test['Q6AI'] ;
				$refQ4=$test['refQ4'] ;
				$refQ5=$test['refQ5'] ;
				$refQ6=$test['refQ6'] ;
mysql_close($conn);

?>	                         
                        
   
                                    <p class="text-muted m-b-30 font-14">AREA: <strong>General Plant Profile</strong> <br>CATEGORY: <strong>Other Information and Supporting Documents</strong><br>Default Score: <strong>1</strong></p>
										<div class="table-responsive">
                                    <table class="table table-bordered mb-0">
                                        <thead>
                                            <tr>
                                                <th colspan="2" width="10%"></th>
                                                <th colspan="4"width="30%"><center>Scores</center></th>
                                                <th colspan="1" width="5%"><center>Assessor Score</center></th>								
												<th colspan="3" width="55%"><center>Comments and <br> Additional Information</center></th>
												
                                            </tr>
                                        </thead>
										<thead>
                                            <tr>
                                                <th><center>#</center></th>
                                                <th><center>Sub Category</center></th>
                                                <th width="7.5%"><center>4</center></th>
                                                <th width="7.5%"><center>3</center></th>
												<th width="7.5%"><center>2</center></th>
												<th width="7.5%"><center>1</center></th>
													
												<th><center>Score</center></th>	
												<th><center>Assessor <br>Comments</center></th>
												<th><center>Additional <br>Information</center></th>
												<th width="10%"><center>Reference</center></th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr>
                                                <th scope="row">4</th>
                                                <td>Copy of assay certificate or certificate of release for latest 3 batches</td>
                                                <td>Availability of these certificates of the latest 3 vaccine batches</td>
                                                <td>Latest Certificates provided  less than 3 batches</td>
												<td>Latest Certificates provided less than 2 batches </td>
												<td>Certificates not provided or of old batches of production</td>
												<td>
												<input type="radio" name="Q4" id="Q4" value="6" <?php if($Q4=="6") echo "checked" ?>>
												<label for="Q4">4</label><br>
												<input type="radio" name="Q4" id="Q4" value="4" <?php if($Q4=="4") echo "checked" ?>>
												<label for="Q4">3</label>		<br>											
												<input type="radio" name="Q4" id="Q4" value="2" <?php if($Q4=="2") echo "checked" ?>>
												<label for="Q4">2</label><br>
												<input type="radio" name="Q4" id="Q4" value="0" <?php if($Q4=="0") echo "checked" ?>>
												<label for="Q4">1</label>	
												</td>
												<td><textarea id="elm1" name="Q4comment" placeholder="Reference Batch No::"><?php echo $Q4comment ?></textarea></td>
												<td><textarea id="elm1" name="Q4AI"><?php echo $Q4AI ?></textarea></td>
												<td><textarea name="refQ4"><?php echo $refQ4 ?></textarea></td>
                                            </tr>
                                            <tr>
                                                <th scope="row">5</th>
                                                <td>Copy of registration certificate and free sale certificate of vaccine in country of origin</td>
                                                <td>Availability of current  registration certificate  and  free sale certificate in country of origin</td>
                                                <td>Availability of current Free Sale Certificate in country of origin</td>
												<td>Insufficient information or expired date of Registration certificate or Free Sale Certificate</td>
												<td>Certificates not submitted</td>
												<td>
												<input type="radio" name="Q5" id="Q5" value="6" <?php if($Q5=="6") echo "checked" ?>>
												<label for="Q5">4</label><br>
												<input type="radio" name="Q5" id="Q5" value="4" <?php if($Q5=="4") echo "checked" ?>>
												<label for="Q5">3</label>		<br>											
												<input type="radio" name="Q5" id="Q5" value="2" <?php if($Q5=="2") echo "checked" ?>>
												<label for="Q5">2</label><br>
												<input type="radio" name="Q5" id="Q5" value="0" <?php if($Q5=="0") echo "checked" ?>>
												<label for="Q5">1</label>	
												</td>
												
												<td><textarea id="elm1" name="Q5comment" placeholder="Certificate Reference No.:"><?php echo $Q5comment ?></textarea></td>
												<td><textarea id="elm1" name="Q5AI"><?php echo $Q5AI ?></textarea></td>
												<td><textarea name="refQ5"><?php echo $refQ5 ?></textarea></td>
                                            </tr>
                                            <tr>
                                                <th scope="row">6</th>
                                                <td>Copy of registration certificate of the vaccine in two other countries.</td>
                                                <td>Availability of current Registration certificates from ASEAN countries</td>
                                                <td>Registration certificates from EU ,  North American ,Japan, Australia countries</td>
												<td>Regsitration certificates from countries other than EU, North America, Japan, Australia, ASEAN,  or at least one certificate provided.</td>
												<td>Certificates not submitted</td>
												<td>
												<input type="radio" name="Q6" id="Q6" value="6" <?php if($Q6=="6") echo "checked" ?>>
												<label for="Q6">4</label><br>
												<input type="radio" name="Q6" id="Q6" value="4" <?php if($Q6=="4") echo "checked" ?>>
												<label for="Q6">3</label>		<br>											
												<input type="radio" name="Q6" id="Q6" value="2" <?php if($Q6=="2") echo "checked" ?>>
												<label for="Q6">2</label><br>
												<input type="radio" name="Q6" id="Q6" value="0" <?php if($Q6=="0") echo "checked" ?>>
												<label for="Q6">1</label>	
												</td>
												
												<td><textarea id="elm1" name="Q6comment" placeholder=""><?php echo $Q6comment ?></textarea></td>
												<td><textarea id="elm1" name="Q6AI"><?php echo $Q6AI ?></textarea></td>
												<td><textarea name="refQ6"><?php echo $refQ6 ?></textarea></td>
                                            </tr>
										 </tbody>
                                    </table>
									</div><br>
                                
									<div class="form-group row">
                                   
                                    <div class="col-sm-1">
                                        <button class="btn btn-primary btn-block waves-effect waves-light" type="submit">Save</button>
                                    </div></form>
									
									
									
                                </div>
                               
                    </div>
					</p>
									</div>
                                 </div>
								</div>
                        </div>
                    </div>
					</div> <!-- end row -->
				</div> <!-- end container -->
        </div>
        <!-- Footer -->
        <footer class="footer">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-12">
                        © 2020 <b>VAC-DOS </b>V1.0<br><span class="d-none d-sm-inline-block">Crafted by <b>Research and Innovation</b> Division, DVS</span>
                    </div>
                </div>
            </div>
        </footer>
        <!-- End Footer -->
    

        <!-- jQuery  -->
        <script src="assets/js/jquery.min.js"></script>
        <script src="assets/js/bootstrap.bundle.min.js"></script>
        <script src="assets/js/modernizr.min.js"></script>
        <script src="assets/js/detect.js"></script>
        <script src="assets/js/fastclick.js"></script>
        <script src="assets/js/jquery.slimscroll.js"></script>
        <script src="assets/js/jquery.blockUI.js"></script>
        <script src="assets/js/waves.js"></script>

		<!--Wysiwig js-->
        <script src="assets/plugins/tinymce/tinymce.min.js"></script>
        <!-- App js -->
        <script src="assets/js/app.js"></script>
		<script>
            $(document).ready(function () {
                if($("#elm1").length > 0){
                    tinymce.init({
                        selector: "textarea#elm1",
                        theme: "modern",
                        height:300,
                        plugins: [
                            "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
                            "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
                            "save table contextmenu directionality emoticons template paste textcolor"
                        ],
                        toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l      ink image | print preview media fullpage | forecolor backcolor emoticons",
                        style_formats: [
                            {title: 'Bold text', inline: 'b'},
                            {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
                            {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
                            {title: 'Example 1', inline: 'span', classes: 'example1'},
                            {title: 'Example 2', inline: 'span', classes: 'example2'},
                            {title: 'Table styles'},
                            {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
                        ]
                    });
                }
            });
        </script>
    </body>
</html>