在 Customer Account 新增欄位

    內容表格
    沒有標頭

    系統環境:A2Billing 1.7.1

    應用目的:在 Cutomer Account 的頁面,新增兩個欄位,分別為 voicemail、voicemail password。

    • voicemail: Yes;開啟, No;關閉
    • voicemail password: 語音信箱的密碼

     

    步驟開始:

    1. 在 Database 的 cc_card Table 新增兩個欄位,分別為 'voicemail_active', 'voicemail_password'。
    2. 修改PHP網頁檔 /a2billing/admin/Public/form_data/FG_var_card.inc
    3. 新增 3 個 AGI 檔
      • a2billing_vm_hear.php
      • a2billing_vm_check_did.php
      • a2billing_vm_record.php

     

    // 編輯 /a2billing/admin/Public/form_data/FG_var_card.inc
    在第一行,最後方加上兩個參數 voicemail_active, voicemail_password。

    getpost_ifset(array('id', 'username', 'useralias', 'uipass', 'credit', 'language', 'tariff',
    'id_didgroup','id_campaign', 'callback', 'simultaccess', 'currency','typepaid', 'creditlimit',
    'lastname', 'firstname', 'email', 'address','city', 'state', 'country', 'zipcode', 'phone', 'fax', '
    inuse',
    'cid', 'runservice', 'firstusedate','expirationdate', 'enableexpire', 'expiredays', 'sip_buddy',
    'iax_buddy','popup_select', 'vat', 'autorefill', 'initialbalance', 'mac_addr', 'cardnumberlenght_lis
    t',
    'status', 'block', 'lock_pin', 'template_invoice', 'template_outstanding', 'description', 'voicemail
    _activated',
    'voicemail_permitted','email_notification','credit_notification','notify_email', 'id_seria',
    'company_name' , 'company_website' , 'vat_rn' , 'traffic' , 'traffic_target','discount','restriction
    ','voicemail_active','voicemail_password' ));
    

    繼續往下,在 EMAIL NOTIFICATION 段落下方加上兩個段落。

            $HD_Form -> AddEditElement (gettext("EMAIL NOTIFICATION"),
                                       "email_notification",
                                       '$value',
                                       "INPUT",
                                       "size=30 maxlength=70",
                                       "1",
                                       gettext("Insert the email to notify this customer"),
                                       "" , "", "", "", "", "" , "NO", "");
    
            $HD_Form -> AddEditElement (gettext("VOICEMAIL"),
                               "voicemail_active",
                               't',
                               "RADIOBUTTON",
                               "",
                               "",
                               gettext("Set the voicemail option for this card"),
                               "" , "", "" , "Yes :1, - No:0",      "", "", "", "");
    
            $HD_Form -> AddEditElement (gettext("VOICEMAIL PASSWORD"),
                               "voicemail_password",
                               '',
                               "INPUT",
                               "size=40 maxlength=60",
                               "",
                               gettext("Password for accessing voicemail"),
                               "" , "", "", "", "", "",     "", gettext("Default password is '1234'"));
    

    繼續往下,以上完成已經就可以在表單顯示這兩個新的欄位,但無法讀取資料庫的資料,繼續完成以下的修改。

    新增的參數的位置要對應實際表單的順序,否則會無法作用。

            $HD_Form -> FieldEditElement ('username, useralias, uipass, credit, id_group, id_seria, last
    name, firstname, email, '.
                            ' address, city, state, country, zipcode, phone, fax,company_name, company_w
    ebsite, '.
                            $update_field_typepaid.' tariff, id_didgroup, id_timezone, language, currenc
    y, status, block, lock_pin, simultaccess,  runservice, creditlimit, ' .
                            ' credit_notification, notify_email, email_notification, voicemail_active, v
    oicemail_password' .$add_fields_voicemail.
                            ' id_campaign, ' .
                            ' firstusedate, enableexpire, expirationdate, expiredays, sip_buddy, iax_bud
    dy, mac_addr, inuse, ' .
                            ' autorefill, initialbalance, invoiceday, vat, vat_rn, discount, traffic, tr
    affic_target, restriction ' );
    
    
    標籤 (Edit tags)
    • No tags

    文件 3

    文件大小日期附件上傳者 
     a2billing_vm_check_did.php
    a2billing_vm_check_did
    3.06 KB23:54, 24 Sep 2010alang動作
     a2billing_vm_hear.php
    a2billing_vm_hear.php
    17.51 KB23:54, 24 Sep 2010alang動作
     a2billing_vm_record.php
    a2billing_vm_record
    6.21 KB23:54, 24 Sep 2010alang動作
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core