Professional Documents
Culture Documents
进入哔哩哔哩,观看更高清
<?php
/**********************************************************************
Description: Item Inquiry extension, a simple demo program for
illustrate the procedure of creating an extension in FA
***********************************************************************/
$page_security = 'SA_OPEN';
$path_to_root = "../..";
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui.inc");
page(_("Item Inquiry"));
<?php
class hooks_items_inquiry extends hooks {
var $module_name = 'Items Inquiry';
/*
Install additonal menu options provided by module
*/
function install_options($app) {
global $path_to_root;
switch($app->id) {
case 'stock':
$app->add_rapp_function(1, _('Items Inquiry'),
define ('SS_ITEMINQ', 110<<8 );
function install_options($app) {
..
..
$app->add_rapp_function(1, _('Item Inquiry'),
$path_to_root.'/modules/item_inquiry/item_inquiry.php', 'SA_ITEMINQ');
..
function install_access()
{
$security_sections[SS_ITEMINQ] = _("Item Inquiry");
$security_areas['SA_ITEMINQ'] = array(SS_ITEMINQ|111, _("Item Inquiry"));
return array($security_areas, $security_sections);
}
$page_security = 'SA_ITEMINQ';
.
.
include_once($path_to_root . "/includes/session.inc");
add_access_extensions()
DROP TABLE IF EXISTS `0_item_inquiry`;
CREATE TABLE IF NOT EXISTS `0_item_inquiry` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`inquiry_date` TIMESTAMP NOT NULL DEFAULT current_timestamp(),
`stock_id` varchar(20) NOT NULL DEFAULT '',
`description` varchar(200) NOT NULL DEFAULT '',
`qoh` double NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `inquiry_date` (`inquiry_date`,`id`)
) ENGINE=InnoDB;
<?php
include_once($path_to_root . "/modules/item_inquiry/includes/item_inquiry_db.inc");
if (isset($_POST['add_query']))
add_item_inquiry($_POST['stock_id'],$_SESSION['desc'],$_SESSION['qoh']);
$_SESSION['desc'] = $row['description'];
$_SESSION['qoh'] = $qoh;
$page_security = 'SA_ITEMINQ';
$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
add_access_extensions();
include_once($path_to_root . "/includes/date_functions.inc");
//---------------------------------------------------------------------------------
-------------------
print_inquired_items();
<?php
header("Location: ../index.php");
Selecteer een taal
Mogelijk gemaakt door Translate