示例#1
0
}
$display = new display($dbf->conn, $cfg_theme, $cfg_currency_symbol, $lang);
$display->displayTitle("{$lang->manageItems}");
$f1 = new form('manage_items.php', 'POST', 'items', '400', $cfg_theme, $lang);
$f1->createInputField("<b>{$lang->searchForItemBy}</b>", 'text', 'search', '', '24', '150');
$option_values2 = array('item_name', 'item_number', 'id', 'quantity', 'supplier_catalogue_number');
$option_titles2 = array("{$lang->itemName}", "{$lang->itemNumber}", 'ID', "{$lang->quantityStock}", "{$lang->supplierCatalogue}");
$f1->createSelectField("<b>{$lang->searchBy}</b>", 'searching_by', $option_values2, $option_titles2, 100);
$f1->endForm();
echo "<a href='manage_items.php?outofstock=go'>{$lang->showOutOfStock}</a><br>";
echo "<a href='manage_items.php?reorder=go'>{$lang->showReorder}</a>";
$tableheaders = array("{$lang->rowID}", "{$lang->itemName}", "{$lang->itemNumber}", "{$lang->description}", "{$lang->brand}", "{$lang->category}", "{$lang->supplier}", "{$lang->buyingPrice}", "{$lang->sellingPrice}", "{$lang->tax} {$lang->percent}", "{$lang->finalSellingPricePerUnit}", "{$lang->quantityStock}", "{$lang->reorderLevel}", "{$lang->supplierCatalogue}", "{$lang->updateItem}", "{$lang->deleteItem}");
$tablefields = array('id', 'item_name', 'item_number', 'description', 'brand_id', 'category_id', 'supplier_id', 'buy_price', 'unit_price', 'tax_percent', 'total_cost', 'quantity', 'reorder_level', 'supplier_catalogue_number');
if (isset($_POST['search'])) {
    $search = $_POST['search'];
    $searching_by = $_POST['searching_by'];
    echo "<center>{$lang->searchedForItem}: <b>{$search}</b> {$lang->searchBy} <b>{$searching_by}</b></center>";
    $display->displayManageTable("{$cfg_tableprefix}", 'items', $tableheaders, $tablefields, "{$searching_by}", "{$search}", 'id');
} elseif (isset($_GET['outofstock'])) {
    echo "<center>{$lang->outOfStock}</b></center>";
    $display->displayManageTable("{$cfg_tableprefix}", 'items', $tableheaders, $tablefields, 'quantity', "outofstock", 'id');
} elseif (isset($_GET['reorder'])) {
    echo "<center>{$lang->reorder}</b></center>";
    $display->displayManageTable("{$cfg_tableprefix}", 'items', $tableheaders, $tablefields, 'quantity', "reorder", 'id');
} else {
    $display->displayManageTable("{$cfg_tableprefix}", 'items', $tableheaders, $tablefields, '', '', 'id');
}
$dbf->closeDBlink();
?>
</body>
</html>
示例#2
0
include "../classes/display.php";
include "../classes/form.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, 'Sales Clerk', $lang);
if (!$sec->isLoggedIn()) {
    header("location: ../login.php");
    exit;
}
$display = new display($dbf->conn, $cfg_theme, $cfg_currency_symbol, $lang);
$display->displayTitle("{$lang->manageCustomers}");
$f1 = new form('manage_customers.php', 'POST', 'customers', '450', $cfg_theme, $lang);
$f1->createInputField("<b>{$lang->searchForCustomer}</b>", 'text', 'search', '', '24', '150');
$option_values2 = array('first_name', 'last_name', 'account_number', 'id');
$option_titles2 = array("{$lang->firstName}", "{$lang->lastName}", "{$lang->accountNumber}", 'ID');
$f1->createSelectField("<b>{$lang->searchBy}</b>", 'searching_by', $option_values2, $option_titles2, 100);
$f1->endForm();
$tableheaders = array("{$lang->rowID}", "{$lang->lastName}", "{$lang->firstName}", "{$lang->accountNumber}", "{$lang->phoneNumber}", "{$lang->email}", "{$lang->streetAddress}", "{$lang->commentsOrOther}", "{$lang->updateCustomer}", "{$lang->deleteCustomer}");
$tablefields = array('id', 'last_name', 'first_name', 'account_number', 'phone_number', 'email', 'street_address', 'comments');
if (isset($_POST['search'])) {
    $search = $_POST['search'];
    $searching_by = $_POST['searching_by'];
    echo "<center>{$lang->searchedForItem}: <b>{$search}</b> {$lang->searchBy} <b>{$searching_by}</b></center>";
    $display->displayManageTable("{$cfg_tableprefix}", 'customers', $tableheaders, $tablefields, "{$searching_by}", "{$search}", 'last_name');
} else {
    $display->displayManageTable("{$cfg_tableprefix}", 'customers', $tableheaders, $tablefields, '', '', 'last_name');
}
$dbf->closeDBlink();
?>
</body>
</html>
示例#3
0
include "../settings.php";
include "../language/{$cfg_language}";
include "../classes/db_functions.php";
include "../classes/security_functions.php";
include "../classes/display.php";
include "../classes/form.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, 'Admin', $lang);
if (!$sec->isLoggedIn()) {
    header("location: ../login.php");
    exit;
}
$display = new display($dbf->conn, $cfg_theme, $cfg_currency_symbol, $lang);
$display->displayTitle("{$lang->manageUsers}");
$f1 = new form('manage_users.php', 'POST', 'users', '400', $cfg_theme, $lang);
$f1->createInputField("<b>{$lang->searchForUser}</b>", 'text', 'search', '', '24', '300');
$f1->endForm();
$tableheaders = array("{$lang->rowID}", "{$lang->lastName}", "{$lang->firstName}", "{$lang->username}", "{$lang->password}", "{$lang->type}", "{$lang->updateUser}", "{$lang->deleteUser}");
$tablefields = array('id', 'last_name', 'first_name', 'username', 'password', 'type');
if (isset($_POST['search'])) {
    $search = $_POST['search'];
    echo "<center>{$lang->searchedForUser}:<b> {$search}</b></center>";
    $display->displayManageTable("{$cfg_tableprefix}", 'users', $tableheaders, $tablefields, 'username', "{$search}", 'last_name');
} else {
    $display->displayManageTable("{$cfg_tableprefix}", 'users', $tableheaders, $tablefields, '', '', 'last_name');
}
$dbf->closeDBlink();
?>
</body>
</html>
示例#4
0
include "../../settings.php";
include "../../language/{$cfg_language}";
include "../../classes/db_functions.php";
include "../../classes/security_functions.php";
include "../../classes/display.php";
include "../../classes/form.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, 'Admin', $lang);
if (!$sec->isLoggedIn()) {
    header("location: ../../login.php");
    exit;
}
$display = new display($dbf->conn, $cfg_theme, $cfg_currency_symbol, $lang);
$display->displayTitle("{$lang->manageBrands}");
$f1 = new form('manage_brands.php', 'POST', 'brands', '425', $cfg_theme, $lang);
$f1->createInputField("<b>{$lang->searchForBrand}</b>", 'text', 'search', '', '24', '350');
$f1->endForm();
$tableheaders = array("{$lang->rowID}", "{$lang->brandName}", "{$lang->updateBrand}", "{$lang->deleteBrand}");
$tablefields = array('id', 'brand');
if (isset($_POST['search'])) {
    $search = $_POST['search'];
    echo "<center>{$lang->searchedForBrand}: <b>{$search}</b></center>";
    $display->displayManageTable("{$cfg_tableprefix}", 'brands', $tableheaders, $tablefields, 'brand', "{$search}", 'brand');
} else {
    $display->displayManageTable("{$cfg_tableprefix}", 'brands', $tableheaders, $tablefields, '', '', 'brand');
}
$dbf->closeDBlink();
?>
</body>
</html>
示例#5
0
include "../../settings.php";
include "../../language/{$cfg_language}";
include "../../classes/db_functions.php";
include "../../classes/security_functions.php";
include "../../classes/display.php";
include "../../classes/form.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, 'Admin', $lang);
if (!$sec->isLoggedIn()) {
    header("location: ../../login.php");
    exit;
}
$display = new display($dbf->conn, $cfg_theme, $cfg_currency_symbol, $lang);
$display->displayTitle("{$lang->manageSuppliers}");
$f1 = new form('manage_suppliers.php', 'POST', 'suppliers', '475', $cfg_theme, $lang);
$f1->createInputField("<b>{$lang->searchForSupplier}</b>", 'text', 'search', '', '24', '375');
$f1->endForm();
$tableheaders = array("{$lang->rowID}", "{$lang->supplierName}", "{$lang->address}", "{$lang->phoneNumber}", "{$lang->contact}", "{$lang->email}", "{$lang->other}", "{$lang->updateSupplier}", "{$lang->deleteSupplier}");
$tablefields = array('id', 'supplier', 'address', 'phone_number', 'contact', 'email', 'other');
if (isset($_POST['search'])) {
    $search = $_POST['search'];
    echo "<center>{$lang->searchedForSupplier}: <b>{$search}</b></center>";
    $display->displayManageTable("{$cfg_tableprefix}", 'suppliers', $tableheaders, $tablefields, 'supplier', "{$search}", 'supplier');
} else {
    $display->displayManageTable("{$cfg_tableprefix}", 'suppliers', $tableheaders, $tablefields, '', '', 'supplier');
}
$dbf->closeDBlink();
?>
</body>
</html>
示例#6
0
include "../../settings.php";
include "../../language/{$cfg_language}";
include "../../classes/db_functions.php";
include "../../classes/security_functions.php";
include "../../classes/display.php";
include "../../classes/form.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, 'Admin', $lang);
if (!$sec->isLoggedIn()) {
    header("location: ../../login.php");
    exit;
}
$display = new display($dbf->conn, $cfg_theme, $cfg_currency_symbol, $lang);
$display->displayTitle("{$lang->manageDiscounts}");
$f1 = new form('manage_discounts.php', 'POST', 'discounts', '475', $cfg_theme, $lang);
$f1->createInputField("<b>{$lang->searchForDiscount}</b>", 'text', 'search', '', '24', '375');
$f1->endForm();
$tableheaders = array("{$lang->rowID}", "{$lang->itemName}", "{$lang->percentOff}", "{$lang->comment}", "{$lang->updateDiscount}", "{$lang->deleteDiscount}");
$tablefields = array('id', 'item_id', 'percent_off', 'comment');
if (isset($_POST['search'])) {
    $search = $_POST['search'];
    echo "<center>{$lang->searchedForDiscount}: <b>{$search}</b></center>";
    $display->displayManageTable("{$cfg_tableprefix}", 'discounts', $tableheaders, $tablefields, 'percent_off', "{$search}", 'percent_off');
} else {
    $display->displayManageTable("{$cfg_tableprefix}", 'discounts', $tableheaders, $tablefields, '', '', 'percent_off');
}
$dbf->closeDBlink();
?>
</body>
</html>