当前位置: 首页>>代码示例>>PHP>>正文


PHP gen_add_audit_log函数代码示例

本文整理汇总了PHP中gen_add_audit_log函数的典型用法代码示例。如果您正苦于以下问题:PHP gen_add_audit_log函数的具体用法?PHP gen_add_audit_log怎么用?PHP gen_add_audit_log使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了gen_add_audit_log函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: btn_delete

 function btn_delete()
 {
     global $db, $messageStack;
     if ($this->security_id < 4) {
         $messageStack->add_session(ERROR_NO_PERMISSION, 'error');
         return false;
     }
     $countries_id = db_prepare_input($_POST['rowSeq']);
     $result = $db->Execute("select countries_name from " . $this->db_table . " where countries_id = " . (int) $countries_id);
     $db->Execute("delete from " . $this->db_table . " where countries_id = " . (int) $countries_id);
     gen_add_audit_log(SETUP_LOG_COUNTRIES . TEXT_DELETE, $result->fields['countries_name']);
     return true;
 }
开发者ID:jigsmaheta,项目名称:puerto-argentino,代码行数:13,代码来源:countries.php

示例2: btn_delete

 function btn_delete($id = 0)
 {
     global $db, $messageStack;
     if ($this->security_id < 4) {
         $messageStack->add(ERROR_NO_PERMISSION, 'error');
         return false;
     }
     /*
     	// TBD - Check for this project phase being used in a journal entry, if so do not allow deletion
     	$result = $db->Execute("select projects from " . TABLE_JOURNAL_ITEM . " 
     		where projects like '%" . $id . "%'");
     	while (!$result->EOF) {
     	  $cost_ids = explode(':', $result->fields['projects']);
     	  for ($i = 0; $i < count($cost_ids); $i++) {
     		if ($id == $cost_ids[$i]) {
     		  $messageStack->add(SETUP_PROJECT_COSTS_DELETE_ERROR,'error');
     		  return false;
     		}
     	  }
     	  $result->MoveNext();
     	}
     */
     // OK to delete
     $result = $db->Execute("select description_short from " . $this->db_table . " where cost_id = '" . $this->id . "'");
     $db->Execute("delete from " . $this->db_table . " where cost_id = '" . $this->id . "'");
     gen_add_audit_log(SETUP_PROJECT_COSTSS_LOG . TEXT_DELETE, $result->fields['description_short']);
     return true;
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:28,代码来源:project_costs.php

示例3: btn_delete

 function btn_delete()
 {
     global $db, $messageStack;
     if ($this->security_id < 4) {
         $messageStack->add_session(ERROR_NO_PERMISSION, 'error');
         return false;
     }
     $tax_auth_id = db_prepare_input($_POST['rowSeq']);
     // Check for this authority being used in a tax rate calculation, if so do not delete
     $result = $db->Execute("select tax_auths from " . TABLE_JOURNAL_MAIN . " \r\n\t\twhere tax_auths like '%" . $tax_auth_id . "%'");
     while (!$result->EOF) {
         $auth_ids = explode(':', $result->fields['tax_auths']);
         for ($i = 0; $i < count($auth_ids); $i++) {
             if ($tax_auth_id == $auth_ids[$i]) {
                 $messageStack->add(SETUP_TAX_AUTHS_DELETE_ERROR, 'error');
                 return false;
             }
         }
         $result->MoveNext();
     }
     // OK to delete
     $result = $db->Execute("select description_short from " . $this->db_table . " where tax_auth_id = " . (int) $tax_auth_id);
     $db->Execute("delete from " . $this->db_table . " where tax_auth_id = " . (int) $tax_auth_id);
     gen_add_audit_log(SETUP_TAX_AUTHS_LOG . TEXT_DELETE, $result->fields['description_short']);
     return true;
 }
开发者ID:jigsmaheta,项目名称:puerto-argentino,代码行数:26,代码来源:tax_auths.php

示例4: btn_delete

 function btn_delete($id = 0)
 {
     global $db, $messageStack;
     validate_security($this->security_id, 4);
     // OK to delete
     $result = $db->Execute("select description from " . $this->db_table . " where kt_id = '" . $id . "'");
     $db->Execute("delete from " . $this->db_table . " where kt_id = '" . $id . "'");
     gen_add_audit_log(SETUP_TAX_AUTHS_LOG . TEXT_DELETE, $result->fields['description']);
     return true;
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:10,代码来源:known_transactions.php

示例5: btn_delete

 function btn_delete($id = 0)
 {
     global $db, $messageStack;
     if ($this->security_id < 4) {
         $messageStack->add(ERROR_NO_PERMISSION, 'error');
         return false;
     }
     // Check for this rate as part of a journal entry, if so do not delete
     // Since tax rates are not used explicitly, they can be deleted at any time.
     $result = $db->Execute("select description_short from " . $this->db_table . " where tax_rate_id = '" . $id . "'");
     $db->Execute("delete from " . $this->db_table . " where tax_rate_id = '" . $id . "'");
     gen_add_audit_log(SETUP_TAX_RATES_LOG . TEXT_DELETE, $result->fields['description_short']);
     return true;
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:14,代码来源:tax_rates.php

示例6: btn_delete

 function btn_delete($id = 0)
 {
     global $db, $messageStack;
     if ($this->security_id < 4) {
         $messageStack->add(ERROR_NO_PERMISSION, 'error');
         return false;
     }
     // error check
     // Departments have no pre-requisites to check prior to delete
     // OK to delete
     $db->Execute("delete from " . $this->db_table . " where id = '" . $this->id . "'");
     modify_account_history_records($this->id, $add_acct = false);
     gen_add_audit_log(HR_LOG_DEPARTMENTS . TEXT_DELETE, $this->id);
     return true;
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:15,代码来源:departments.php

示例7: btn_delete

 function btn_delete($id = 0)
 {
     global $db, $messageStack;
     if ($_SESSION['admin_security'][SECURITY_ID_CONFIGURATION] < 4) {
         $messageStack->add_session(ERROR_NO_PERMISSION, 'error');
         return false;
     }
     $result = $db->Execute("select field_name from " . TABLE_EXTRA_FIELDS . " where id = '" . $id . "'");
     if ($result->RecordCount() > 0) {
         $messageStack->add(ASSETS_CATEGORY_CANNOT_DELETE . $result->fields['field_name'], 'error');
         return false;
     }
     $result = $db->Execute("select tab_name from " . TABLE_EXTRA_TABS . " where id = '" . $id . "'");
     $db->Execute("delete from " . TABLE_EXTRA_TABS . " where id = '" . $id . "'");
     gen_add_audit_log(sprintf(EXTRA_TABS_LOG, TEXT_DELETE), $result->fields['tab_name']);
     return true;
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:17,代码来源:tabs.php

示例8: btn_delete

 public function btn_delete($id = 0)
 {
     global $db, $messageStack;
     if ($_SESSION['admin_security'][SECURITY_ID_CONFIGURATION] < 4) {
         $messageStack->add(ERROR_NO_PERMISSION, 'error');
         return false;
     }
     $result = $db->Execute("SELECT field_name FROM " . TABLE_EXTRA_FIELDS . " WHERE tab_id='{$id}'");
     if ($result->RecordCount() > 0) {
         $messageStack->add(INV_CATEGORY_CANNOT_DELETE . $result->fields['field_name'], 'error');
         return false;
     }
     $result = $db->Execute("SELECT tab_name FROM " . TABLE_EXTRA_TABS . " WHERE id='{$id}'");
     $db->Execute("DELETE FROM " . TABLE_EXTRA_TABS . " WHERE id={$id}");
     gen_add_audit_log(sprintf(EXTRA_TABS_LOG, TEXT_DELETE), $result->fields['tab_name']);
     return true;
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:17,代码来源:tabs.php

示例9: btn_delete

 function btn_delete($id = 0)
 {
     global $db, $messageStack;
     validate_security($this->security_id, 4);
     // Don't allow delete if there is account activity for this account
     $sql = "select max(debit_amount) as debit, max(credit_amount) as credit, max(beginning_balance) as beg_bal \n\t\tfrom " . TABLE_CHART_OF_ACCOUNTS_HISTORY . " where account_id = '" . $this->gl_acct_id . "'";
     $result = $db->Execute($sql);
     if ($result->fields['debit'] != 0 || $result->fields['credit'] != 0 || $result->fields['beg_bal'] != 0) {
         $messageStack->add(GL_ERROR_CANT_DELETE, 'error');
         return false;
     }
     // OK to delete
     $result = $db->Execute("select description from " . $this->db_table . " where till_id = '" . $id . "'");
     $db->Execute("delete from " . $this->db_table . " where till_id = '" . $id . "'");
     gen_add_audit_log(SETUP_TAX_AUTHS_LOG . TEXT_DELETE, $result->fields['description']);
     return true;
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:17,代码来源:tills.php

示例10: btn_delete

 function btn_delete()
 {
     global $db, $messageStack;
     if ($this->security_id < 4) {
         $messageStack->add_session(ERROR_NO_PERMISSION, 'error');
         return false;
     }
     $id = (int) db_prepare_input($_POST['rowSeq']);
     $result = $db->Execute("select field_name from " . TABLE_INVENTORY_FIELDS . " where category_id = " . $id);
     if ($result->RecordCount() > 0) {
         $messageStack->add(INV_CATEGORY_CANNOT_DELETE . $result->fields['field_name'], 'error');
         return false;
     }
     $result = $db->Execute("select category_name from " . $this->db_table . " where category_id = " . (int) $id);
     $db->Execute("delete from " . TABLE_INVENTORY_CATEGORIES . " where category_id = " . $id);
     gen_add_audit_log(INV_TABS_LOG . TEXT_DELETE, $result->fields['category_name']);
     return true;
 }
开发者ID:jigsmaheta,项目名称:puerto-argentino,代码行数:18,代码来源:inv_tabs.php

示例11: btn_delete

 function btn_delete($id = 0)
 {
     global $db, $messageStack;
     if ($this->security_id < 4) {
         $messageStack->add(ERROR_NO_PERMISSION, 'error');
         return false;
     }
     // Check for this department type being used in a department, if so do not delete
     $result = $db->Execute("select department_type from " . TABLE_DEPARTMENTS);
     while (!$result->EOF) {
         if ($this->id == $result->fields['department_type']) {
             $messageStack->add(SETUP_DEPT_TYPES_DELETE_ERROR, 'error');
             return false;
         }
         $result->MoveNext();
     }
     // OK to delete
     $result = $db->Execute("select description from " . $this->db_table . " where id = '" . $this->id . "'");
     $db->Execute("delete from " . $this->db_table . " where id = '" . $this->id . "'");
     gen_add_audit_log(SETUP_DEPT_TYPES_LOG . TEXT_DELETE, $result->fields['description']);
     return true;
 }
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:22,代码来源:dept_types.php

示例12: db_prepare_input

        $shipment_id = db_prepare_input($_GET['sID']);
        $result = $db->Execute("select method, ship_date from " . TABLE_SHIPPING_LOG . " where shipment_id = " . (int) $shipment_id);
        $ship_method = $result->fields['method'];
        if ($result->RecordCount() == 0 || !$shipment_id) {
            $messageStack->add(SHIPPING_FEDEX_DELETE_ERROR, 'error');
            $error = true;
            break;
        }
        if ($result->fields['ship_date'] < date('Y-m-d', time())) {
            // only allow delete if shipped today or in future
            $messageStack->add(SHIPPING_FEDEX_CANNOT_DELETE, 'error');
            $error = true;
            break;
        }
        $db->Execute("delete from " . TABLE_SHIPPING_LOG . " where shipment_id = " . $shipment_id);
        gen_add_audit_log(SHIPPING_FEDEX_LABEL_DELETED, $tracking_id);
        $messageStack->convert_add_to_session();
        // save any messages for reload
        break;
    default:
        $oID = db_prepare_input($_GET['oID']);
        $sql = "select shipper_code, purchase_invoice_id   \r\n\t\tfrom " . TABLE_JOURNAL_MAIN . " where id = " . (int) $oID;
        $result = $db->Execute($sql);
        $sInfo->purchase_invoice_id = $result->fields['purchase_invoice_id'];
        $temp = explode(':', $result->fields['shipper_code']);
        $sInfo->ship_method = $temp[1];
}
/*****************   prepare to display templates  *************************/
// translate shipping terms in the carriers language, style
$shipping_methods = array();
foreach ($shipping_defaults['service_levels'] as $key => $value) {
开发者ID:jigsmaheta,项目名称:puerto-argentino,代码行数:31,代码来源:pre_process.php

示例13: array

    case 'save':
        if (!$method) {
            break;
        }
        $sql_data_array = array('carrier' => db_prepare_input($_POST['carrier']), 'ref_id' => db_prepare_input($_POST['ref_id']), 'method' => db_prepare_input($_POST['method']), 'ship_date' => gen_db_date($_POST['ship_date']), 'deliver_date' => gen_db_date($_POST['deliver_date']), 'tracking_id' => db_prepare_input($_POST['tracking_id']), 'cost' => $currencies->clean_value($_POST['cost']));
        if (!$sID) {
            // it's a new entry
            $result = $db->Execute("select next_shipment_num from " . TABLE_CURRENT_STATUS);
            $sql_data_array['shipment_id'] = $result->fields['next_shipment_num'];
            db_perform(TABLE_SHIPPING_LOG, $sql_data_array, 'insert');
            $db->Execute("update " . TABLE_CURRENT_STATUS . " set next_shipment_num = next_shipment_num + 1");
            gen_add_audit_log(SHIPPING_SHIPMENT_DETAILS . ' - ' . TEXT_INSERT, $sID);
        } else {
            // update
            db_perform(TABLE_SHIPPING_LOG, $sql_data_array, 'update', "id = " . $sID);
            gen_add_audit_log(SHIPPING_SHIPMENT_DETAILS . ' - ' . TEXT_UPDATE, $sID);
        }
        $close_popup = true;
        break;
    default:
}
/*****************   prepare to display templates  *************************/
$js_methods = build_js_methods($methods);
if ($sID) {
    $sql = "select id, shipment_id, carrier, ref_id, method, ship_date, deliver_date, tracking_id, cost \n\tfrom " . TABLE_SHIPPING_LOG . " where id = " . (int) $sID;
    $result = $db->Execute($sql);
    $cInfo = new objectInfo($result->fields);
    // need to build the methods pull down
    $carrier_methods = array();
    foreach ($shipping_defaults['service_levels'] as $key => $value) {
        if (defined($cInfo->carrier . '_' . $key)) {
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:pre_process.php

示例14: gen_redirect

         gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')), 'SSL'));
         break;
     }
     $id = db_prepare_input($_GET['psID']);
     $result = $db->Execute("select * from " . TABLE_PRICE_SHEETS . " where id = " . $id);
     $old_rev = (int) $result->fields['revision'];
     $output_array = array('sheet_name' => $result->fields['sheet_name'], 'revision' => $result->fields['revision'] + 1, 'effective_date' => $result->fields['expiration_date'], 'default_sheet' => $result->fields['default_sheet'], 'default_levels' => $result->fields['default_levels']);
     db_perform(TABLE_PRICE_SHEETS, $output_array, 'insert');
     $sheet_id = db_insert_id();
     // Copy special pricing information to new sheet
     $levels = $db->Execute("select inventory_id, price_levels from " . TABLE_INVENTORY_SPECIAL_PRICES . " \r\n\t\t\twhere price_sheet_id = " . $id);
     while (!$levels->EOF) {
         $db->Execute("insert into " . TABLE_INVENTORY_SPECIAL_PRICES . " set \r\n\t\t\tinventory_id = " . $levels->fields['inventory_id'] . ", \r\n\t\t\tprice_sheet_id = " . $sheet_id . ", \r\n\t\t\tprice_levels = '" . $levels->fields['price_levels'] . "'");
         $levels->MoveNext();
     }
     gen_add_audit_log(PRICE_SHEETS_LOG . TEXT_REVISE, $result->fields['sheet_name'] . ' Rev. ' . $old_rev . ' => ' . ($old_rev + 1));
     $action = '';
     break;
 case 'edit':
     $id = db_prepare_input($_POST['rowSeq']);
     $result = $db->Execute("select * from " . TABLE_PRICE_SHEETS . " where id = " . $id);
     $sheet_name = $result->fields['sheet_name'];
     $revision = $result->fields['revision'];
     $effective_date = gen_spiffycal_db_date_short($result->fields['effective_date']);
     $default_sheet = $result->fields['default_sheet'] ? '1' : '0';
     $default_levels = $result->fields['default_levels'];
     break;
 case 'go_first':
     $_GET['page'] = 1;
     break;
 case 'go_previous':
开发者ID:jigsmaheta,项目名称:puerto-argentino,代码行数:31,代码来源:pre_process.php

示例15: array

             $orph_cnt++;
             $search_type = $rpt->reporttype == 'frm' ? 'misc:misc' : 'misc';
             // put in misc
             $result = $db->Execute("select id from " . TABLE_PHREEFORM . " where doc_group = '" . $search_type . "' and doc_type = '0'");
         }
         $sql_array = array('parent_id' => $result->fields['id'], 'doc_type' => 's', 'doc_title' => $rpt->title, 'doc_group' => $rpt->groupname, 'doc_ext' => $rpt->reporttype, 'security' => $rpt->security, 'create_date' => date('Y-m-d'));
         db_perform(TABLE_PHREEFORM, $sql_array);
         $name_map[$rpt_id] = db_insert_id();
         rename(PF_DIR_MY_REPORTS . $report, PF_DIR_MY_REPORTS . 'tmp_' . $rpt_id);
         $rpt_cnt++;
     }
     // remap the reports to the new db id's
     foreach ($name_map as $old => $new) {
         rename(PF_DIR_MY_REPORTS . 'tmp_' . $old, PF_DIR_MY_REPORTS . 'pf_' . $new);
     }
     gen_add_audit_log(PHREEFORM_TOOLS_REBUILD_TITLE);
     $messageStack->add(sprintf(PHREEFORM_TOOLS_REBUILD_SUCCESS, $rpt_cnt, $orph_cnt), 'success');
     break;
     /*** BOF - Added by PhreeSoft to convert PhreeBooks reports to phreeform format *************/
     // This script transfers stored reports from the reportwriter database used in PhreeBooks to phreeform
 /*** BOF - Added by PhreeSoft to convert PhreeBooks reports to phreeform format *************/
 // This script transfers stored reports from the reportwriter database used in PhreeBooks to phreeform
 case 'convert':
     require_once DIR_FS_MODULES . 'phreeform/functions/reportwriter.php';
     $result = $db->Execute("select * from " . TABLE_REPORTS);
     $count = 0;
     while (!$result->EOF) {
         $skip_report = false;
         $report = PrepReport($result->fields['id']);
         if (!($params = import_text_params($report))) {
             $messageStack->add(sprintf(PB_CONVERT_ERROR, $result->fields['description']), 'error');
开发者ID:TrinityComputers,项目名称:PhreeBooksERP,代码行数:31,代码来源:pre_process.php


注:本文中的gen_add_audit_log函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。