亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
久久久久久影视| 韩国女主播成人在线| 国产亚洲一区二区在线观看| 7777精品伊人久久久大香线蕉最新版| 国产成人亚洲综合a∨婷婷图片 | 91精品国产黑色紧身裤美女| 欧美午夜影院一区| 欧美日韩在线播放三区| 欧美日韩国产精品自在自线| 欧美一级黄色录像| 欧美精品一区二区三区蜜桃视频| 久久午夜国产精品| 国产精品网站在线观看| 亚洲精品少妇30p| 亚洲福利一二三区| 麻豆精品视频在线观看| 国产夫妻精品视频| 91啪亚洲精品| 在线电影院国产精品| 日韩欧美三级在线| 国产日产欧美一区二区三区| 亚洲日本在线视频观看| 亚洲va欧美va人人爽| 久久国产综合精品| 99精品国产一区二区三区不卡| 欧美主播一区二区三区| 欧美大片拔萝卜| 日韩美女精品在线| 麻豆精品在线观看| 成人精品gif动图一区| 欧美在线视频日韩| 久久综合久久鬼色| 一区二区三区不卡视频在线观看 | 午夜电影网一区| 国产一区视频在线看| 在线精品视频免费播放| 精品久久久久一区二区国产| 国产精品久久一卡二卡| 日韩av电影天堂| 成人丝袜18视频在线观看| 欧美精品色一区二区三区| 欧美国产日产图区| 蜜桃一区二区三区在线| 色婷婷狠狠综合| 国产婷婷一区二区| 奇米影视一区二区三区小说| 99久久国产综合精品色伊| wwwwww.欧美系列| 亚洲成人7777| 91蜜桃传媒精品久久久一区二区| 欧美色倩网站大全免费| 国产亚洲精品福利| 蜜桃视频免费观看一区| 91视频在线观看免费| 欧美日韩国产小视频| 欧美激情一二三区| 久久国产精品免费| 色久优优欧美色久优优| 中文字幕永久在线不卡| 精品一区二区影视| 制服丝袜日韩国产| 亚洲午夜在线视频| 一本大道久久a久久综合婷婷| 久久久久久综合| 久久精品国产色蜜蜜麻豆| 在线观看一区日韩| 国产精品动漫网站| 国产一区 二区| 26uuu国产一区二区三区 | 91精品婷婷国产综合久久性色 | 久久综合色8888| 免费人成黄页网站在线一区二区| 欧美性色黄大片| 亚洲精品久久7777| 日本久久电影网| 亚洲精品国产一区二区三区四区在线| 国产精品996| 日本一区二区视频在线观看| 韩国成人在线视频| 国产色产综合产在线视频| 国产在线视频一区二区| 精品电影一区二区| 国产精一区二区三区| 久久免费精品国产久精品久久久久| 日韩精品一区第一页| 欧美日韩国产免费一区二区| 日韩在线一二三区| 日韩一级在线观看| 国产一区二区美女| 国产精品毛片a∨一区二区三区 | 一区二区免费视频| 欧美亚洲国产怡红院影院| 亚洲一区在线免费观看| 欧美日韩激情在线| 精品综合久久久久久8888| 精品精品欲导航| 国产成人激情av| 亚洲欧美区自拍先锋| 欧洲精品视频在线观看| 婷婷中文字幕综合| 欧美mv和日韩mv的网站| 国产成人午夜高潮毛片| 亚洲精品v日韩精品| 欧美精品在线视频| 国产宾馆实践打屁股91| 亚洲欧洲国产日韩| 91精品午夜视频| 成人免费视频视频在线观看免费 | 精品国产乱码久久久久久久久| 国产一区二区剧情av在线| 中文字幕乱码久久午夜不卡| 一本大道av伊人久久综合| 免费成人av资源网| 国产精品久久久久久久久动漫 | 精品国产免费人成电影在线观看四季| 国产激情视频一区二区三区欧美 | 色偷偷一区二区三区| 免费在线观看精品| 国产精品家庭影院| 日韩欧美激情四射| 一本久道久久综合中文字幕| 美女视频网站久久| 亚洲精品一二三| 精品成人免费观看| 精品视频资源站| 成人一区在线观看| 麻豆久久一区二区| 亚洲一级二级在线| 中文字幕欧美日韩一区| 欧美一级片在线| 成人av在线资源网| 狠狠狠色丁香婷婷综合久久五月| 亚洲精品成人在线| 国产精品女同一区二区三区| 91精品国产综合久久久久| 91亚洲精华国产精华精华液| 国产一区二区按摩在线观看| 日韩不卡一二三区| 亚洲妇熟xx妇色黄| 亚洲一二三区在线观看| 中文字幕中文字幕在线一区| 久久视频一区二区| 日韩欧美国产综合一区 | 欧美一区二区精美| 欧美影院午夜播放| 91丨九色porny丨蝌蚪| 国产一区二区不卡在线| 狠狠色丁香久久婷婷综合丁香| 无吗不卡中文字幕| 偷拍与自拍一区| 亚洲成人av在线电影| 亚洲自拍偷拍麻豆| 亚洲一区二区在线免费观看视频| 国产精品乱码妇女bbbb| 国产精品美女久久久久久久久 | 性做久久久久久久免费看| 亚洲精品欧美二区三区中文字幕| 国产精品电影一区二区三区| 国产精品久久久久天堂| 中文字幕免费不卡| 亚洲欧美日韩一区二区三区在线观看 | 一区二区欧美在线观看| 亚洲精品videosex极品| 亚洲一区二区三区精品在线| 亚洲一区二区三区四区在线观看| 亚洲综合一二三区| 亚欧色一区w666天堂| 日本美女一区二区| 另类小说欧美激情| 国产伦理精品不卡| 成人av在线一区二区三区| 99久久精品国产网站| 色哟哟国产精品| 678五月天丁香亚洲综合网| 日韩一级免费一区| 久久噜噜亚洲综合| 一区免费观看视频| 亚洲综合在线电影| 蜜桃视频一区二区三区在线观看 | 欧美调教femdomvk| 日韩一区二区在线观看| 久久网站最新地址| 亚洲黄色小说网站| 蜜桃视频免费观看一区| 久久激情五月激情| 91亚洲国产成人精品一区二区三 | 99久久精品费精品国产一区二区| 日本高清视频一区二区| 欧美一级免费大片| 国产精品欧美一区喷水| 午夜精品久久久久影视| 国产一区二区在线视频| 色婷婷亚洲综合| 欧美xxxxxxxx| 一区二区三区成人| 国产黄色精品网站| 欧美日韩国产高清一区二区| 久久亚洲一区二区三区四区| 一区二区三区四区中文字幕| 国产一区二区在线观看免费|