示例#1
0
    if ($_POST['sort'] == "training-descending") {
        $query = mysql_query("SELECT Count(employees_training.Employees_ID) As amount , employees_training.Program_ID FROM employees_training \nINNER JOIN employees_department ON employees_training.Employees_ID = employees_department.Employees_ID \nWhere employees_training.Apply_Date Like '{$_POST['month']}%' AND employees_department.Department_ID = '{$_POST['department']}'\nGroup By employees_training.Program_ID \nORDER BY Program_ID DESC");
    } else {
        if ($_POST['sort'] == "most-people") {
            $query = mysql_query("SELECT Count(employees_training.Employees_ID) As amount , employees_training.Program_ID FROM employees_training \nINNER JOIN employees_department ON employees_training.Employees_ID = employees_department.Employees_ID \nWhere employees_training.Apply_Date Like '{$_POST['month']}%' AND employees_department.Department_ID = '{$_POST['department']}'\nGroup By employees_training.Program_ID \nORDER BY amount ASC");
        } else {
            if ($_POST['sort'] == "least-people") {
                $query = mysql_query("SELECT Count(employees_training.Employees_ID) As amount , employees_training.Program_ID FROM employees_training \nINNER JOIN employees_department ON employees_training.Employees_ID = employees_department.Employees_ID \nWhere employees_training.Apply_Date Like '{$_POST['month']}%' AND employees_department.Department_ID = '{$_POST['department']}'\nGroup By employees_training.Program_ID \nORDER BY amount DESC");
            } else {
                $query = mysql_query("SELECT Count(employees_training.Employees_ID) As amount , employees_training.Program_ID FROM employees_training \nINNER JOIN employees_department ON employees_training.Employees_ID = employees_department.Employees_ID \nWhere employees_training.Apply_Date Like '{$_POST['month']}%' AND employees_department.Department_ID = '{$_POST['department']}'\nGroup By employees_training.Program_ID \n");
            }
        }
    }
}
$x = 1;
$total = 0;
while ($result = mysql_fetch_assoc($query)) {
    $pdf->Cell(40, 7, $x, 0);
    $pdf->Cell(40, 7, getTrainingDetails($result['Program_ID'], "Title"), 0);
    $pdf->Cell(40, 7, $result['amount'], 0);
    $pdf->Ln(11);
    $x++;
    $total = $result['amount'] + $total;
}
$pdf->Ln(6);
$pdf->Cell(40);
$pdf->SetFont('Times', 'B', 12);
$pdf->Cell(40, 7, "Total ", 0);
$pdf->Cell(40, 7, $total, 0);
$pdf->Output();
ob_end_flush();
示例#2
0
empty slot/quota
</th>
<th>
Duration
</th>
<th>
Trainer
</th>
<th>
Score
</th>
</tr>
<?php 
$query = mysql_query("SELECT * \nFROM employees_training\nWHERE Employees_ID\nIN (\n\nSELECT Employees_ID\nFROM employees \n) AND EmpTraining_ID IN(SELECT EmpTraining_ID FROM training_track WHERE Approval='Approve')");
while ($result = mysql_fetch_assoc($query)) {
    $query2 = mysql_query("SELECT Score FROM training_result WHERE EmpTraining_ID = '{$result['EmpTraining_ID']}'");
    if (mysql_num_rows($query2) == 0) {
        $approval = "<form action='approving-Score.php' method='POST' ><input type='number' min=0 max=100 name='score' ><input type='submit' name='insert' value='insert'><input type='hidden' name ='id' value=" . $result['EmpTraining_ID'] . "></form>";
    } else {
        $approval = mysql_result($query2, 0, "Score");
    }
    echo "<tr><td><ul class='nav navbar-nav navbar-left navbar-user'>\n            <li class='dropdown alerts-dropdown'>\n\t\t\t<a href='#' class='dropdown-toggle' data-toggle='dropdown'> " . $result['Employees_ID'] . "<b class='caret'></b></a>\t\n\t\t\t\t<ul class='dropdown-menu'>\n\t\t\t   ";
    include 'user-status.php';
    include 'result-status.php';
    echo "</ul></td><td>" . getTrainingDetails($result['Program_ID'], 'Title') . "</td><td>" . getTrainingDetails($result['Program_ID'], 'Total_Joined') . "/" . getTrainingDetails($result['Program_ID'], 'Quota') . "</td><td>" . getTrainingDetails($result['Program_ID'], 'Duration') . "</td><td>" . getTrainingDetails($result['Program_ID'], 'Trainer') . "</td><td>" . $approval . "</td></tr>";
}
?>

</table>
</div>
示例#3
0
">


	<label for="Trainer">Trainer :</label>
	<input type="Text" height="20px" required width="135px" enabled="True" id="Name" class="form-control" name="trainer" value="<?php 
$IC = getTrainingDetails($userid, 'Trainer');
echo $IC;
?>
">
   

 <label for="des">Description :</label>
 
 <textarea class="form-control" style="resize:none" id="Address" required class="form-control" name="descr" rows="3" required>
 <?php 
$address = getTrainingDetails($userid, "Description");
echo $address;
?>
 
 </textarea> 
	   
 
 

<input type="hidden" name="training_ID" value="<?php 
echo $_GET['prog_id'];
?>
">

 <input type="submit" id="submit" Value="Confirm" class="form-control" name="confirmsub">