/* FILE $Id$ (Built initially by unixservice.com mysqlRAD2) PURPOSE Non schema-dependent table and application table related functions. AUTHOR (C) 2001-2009 Gary Wallis and Hugo Urquiza. */ //ModuleFunctionProtos() void tLogTypeNavList(void); void ExtProcesstLogTypeVars(pentry entries[], int x) { /* register int i; for(i=0;i=12) { ProcesstLogTypeVars(entries,x); guMode=2000; tLogType(LANG_NB_CONFIRMNEW); } else tLogType("Error: Denied by permissions settings"); } else if(!strcmp(gcCommand,LANG_NB_CONFIRMNEW)) { if(guPermLevel>=12) { ProcesstLogTypeVars(entries,x); guMode=2000; //Check entries here guMode=0; uLogType=0; uCreatedBy=guLoginClient; uOwner=guCompany; uModBy=0;//Never modified uModDate=0;//Never modified NewtLogType(0); } else tLogType("Error: Denied by permissions settings"); } else if(!strcmp(gcCommand,LANG_NB_DELETE)) { ProcesstLogTypeVars(entries,x); if(uAllowDel(uOwner,uCreatedBy)) { guMode=2001; tLogType(LANG_NB_CONFIRMDEL); } else tLogType("Error: Denied by permissions settings"); } else if(!strcmp(gcCommand,LANG_NB_CONFIRMDEL)) { ProcesstLogTypeVars(entries,x); if(uAllowDel(uOwner,uCreatedBy)) { guMode=5; DeletetLogType(); } else tLogType("Error: Denied by permissions settings"); } else if(!strcmp(gcCommand,LANG_NB_MODIFY)) { ProcesstLogTypeVars(entries,x); if(uAllowMod(uOwner,uCreatedBy)) { guMode=2002; tLogType(LANG_NB_CONFIRMMOD); } else tLogType("Error: Denied by permissions settings"); } else if(!strcmp(gcCommand,LANG_NB_CONFIRMMOD)) { ProcesstLogTypeVars(entries,x); if(uAllowMod(uOwner,uCreatedBy)) { guMode=2002; //Check entries here guMode=0; uModBy=guLoginClient; ModtLogType(); } else tLogType("Error: Denied by permissions settings"); } } }//void ExttLogTypeCommands(pentry entries[], int x) void ExttLogTypeButtons(void) { OpenFieldSet("Aux Panel",100); switch(guMode) { case 2000: printf("

Enter/mod data
"); printf(LANG_NBB_CONFIRMNEW); break; case 2001: printf("

Think twice
"); printf(LANG_NBB_CONFIRMDEL); break; case 2002: printf("

Review changes
"); printf(LANG_NBB_CONFIRMMOD); break; default: tLogTypeNavList(); } CloseFieldSet(); }//void ExttLogTypeButtons(void) void ExttLogTypeAuxTable(void) { }//void ExttLogTypeAuxTable(void) void ExttLogTypeGetHook(entry gentries[], int x) { register int i; for(i=0;i"); if(strcmp(gcFilter,"uLogType")) printf(""); else printf(""); if(strcmp(gcFilter,"None")) printf(""); else printf(""); printf(""); }//void ExttLogTypeListFilter(void) void ExttLogTypeNavBar(void) { printf(LANG_NBB_SKIPFIRST); printf(LANG_NBB_SKIPBACK); printf(LANG_NBB_SEARCH); if(guPermLevel>=10 && !guListMode) printf(LANG_NBB_NEW); if(uAllowMod(uOwner,uCreatedBy)) printf(LANG_NBB_MODIFY); if(uAllowDel(uOwner,uCreatedBy)) printf(LANG_NBB_DELETE); if(uOwner) printf(LANG_NBB_LIST); printf(LANG_NBB_SKIPNEXT); printf(LANG_NBB_SKIPLAST); printf("   \n"); }//void ExttLogTypeNavBar(void) void tLogTypeNavList(void) { MYSQL_RES *res; MYSQL_ROW field; ExtSelect("tLogType","tLogType.uLogType,tLogType.cLabel",20); mysql_query(&gMysql,gcQuery); if(mysql_errno(&gMysql)) { printf("

tLogTypeNavList
\n"); printf("%s",mysql_error(&gMysql)); return; } res=mysql_store_result(&gMysql); if(mysql_num_rows(res)) { printf("

tLogTypeNavList
\n"); while((field=mysql_fetch_row(res))) printf("%s
\n",field[0],field[1]); } mysql_free_result(res); }//void tLogTypeNavList(void)