Exemplo n.º 1
0
<body>
<?php 
include "../settings.php";
include "../language/{$cfg_language}";
include "../classes/db_functions.php";
include "../classes/security_functions.php";
include "../classes/display.php";
$lang = new language();
$dbf = new db_functions($cfg_server, $cfg_username, $cfg_password, $cfg_database, $cfg_tableprefix, $cfg_theme, $lang);
$sec = new security_functions($dbf, 'Report Viewer', $lang);
if (!$sec->isLoggedIn()) {
    header("location: ../login.php");
    exit;
}
if (isset($_POST['date_range'])) {
    $date_range = $_POST['date_range'];
    $dates = explode(':', $date_range);
    $date1 = $dates[0];
    $date2 = $dates[1];
}
$display = new display($dbf->conn, $cfg_theme, $cfg_currency_symbol, $lang);
$display->displayTitle("{$cfg_company} {$lang->profitReport}");
$tableheaders = array("{$lang->date}", "{$lang->totalAmountSoldWithOutTax}", "{$lang->profit}");
$display->displayTotalsReport($cfg_tableprefix, 'profit', $tableheaders, $date1, $date2, 'id', '');
?>



</body>
</html> 
Exemplo n.º 2
0
<body>
<?php 
include "../settings.php";
include "../language/{$cfg_language}";
include "../classes/db_functions.php";
include "../classes/security_functions.php";
include "../classes/display.php";
$lang = new language();
$dbf = new db_functions($cfg_server, $cfg_username, $cfg_password, $cfg_database, $cfg_tableprefix, $cfg_theme, $lang);
$sec = new security_functions($dbf, 'Report Viewer', $lang);
if (!$sec->isLoggedIn()) {
    header("location: ../login.php");
    exit;
}
if (isset($_POST['date_range']) and isset($_POST['selected_item'])) {
    $selected_item = $_POST['selected_item'];
    $date_range = $_POST['date_range'];
    $dates = explode(':', $date_range);
    $date1 = $dates[0];
    $date2 = $dates[1];
}
$display = new display($dbf->conn, $cfg_theme, $cfg_currency_symbol, $lang);
$display->displayTitle("{$cfg_company} {$lang->itemReport}");
$tableheaders = array("{$lang->itemName}", "{$lang->brand}", "{$lang->category}", "{$lang->supplier}", "{$lang->numberPurchased}", "{$lang->subTotalForItem}", "{$lang->totalForItem}");
$display->displayTotalsReport($cfg_tableprefix, 'item', $tableheaders, $date1, $date2, 'id', "{$selected_item}");
?>



</body>
</html> 
Exemplo n.º 3
0
include "../classes/db_functions.php";
include "../classes/security_functions.php";
include "../classes/display.php";
$lang = new language();
$dbf = new db_functions($cfg_server, $cfg_username, $cfg_password, $cfg_database, $cfg_tableprefix, $cfg_theme, $lang);
$sec = new security_functions($dbf, 'Report Viewer', $lang);
if (!$sec->isLoggedIn()) {
    header("location: ../login.php");
    exit;
}
$display = new display($dbf->conn, $cfg_theme, $cfg_currency_symbol, $lang);
$display->displayTitle("{$cfg_company} {$lang->allItemsReport}");
if (isset($_POST['month1'])) {
    $month1 = $_POST['month1'];
    $day1 = $_POST['day1'];
    $year1 = $_POST['year1'];
    $month2 = $_POST['month2'];
    $day2 = $_POST['day2'];
    $year2 = $_POST['year2'];
    $date1 = date("{$year1}-{$month1}-{$day1}");
    $date2 = date("{$year2}-{$month2}-{$day2}");
}
$tableheaders = array("{$lang->itemName}", "{$lang->brand}", "{$lang->category}", "{$lang->supplier}", "{$lang->numberPurchased}", "{$lang->subTotalForItem}", "{$lang->totalForItem}");
$display->displayTotalsReport($cfg_tableprefix, 'items', $tableheaders, $date1, $date2, '', '');
?>



</body>
</html>