亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cal_fee.c

?? BC3.1編譯,小交換機計費系統.使用Dos做出如此好的界面,少有.
?? C
?? 第 1 頁 / 共 3 頁
字號:
#include <string.h>
#include <stdlib.h>
#include <bio.inc>
#include <menu.inc>
#include <key.inc>
#include "feedef.h"

ACC_STRUCT   Account = { 0,0,0, 0,0,0, 0,0,0, 0,
                         { 0, 0, 0, 0, 0 },
                         { 0, 0, 0, 0, 0, 0 },
                           0, 0
                       };

/* function  : calculate the total dialing fee for all the phone
 * called by : statistics()
 * date      : 1993.10.9
 */
void cal_total_fee(void)
{
    UI    i, j=0;
    UC    flag, user[10];
    FILE  *fp;
    PHONE_STRUCT  *phone;
    AUTHCD_STRUCT *authcd;
    UI    SpecLen[2];

    load_phone_tbl();

    flag = load_authcd_tbl(0);
    if(flag == TRUE)
    {
        Authflg=ON;
        ANewlen = authcd_tbl_len();
    }
    else
    {
        Authflg=OFF;
        message(AUTHCD_FILE_ERR);
    }

    load_special_tbl(0);  /* local call definition table */
    load_special_tbl(1);  /* information call definition table */
    SpecLen[0] = special_tbl_len(0);  /* local */
    SpecLen[1] = special_tbl_len(1);  /* information */

    message_disp(8,"正在計算, 請稍候...");  /* calculating, please wait... */

    Newlen = phone_tbl_len();
    for(i=0; i<Newlen; i++)
    {
        (Phone_top+i)->intern_time   = 0;
        (Phone_top+i)->intern_charge = 0;
        (Phone_top+i)->intern_count  = 0;

        (Phone_top+i)->nation_time   = 0;
        (Phone_top+i)->nation_charge = 0;
        (Phone_top+i)->nation_count  = 0;

        (Phone_top+i)->local_time    = 0;
        (Phone_top+i)->local_charge  = 0;
        (Phone_top+i)->local_count   = 0;

        (Phone_top+i)->addfee[4] = 0;
    }

    if(Authflg == ON)
    {
        for(i=0; i<ANewlen; i++)
        {
            (Auth_cd_top+i)->intern_time   = 0;
            (Auth_cd_top+i)->intern_charge = 0;
            (Auth_cd_top+i)->intern_count  = 0;

            (Auth_cd_top+i)->nation_time   = 0;
            (Auth_cd_top+i)->nation_charge = 0;
            (Auth_cd_top+i)->nation_count  = 0;

            (Auth_cd_top+i)->local_time    = 0;
            (Auth_cd_top+i)->local_charge  = 0;
            (Auth_cd_top+i)->local_count   = 0;

            (Auth_cd_top+i)->addfee        = 0;
        }
    }

    for(i=0; i<2; i++)
    {
        if(i == 0)
            fp = fopen("idd.dbf","rb");
        else
            fp = fopen("idd.hst","rb");

        if(fp != NULL)
        {
            while(fread(&temp_list,sizeof(RECORD_STRUCT),1,fp) == 1)
            {
                if(!is_in_range())             /* not in the sorting time range */
                    continue;

                if(temp_list.auth_code == 0xaaaaaa)
                {
                    ltoa(temp_list.caller2, user, 10);   /* int to ASCII string */
                    phone = binary_search(user);         /* locate the phone No */
                    if(phone == NULL)                    /* can't find the No   */
                        continue;

                    if(temp_list.time%60 != 0 )
                        temp_list.time    = (temp_list.time/60 + 1)*60;
                    phone->intern_time   += temp_list.time;
                    phone->intern_count  += 1;
                    if(phone->feeflag[4])  {		/* IDD fee */
                        phone->intern_charge += temp_list.charge-temp_list.add;
                        phone->addfee[4]     += (UL)temp_list.add;
                    }
                }
                else if(Authflg == ON)
                {
                    authcd = binary_authcd(temp_list.auth_code);          /* locate the phone No */
                    if(authcd == NULL)                     /* can't find the No   */
                        continue;

                    if(temp_list.time%60 != 0 )
                        temp_list.time = (temp_list.time/60 + 1)*60;
                    authcd->intern_time   += temp_list.time;
                    authcd->intern_charge += temp_list.charge-temp_list.add;
                    authcd->intern_count  += 1;
                    authcd->addfee        += (UL)temp_list.add;
                }
            }
            fclose(fp);
        }
    }

    for(i=0; i<2; i++)
    {
        if(i == 0)
            fp = fopen("ddd.dbf","rb");
        else
            fp = fopen("ddd.hst","rb");

        if(fp != NULL)
        {
            while(fread(&temp_list,sizeof(RECORD_STRUCT),1,fp) == 1)
            {
                if(!is_in_range())             /* not in the sorting time range */
                    continue;

                if(temp_list.auth_code == 0xaaaaaa)
                {
                    ltoa(temp_list.caller2, user, 10);   /* int to ASCII string */
                    phone = binary_search(user);         /* locate the phone No */
                    if(phone == NULL)                    /* can't find the No   */
                        continue;

                    if(temp_list.time%60 != 0 )
                        temp_list.time = (temp_list.time/60 + 1)*60;
                    phone->nation_time   += temp_list.time;
                    phone->nation_count  += 1;
                    if(phone->feeflag[3])  {		/* DDD fee */
                        phone->nation_charge += temp_list.charge-temp_list.add;
                        phone->addfee[4]     += (UL)temp_list.add;
                    }
                }
                else if(Authflg == ON)
                {
                    authcd = binary_authcd(temp_list.auth_code);          /* locate the phone No */
                    if(authcd == NULL)                     /* can't find the No   */
                        continue;

                    if(temp_list.time%60 != 0 )
                        temp_list.time = (temp_list.time/60 + 1)*60;
                    authcd->nation_time   += temp_list.time;
                    authcd->nation_count  += 1;
                    authcd->nation_charge += temp_list.charge-temp_list.add;
                    authcd->addfee        += (UL)temp_list.add;
                }
            }
            fclose(fp);
        }
    }

    for(i=0; i<2; i++)
    {
        if(i == 0)
            fp = fopen("ldd.dbf","rb");
        else
            fp = fopen("ldd.hst","rb");

        if(fp != NULL)
        {
            while(fread(&temp_list,sizeof(RECORD_STRUCT),1,fp) == 1)
            {
                if(!is_in_range())         /* not in the sorting time range */
                    continue;
                j++;

                if(temp_list.auth_code == 0xaaaaaa)
                {
                    ltoa(temp_list.caller2, user, 10);   /* int to ASCII string */
                    phone = binary_search(user);         /* locate the phone No */
                    if(phone == NULL)                    /* can't find the No   */
                        continue;

                    if(temp_list.time%60 != 0 )
                        temp_list.time   = (temp_list.time/60 + 1)*60;
                    phone->local_time   += temp_list.time;
                    phone->local_count  += 1;

                    if( phone->feeflag[0] && phone->feeflag[1] && phone->feeflag[2])
		    {
                        phone->local_charge += temp_list.charge-temp_list.add;
                        phone->addfee[4]    += (UL)temp_list.add;
                    }
		    else {
                        UC f1, f2;
                        f1 = IsSpecialCall(temp_list.callee,SpecLen[0],0);
                        f2 = IsSpecialCall(temp_list.callee,SpecLen[1],1);

                        if(   (phone->feeflag[1] && f1)
                            ||(phone->feeflag[2] && f2)
                            || (phone->feeflag[0] && !(f1 && f2) ))
		        {
                            phone->local_charge += temp_list.charge-temp_list.add;
                            phone->addfee[4]    += (UL)temp_list.add;
                        }
                    }
                }
                else if(Authflg == ON)
                {
                    authcd = binary_authcd(temp_list.auth_code);          /* locate the phone No */
                    if(authcd == NULL)                     /* can't find the No   */
                        continue;

                    if(temp_list.time%60 != 0 )
                        temp_list.time = (temp_list.time/60 + 1)*60;
                    authcd->local_time   += temp_list.time;
                    authcd->local_charge += temp_list.charge-temp_list.add;
                    authcd->local_count  += 1;
                    authcd->addfee       += (UL)temp_list.add;
                }
            }
            fclose(fp);
        }
    }

    unload_special_tbl(0);
    unload_special_tbl(1);

    save_phone_tbl(0, 0);
    unload_phone_tbl();

    if(Authflg == ON)
    {
        save_authcd_tbl(NOFRESH, 0);
        unload_authcd_tbl();
    }

    fp = fopen(TotTimeFileName,"wb");
    fwrite(&s_time, sizeof(TIME_STRUCT), 1, fp);
    fwrite(&e_time, sizeof(TIME_STRUCT), 1, fp);
    fclose(fp);

    message_end();

    return;
}


/* function  : calculate the total dialing fee for all the phone
 * called by : statistics()
 * date      : 1993.10.9
 */
UC cal_acc_fee(UC isacc)
{
    UI    i;
    UC    sflag=0;
    TIME_STRUCT stime, etime;
    ACC_STRUCT acc;
    FILE *fp;

    if(isacc == BAN_ACC)
        fp = fopen("gfsdata\\feeacc.dat","rb");
    else if(isacc == DAY_ACC)
        fp = fopen("gfsdata\\banacc.dat","rb");
    else if(isacc == MON_ACC)
        fp = fopen("gfsdata\\dayacc.dat","rb");
    else if(isacc == YEAR_ACC)
        fp = fopen("gfsdata\\monacc.dat","rb");
    else
        return(FALSE);

    if(fp != NULL)
    {
        message_disp(8,"正在計算, 請稍候...");  /* calculating, please wait... */

        Account.intern_time     = 0;
        Account.intern_charge   = 0;
        Account.intern_count    = 0;

        Account.nation_time     = 0;
        Account.nation_charge   = 0;
        Account.nation_count    = 0;

        Account.local_time      = 0;
        Account.local_charge    = 0;
        Account.local_count     = 0;

        Account.month_lease     = 0;

        for(i=0; i<5; i++)
            Account.addfee[i] = 0;

        while(fread(&acc, sizeof(ACC_STRUCT), 1, fp) == 1)
        {
            Account.intern_time  += acc.intern_time;
            Account.intern_count += acc.intern_count;
            Account.intern_charge+= acc.intern_charge;

            Account.nation_time  += acc.nation_time;
            Account.nation_count += acc.nation_count;
            Account.nation_charge+= acc.nation_charge;

            Account.local_time   += acc.local_time;
            Account.local_count  += acc.local_count;
            Account.local_charge += acc.local_charge;

            Account.month_lease  += acc.month_lease;

            for(i=0; i<5; i++)
                Account.addfee[i]+= acc.addfee[i];

            if(sflag == 0)
            {
                sflag = 1;
                stime.year      = acc.seral_no.year+1900;
                stime.month     = acc.seral_no.month;
                stime.day       = acc.seral_no.day;
                stime.hour      = acc.seral_no.hour;
            }
            etime.year  = acc.seral_no.year+1900;
            etime.month = acc.seral_no.month;
            etime.day   = acc.seral_no.day;
            etime.hour  = acc.seral_no.hour;
            etime.hour++;
        }
        fclose(fp);

        if(isacc == BAN_ACC)
            fp = fopen("gfsdata\\bantime.dat","wb");
        else if(isacc == DAY_ACC)
            fp = fopen("gfsdata\\daytime.dat","wb");
        else if(isacc == MON_ACC)
            fp = fopen("gfsdata\\montime.dat","wb");
        else if(isacc == YEAR_ACC)
            fp = fopen("gfsdata\\yeartime.dat","wb");
        else
        {
            message_end();
            return(FALSE);
        }

        fwrite(&stime, sizeof(TIME_STRUCT), 1, fp);
        fwrite(&etime, sizeof(TIME_STRUCT), 1, fp);
        fclose(fp);

        message_end();
    }
    else
        return(FALSE);

    return(TRUE);
}

/* function  : calculate the total dialing fee for all the phone
 * called by : statistics()
 * date      : 1993.10.9
 */
void clr_acc_rcd(UC isacc)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91丨porny丨国产入口| 成人av手机在线观看| 国产精品午夜春色av| 欧美日韩精品欧美日韩精品一 | 午夜精品久久久久久久| 久久久久久久久久久99999| 欧美网站一区二区| 国产精品一区二区你懂的| 天天综合色天天综合色h| 亚洲欧美一区二区久久| 精品99一区二区| 91精品国产色综合久久| 91视频精品在这里| 国产乱码精品一区二区三区忘忧草| 日韩专区一卡二卡| 亚洲制服欧美中文字幕中文字幕| 中文在线一区二区| 精品卡一卡二卡三卡四在线| 91精选在线观看| 欧美三级视频在线| 在线免费观看日本一区| 99久久久久免费精品国产| 国产精品一线二线三线| 奇米精品一区二区三区四区 | 在线免费av一区| 99久久精品免费看国产| 国产精品系列在线观看| 老司机精品视频线观看86| 亚洲成人一区在线| 亚洲电影一区二区| 亚洲色欲色欲www| 中文字幕在线观看一区| 中文字幕av资源一区| 国产亚洲综合在线| 国产婷婷精品av在线| 国产日本一区二区| 亚洲国产高清aⅴ视频| 欧美韩国日本一区| 中文字幕中文在线不卡住| 国产精品视频一二三区| 国产精品卡一卡二| 亚洲女女做受ⅹxx高潮| 樱花影视一区二区| 一区二区三区精品视频在线| 亚洲成人三级小说| 图片区小说区国产精品视频 | 粉嫩aⅴ一区二区三区四区五区| 国产精品一二三| 国产成人午夜视频| 成人精品亚洲人成在线| 99久久99久久综合| 在线国产电影不卡| 777久久久精品| 欧美变态口味重另类| 久久亚洲一区二区三区四区| 国产精品嫩草影院com| 亚洲男女毛片无遮挡| 午夜精品久久久久久久99樱桃 | 99久久精品国产精品久久| 91免费观看视频| 欧美视频完全免费看| 欧美一区二区三区四区在线观看| 精品国精品自拍自在线| 国产欧美日本一区二区三区| 亚洲欧美视频一区| 天天色 色综合| 国产成人综合网| 91欧美激情一区二区三区成人| 欧美日韩1区2区| 国产日韩欧美不卡在线| 亚洲一区在线观看网站| 麻豆精品在线播放| 成人免费福利片| 欧美日本免费一区二区三区| 久久综合一区二区| 亚洲乱码国产乱码精品精98午夜 | 国产乱码精品一区二区三区av| av中文一区二区三区| 欧美午夜精品一区二区蜜桃| 精品国产一区二区三区av性色| 国产精品久久三| 日日夜夜精品免费视频| 福利91精品一区二区三区| 欧美日韩中字一区| 久久久91精品国产一区二区三区| 一区二区三区精品在线观看| 日韩成人午夜精品| 91亚洲精品一区二区乱码| 欧美本精品男人aⅴ天堂| 亚洲天堂精品视频| 国产在线精品一区二区三区不卡| 91福利区一区二区三区| 久久久精品免费免费| 日韩成人av影视| 色综合天天狠狠| 精品国产91九色蝌蚪| 亚洲精品成人少妇| 丁香啪啪综合成人亚洲小说| 日韩一级高清毛片| 亚洲综合久久av| 成人h精品动漫一区二区三区| 欧美高清hd18日本| 亚洲宅男天堂在线观看无病毒| 国产成人精品亚洲午夜麻豆| 日韩欧美一级在线播放| 一区二区三区精品视频| 成人福利视频在线看| 精品成人佐山爱一区二区| 亚洲综合一二三区| 成人小视频免费观看| 欧美成人精品福利| 午夜精品久久久久久久蜜桃app| 北条麻妃国产九九精品视频| 国产亚洲成av人在线观看导航| 无吗不卡中文字幕| 欧美午夜精品免费| 亚洲激情自拍偷拍| 日本韩国精品在线| 亚洲欧美日韩综合aⅴ视频| 成人免费不卡视频| 国产欧美一区视频| 国产一区二区三区不卡在线观看| 欧美一级生活片| 日韩av中文在线观看| 69堂国产成人免费视频| 天天操天天综合网| 欧美一区二区三区喷汁尤物| 亚洲va韩国va欧美va| 欧美在线视频不卡| 亚洲妇熟xx妇色黄| 欧美日韩第一区日日骚| 亚洲成人1区2区| 欧美三级韩国三级日本一级| 亚洲综合在线免费观看| 欧美性大战久久久久久久| 亚洲伊人色欲综合网| 欧美日韩一区久久| 日韩国产高清影视| 日韩一区二区免费高清| 蜜桃精品视频在线| 日韩美女在线视频| 国产精品18久久久久| xfplay精品久久| 大白屁股一区二区视频| 国产精品久久久久影视| 99久久99久久精品免费观看| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 99国产精品国产精品久久| 亚洲男人的天堂av| 欧美性感一区二区三区| 日韩精品成人一区二区在线| 日韩午夜小视频| 极品美女销魂一区二区三区| 国产喷白浆一区二区三区| 色综合天天综合网天天狠天天| 亚洲午夜电影在线| 欧美电影免费观看完整版| 国产高清精品在线| 亚洲日本va在线观看| 欧美日韩一区成人| 久久99在线观看| 国产欧美日韩中文久久| 成人性生交大片免费看在线播放| 亚洲激情在线播放| 日韩一区二区视频| 国产.欧美.日韩| 亚洲一线二线三线久久久| 91麻豆精品91久久久久同性| 国产成人在线影院| 亚洲黄色av一区| 精品国产免费久久| 色综合天天天天做夜夜夜夜做| 图片区日韩欧美亚洲| 久久精品欧美一区二区三区麻豆| 色狠狠色狠狠综合| 狂野欧美性猛交blacked| 自拍偷自拍亚洲精品播放| 欧美日韩中文另类| 国产精品自拍av| 五月婷婷另类国产| 国产精品国产a| 日韩欧美亚洲一区二区| av激情亚洲男人天堂| 欧美96一区二区免费视频| 国产精品久久久久久久久动漫| 欧美精品久久天天躁| 成人av电影观看| 日本91福利区| 一区二区三区中文字幕电影 | 韩国v欧美v亚洲v日本v| 亚洲欧洲成人自拍| 精品免费一区二区三区| 在线观看视频欧美| 成人美女在线视频| 蜜乳av一区二区三区| 亚洲精品自拍动漫在线| 久久久亚洲精品石原莉奈| 欧美一区中文字幕| 色综合久久综合中文综合网| 国产成人99久久亚洲综合精品|