%s: %s
", Txt_Time_zone_used_in_the_calculation_of_these_statistics, BrowserTimeZone); break; default: break; } } /*****************************************************************************/ /******************* Show a listing of detailed clicks ***********************/ /*****************************************************************************/ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql_res) { extern const char *Txt_Show_previous_X_clicks; extern const char *Txt_PAGES_Previous; extern const char *Txt_Clicks; extern const char *Txt_of_PART_OF_A_TOTAL; extern const char *Txt_page; extern const char *Txt_Show_next_X_clicks; extern const char *Txt_PAGES_Next; extern const char *Txt_No_INDEX; extern const char *Txt_User_ID; extern const char *Txt_Name; extern const char *Txt_Role; extern const char *Txt_Date; extern const char *Txt_Action; extern const char *Txt_LOG_More_info; extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; extern const char *Txt_Today; unsigned long NumRow; unsigned long FirstRow; // First row to show unsigned long LastRow; // Last rows to show unsigned long NumPagesBefore; unsigned long NumPagesAfter; unsigned long NumPagsTotal; struct UsrData UsrDat; MYSQL_ROW row; long LogCod; Rol_Role_t RoleFromLog; unsigned UniqueId; long ActCod; char ActTxt[Act_MAX_BYTES_ACTION_TXT + 1]; /***** Initialize estructura of data of the user *****/ Usr_UsrDataConstructor (&UsrDat); /***** Compute the first and the last row to show *****/ FirstRow = Gbl.Stat.FirstRow; LastRow = Gbl.Stat.LastRow; if (FirstRow == 0 && LastRow == 0) // Call from main form { // Show last clicks FirstRow = (NumRows / Gbl.Stat.RowsPerPage - 1) * Gbl.Stat.RowsPerPage + 1; if ((FirstRow + Gbl.Stat.RowsPerPage - 1) < NumRows) FirstRow += Gbl.Stat.RowsPerPage; LastRow = NumRows; } if (FirstRow < 1) // For security reasons; really it should never be less than 1 FirstRow = 1; if (LastRow > NumRows) LastRow = NumRows; if ((LastRow - FirstRow) >= Gbl.Stat.RowsPerPage) // For if there have been clicks that have increased the number of rows LastRow = FirstRow + Gbl.Stat.RowsPerPage - 1; /***** Compute the number total of pages *****/ /* Number of pages before the current one */ NumPagesBefore = (FirstRow-1) / Gbl.Stat.RowsPerPage; if (NumPagesBefore * Gbl.Stat.RowsPerPage < (FirstRow-1)) NumPagesBefore++; /* Number of pages after the current one */ NumPagesAfter = (NumRows - LastRow) / Gbl.Stat.RowsPerPage; if (NumPagesAfter * Gbl.Stat.RowsPerPage < (NumRows - LastRow)) NumPagesAfter++; /* Count the total number of pages */ NumPagsTotal = NumPagesBefore + 1 + NumPagesAfter; /***** Put heading with backward and forward buttons *****/ Tbl_StartRow (); Tbl_StartCellAttr ("colspan=\"7\" class=\"LEFT_MIDDLE\""); Tbl_StartTableWidePadding (2); Tbl_StartRow (); /* Put link to jump to previous page (older clicks) */ if (FirstRow > 1) { Frm_StartFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID); Dat_WriteParamsIniEndDates (); Par_PutHiddenParamUnsigned ("GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST); Par_PutHiddenParamUnsigned ("StatAct" ,(unsigned) Gbl.Stat.NumAction); Par_PutHiddenParamLong ("FirstRow",FirstRow - Gbl.Stat.RowsPerPage); Par_PutHiddenParamLong ("LastRow" ,FirstRow - 1); Par_PutHiddenParamLong ("RowsPage",Gbl.Stat.RowsPerPage); Usr_PutHiddenParSelectedUsrsCods (); } Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:20%%;\""); if (FirstRow > 1) { snprintf (Gbl.Title,sizeof (Gbl.Title), Txt_Show_previous_X_clicks, Gbl.Stat.RowsPerPage); Frm_LinkFormSubmit (Gbl.Title,"TIT_TBL",NULL); fprintf (Gbl.F.Out,"<%s", Txt_PAGES_Previous); } Tbl_EndCell (); if (FirstRow > 1) Frm_EndForm (); /* Write number of current page */ Tbl_StartCellAttr ("class=\"DAT_N CENTER_MIDDLE\" style=\"width:60%%;\""); fprintf (Gbl.F.Out,"" "%s %lu-%lu %s %lu (%s %ld %s %lu)" "", Txt_Clicks, FirstRow,LastRow,Txt_of_PART_OF_A_TOTAL,NumRows, Txt_page,NumPagesBefore + 1,Txt_of_PART_OF_A_TOTAL,NumPagsTotal); Tbl_EndCell (); /* Put link to jump to next page (more recent clicks) */ if (LastRow < NumRows) { Frm_StartFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID); Dat_WriteParamsIniEndDates (); Par_PutHiddenParamUnsigned ("GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST); Par_PutHiddenParamUnsigned ("StatAct" ,(unsigned) Gbl.Stat.NumAction); Par_PutHiddenParamUnsigned ("FirstRow" ,(unsigned) (LastRow + 1)); Par_PutHiddenParamUnsigned ("LastRow" ,(unsigned) (LastRow + Gbl.Stat.RowsPerPage)); Par_PutHiddenParamUnsigned ("RowsPage" ,(unsigned) Gbl.Stat.RowsPerPage); Usr_PutHiddenParSelectedUsrsCods (); } Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\" style=\"width:20%%;\""); if (LastRow < NumRows) { snprintf (Gbl.Title,sizeof (Gbl.Title), Txt_Show_next_X_clicks, Gbl.Stat.RowsPerPage); Frm_LinkFormSubmit (Gbl.Title,"TIT_TBL",NULL); fprintf (Gbl.F.Out,"%s>" "", Txt_PAGES_Next); } Tbl_EndCell (); if (LastRow < NumRows) Frm_EndForm (); Tbl_EndRow (); Tbl_EndTable (); Tbl_EndCell (); Tbl_EndRow (); /***** Write heading *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"