• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP gen_add_audit_log函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: substr

             }
             $output = $details->fields['purch_order_id'] . "\t";
             $output .= '' . "\t";
             $output .= '' . "\t";
             // was $output .= $result->fields['qty'] . "\t";
             $output .= substr($result->fields['ship_date'], 0, 10) . "\t";
             $output .= $carrier . "\t";
             $output .= $carrier_name . "\t";
             $output .= $result->fields['tracking_id'] . "\t";
             $output .= $method . "\n";
             $str .= $output;
             $db->Execute("UPDATE " . TABLE_SHIPPING_LOG . " SET amazon_confirm='1' WHERE ref_id LIKE '{$purchase_invoice_id}%'");
         }
         $result->MoveNext();
     }
     gen_add_audit_log('Generated Amazon Confirmation File.', 'OrderCnt: ' . $result->RecordCount());
     header("Content-type: plain/txt");
     header("Content-disposition: attachment; filename=" . AMAZON_SHIP_CONFIRM_FILE_NAME . "; size=" . strlen($str));
     header('Pragma: cache');
     header('Cache-Control: public, must-revalidate, max-age=0');
     header('Connection: close');
     header('Expires: ' . date('r', time() + 60 * 60));
     header('Last-Modified: ' . date('r', time()));
     print $str;
     die;
 case 'go_first':
     $_REQUEST['list'] = 1;
     break;
 case 'go_previous':
     $_REQUEST['list']--;
     break;
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:pre_process.php


示例17: serialize

        } else {
            $sql = "update " . TABLE_RECONCILIATION . " set\r\n\t\t\tstatement_balance = " . $statement_balance . ", \r\n\t\t\tcleared_items = '" . serialize($cleared_items) . "' \r\n\t\t\twhere period = " . $period . " and gl_account = '" . $gl_account . "'";
        }
        //	$result = $db->Execute($sql);
        // set closed flag to '1' for all records that were checked
        if (count($cleared_items)) {
            $sql = "update " . TABLE_JOURNAL_MAIN . " set closed = '1' where id in (" . implode(',', $cleared_items) . ")";
            //		$result = $db->Execute($sql);
        }
        // set closed flag to '0' for all records that were unchecked
        if (count($uncleared_items)) {
            $sql = "update " . TABLE_JOURNAL_MAIN . " set closed = '0' where id in (" . implode(',', $uncleared_items) . ")";
            //		$result = $db->Execute($sql);
        }
        $messageStack->add(GL_RECON_POST_SUCCESS, 'success');
        gen_add_audit_log(GL_LOG_ACCT_RECON . $period, $gl_account);
        break;
    default:
}
/*****************   prepare to display templates  *************************/
//
$bank_list = array();
$statement_balance = $currencies->format(0);
// load the payments and deposits that are open
$fiscal_dates = gen_calculate_fiscal_dates($period);
$end_date = $fiscal_dates['end_date'];
$sql = "select i.id, m.post_date, i.debit_amount, i.credit_amount, m.purchase_invoice_id, m.bill_primary_name \r\n\tfrom " . TABLE_JOURNAL_MAIN . " m inner join " . TABLE_JOURNAL_ITEM . " i on m.id = i.ref_id\r\n\twhere i.gl_account = '" . $gl_account . "' and i.reconciled = '0' and m.post_date <= '" . $fiscal_dates['end_date'] . "'";
$result = $db->Execute($sql);
while (!$result->EOF) {
    $bank_list[$result->fields['id']] = array('post_date' => $result->fields['post_date'], 'reference' => $result->fields['purchase_invoice_id'], 'dep_amount' => $result->fields['debit_amount'], 'pmt_amount' => $result->fields['credit_amount'], 'payment' => $result->fields['debit_amount'] ? 0 : 1, 'name' => $result->fields['bill_primary_name'], 'cleared' => 0);
    $result->MoveNext();
开发者ID:jigsmaheta,项目名称:puerto-argentino,代码行数:31,代码来源:pre_process.php


示例18: gen_add_audit_log

     if (!$id) {
         $_REQUEST['action'] = '';
         $error = true;
         break;
     }
     // error check
     $result = $db->Execute("select wo_title, last_usage from " . TABLE_WO_MAIN . " where id = " . $id);
     if ($result->fields['last_usage'] != '0000-00-00') {
         $error = true;
         $messageStack->add(WO_ERROR_CANNOT_DELETE_BUILDER, 'error');
     }
     // finish
     if (!$error) {
         $db->Execute("delete from " . TABLE_WO_MAIN . " where id = " . $id);
         $db->Execute("delete from " . TABLE_WO_STEPS . " where ref_id = " . $id);
         gen_add_audit_log(sprintf(WO_AUDIT_LOG_BUILDER, TEXT_DELETE) . $result->fields['wo_title']);
         $messageStack->add(WO_MESSAGE_SUCCESS_MAIN_DELETE, 'success');
     }
     $_REQUEST['action'] = '';
     break;
 case 'go_first':
     $_REQUEST['list'] = 1;
     break;
 case 'go_previous':
     $_REQUEST['list'] = max($_REQUEST['list'] - 1, 1);
     break;
 case 'go_next':
     $_REQUEST['list']++;
     break;
 case 'go_last':
     $_REQUEST['list'] = 99999;
开发者ID:siwiwit,项目名称:PhreeBooksERP,代码行数:31,代码来源:pre_process.php


示例19: gen_redirect

     break;
 case 'delete':
     if ($security_level < 4) {
         $messageStack->add_session(ERROR_NO_PERMISSION, 'error');
         gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')), 'SSL'));
         break;
     }
     $id = db_prepare_input($_GET['cID']);
     $result = $db->Execute("select rma_num from " . TABLE_RMA . " where id = " . $id);
     if ($result->RecordCount() > 0) {
         $db->Execute("delete from " . TABLE_RMA . " where id = " . $id);
         foreach (glob(RMA_DIR_ATTACHMENTS . 'ram_' . $id . '_*.zip') as $filename) {
             unlink($filename);
         }
         // remove attachments
         gen_add_audit_log(RMA_MESSAGE_DELETE, $result->fields['rma_num']);
         gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('cID', 'action')), 'SSL'));
     } else {
         $messageStack->add(RMA_ERROR_CANNOT_DELETE, 'error');
     }
     break;
 case 'download':
     $cID = db_prepare_input($_POST['id']);
     $imgID = db_prepare_input($_POST['rowSeq']);
     $filename = 'rma_' . $cID . '_' . $imgID . '.zip';
     if (file_exists(RMA_DIR_ATTACHMENTS . $filename)) {
         require_once DIR_FS_MODULES . 'phreedom/classes/backup.php';
         $backup = new backup();
         $backup->download(RMA_DIR_ATTACHMENTS, $filename, true);
     }
     die;
开发者ID:TrinityComputers,项目名称:PhreeBooksERP,代码行数:31,代码来源:pre_process.php


示例20: unserialize

     }
     $result = $db->Execute("select * from " . TABLE_USERS . " where admin_id = " . (int) $admin_id);
     $result->fields['prefs'] = unserialize($result->fields['admin_prefs']);
     $uInfo = new objectInfo($result->fields);
     break;
 case 'delete':
     if ($security_level < 4) {
         $messageStack->add_session(ERROR_NO_PERMISSION, 'error');
         gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')), 'SSL'));
         break;
     }
     $admin_id = (int) db_prepare_input($_POST['rowSeq']);
     // fetch the name for the audit log
     $result = $db->Execute("select admin_name from " . TABLE_USERS . " where admin_id = " . $admin_id);
     $db->Execute("delete from " . TABLE_USERS . " where admin_id = " . $admin_id);
     gen_add_audit_log(GEN_LOG_USER_DELETE . $result->fields['admin_id']);
     gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')), 'SSL'));
     break;
 case 'go_first':
     $_GET['page'] = 1;
     break;
 case 'go_previous':
     $_GET['page']--;
     break;
 case 'go_next':
     $_GET['page']++;
     break;
 case 'go_last':
     $_GET['page'] = 99999;
     break;
 case 'search':
开发者ID:jigsmaheta,项目名称:puerto-argentino,代码行数:31,代码来源:pre_process.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP gen_admin_mainmenu函数代码示例发布时间:2022-05-15
下一篇:
PHP genRndPwd函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap