| 1 |
<?php
|
| 2 |
function tax_receipt_install() {
|
| 3 |
drupal_set_message( t('Installing tax_receipt.module...') );
|
| 4 |
watchdog("Skipcart","Intalling tax_receipt.module...");
|
| 5 |
switch ( $GLOBALS['db_type'] ) {
|
| 6 |
case 'mysql':
|
| 7 |
case 'mysqli':
|
| 8 |
watchdog("tax_receipt","DB Type = Mysql(i?)");
|
| 9 |
db_query("
|
| 10 |
CREATE TABLE {tax_receipt_nodes} (
|
| 11 |
nid int(10) unsigned NOT NULL default '0',
|
| 12 |
tax_receipt_enabled tinyint(3) unsigned NOT NULL default '0',
|
| 13 |
tax_receipt_fairmarketvalue float(10,2) default NULL
|
| 14 |
)"
|
| 15 |
) or watchdog("tax_receipt","FAILURE");
|
| 16 |
watchdog("tax_receipt","SUCCESS!");
|
| 17 |
$success = TRUE;
|
| 18 |
break;
|
| 19 |
default:
|
| 20 |
drupal_set_message( t('Unsupported database for tax_receipt.module during install routine'),'error');
|
| 21 |
}
|
| 22 |
if ( $success ) {
|
| 23 |
drupal_set_message( t('tax_receipt.module installed successfully...<OL><LI>Grant yourself access control for the modules functions at ' . l('admin/user/access','admin/user/access') . '<LI>Then visit ' . l('admin/ecsettings/tax_receipt','admin/ecsettings/tax_receipt') . ' to continue configuration.</ol>' ) );
|
| 24 |
}
|
| 25 |
else {
|
| 26 |
drupal_set_message( t('tax_receipt.module failed install'),'error' );
|
| 27 |
}
|
| 28 |
}
|
| 29 |
?>
|