예제 #1
0
//-----------------------------
//	Programmer	: SH.Jafarkhani
//	Date		: 95.02
//-----------------------------

require_once '../header.inc.php';
require_once 'traffic.class.php';
require_once '../baseinfo/shift.class.php';
require_once inc_reportGenerator;
require_once inc_dataGrid;

$admin = isset($_REQUEST["admin"]) ? true : false;

if(isset($_REQUEST["showReport"]))
{
	ShowReport($admin);
}

function ShowReport($admin){
	
	if($_POST["FromDate"] == "")
	{
		$StartDate = DateModules::shamsi_to_miladi($_POST["year"] . "-" . $_POST["month"] . "-01", "-");
		$EndDate = DateModules::shamsi_to_miladi($_POST["year"] . "-" . $_POST["month"] ."-" . DateModules::DaysOfMonth($_POST["year"] ,$_POST["month"]), "-");
	}
	else
	{
		$StartDate = DateModules::shamsi_to_miladi($_POST["FromDate"], "-");
		$EndDate = DateModules::shamsi_to_miladi($_POST["ToDate"], "-");
	}
	$holidays = ATN_holidays::Get(" AND TheDate between ? AND ? order by TheDate", array($StartDate, $EndDate));
예제 #2
0
<?php
//---------------------------
// programmer:	Mahdipour
// create Date:	93.11
//---------------------------

require_once("../../../header.inc.php");

require_once inc_reportGenerator;

if (isset($_REQUEST["task"]))
{
	switch($_REQUEST["task"])
	{
		case "ShowReport":
			ShowReport();	
			
		case "GetWorkTimeExcel":
			  GetWorkTimeExcel();
		
	}
	
}

global $tableQuery;

function MakeWhere(&$where, &$param){
	
	$PersonTypes = array();
	$CostCenters = array();
	$EmpStates = array();
$nc = $sall[0]["NEvents"];
$browser_width = 800;
$tc = $nc - 6;
if ($tc > 0) {
    $browser_width += $tc * 39;
}
include "forms/header.php";
include "forms/navform.php";
include "forms/attendance_menubar.php";
echo '<div class="content_area">';
echo '<h2>Full Attendance Report</h2>';
if ($nusers == 0) {
    echo '<p>No Users.</p>';
} else {
    //echo '<div style="width: 2000px; overflow-x: scroll;">';
    ShowReport($sall);
    //echo '</div>';
}
echo '</div>';
include "forms/footer.php";
// --------------------------------------------------------------------
// Prints the header for the big report.
function PrintHeader($sall)
{
    // First, get headers for columns.  Use first user's data for this.
    $nc = $sall[0]["NEvents"];
    echo "<tr>\n";
    echo "<th align=left width=170><u>Name</u></th>";
    echo "<th align=right width=60><u>Score</u></th>";
    echo "<th align=right width=60><u>T-Hours</u></th>";
    echo "<th align=right width=60><u>Off-Hrs</u></th>";