<?php
define('SQL_GET_ONLINE_DATA_MAIN', "SELECT UserName,Start_Time,Call_From,Call_To,Ip,((Time_On-(Time_On%3600))/3600'||'(((Time_On%3600)-(Time_On%60))/60)'||'(Time_On%60)),In_Bytes,Out_Bytes,Billing_Minus,Port,client_ip FROM sk_online"); define('SQL_GET_ONLINE_DATA_PROV', "SELECT sk_online.UserName,sk_online.Start_Time,sk_online.Call_From,sk_online.Call_To,sk_online.Ip,((sk_online.Time_On-(sk_online.Time_On%3600))/3600'||'(((sk_online.Time_On%3600)-(sk_online.Time_On%60))/60)'||'(sk_online.Time_On%60)),sk_online.In_Bytes,sk_online.Out_Bytes,sk_online.Billing_Minus,sk_online.Port,sk_online.client_ip FROM sk_online,sk_service_set,sk_packets WHERE sk_online.gid=sk_packets.gid AND sk_packets.service_set_id=sk_service_set.service_set_id AND sk_service_set.provider_id='%s'"); define('SQL_GET_ONLINE_DATA_SPEC', "SELECT sk_online.Username,sk_online.Start_Time,sk_online.Call_From,sk_online.Call_To,sk_online.Ip,((sk_online.Time_On-(sk_online.Time_On%3600))/3600'||'(((sk_online.Time_On%3600)-(sk_online.Time_On%60))/60)'||'(sk_online.Time_On%60)),sk_online.In_Bytes,sk_online.Out_Bytes,sk_online.Billing_Minus,sk_online.Port,sk_online.client_ip FROM sk_online,sk_group_tracker WHERE sk_online.gid=sk_group_tracker.gid AND sk_group_tracker.obj_id='%s' AND like('%s', sk_online.username)"); ?>
