/* 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() static char cSearch[64]={""}; void tViewNavList(void); void tViewContextInfo(void); void ExtProcesstViewVars(pentry entries[], int x) { register int i; for(i=0;i=10) { ProcesstViewVars(entries,x); guMode=2000; tView(LANG_NB_CONFIRMNEW); } else tView("Error: Denied by permissions settings"); } else if(!strcmp(gcCommand,LANG_NB_CONFIRMNEW)) { if(guPermLevel>=10) { ProcesstViewVars(entries,x); guMode=2000; //Check entries here guMode=0; uView=0; uCreatedBy=guLoginClient; uOwner=guCompany; uModBy=0;//Never modified uModDate=0;//Never modified NewtView(0); } else tView("Error: Denied by permissions settings"); } else if(!strcmp(gcCommand,LANG_NB_DELETE)) { ProcesstViewVars(entries,x); if(uAllowDel(uOwner,uCreatedBy)) { guMode=2001; tView(LANG_NB_CONFIRMDEL); } else tView("Error: Denied by permissions settings"); } else if(!strcmp(gcCommand,LANG_NB_CONFIRMDEL)) { ProcesstViewVars(entries,x); if(uAllowDel(uOwner,uCreatedBy)) { guMode=5; DeletetView(); } else tView("Error: Denied by permissions settings"); } else if(!strcmp(gcCommand,LANG_NB_MODIFY)) { ProcesstViewVars(entries,x); if(uAllowMod(uOwner,uCreatedBy)) { guMode=2002; tView(LANG_NB_CONFIRMMOD); } else tView("Error: Denied by permissions settings"); } else if(!strcmp(gcCommand,LANG_NB_CONFIRMMOD)) { ProcesstViewVars(entries,x); if(uAllowMod(uOwner,uCreatedBy)) { unsigned uJobNSSet=1; guMode=2002; //Check entries here guMode=0; if(!uNSSet) { char cuNSSet[256]={"1"}; GetConfiguration("cuDefaultViewNS",cuNSSet,0); sscanf(cuNSSet,"%u",&uJobNSSet); } else { uJobNSSet=uNSSet; } if(SubmitJob("Delete",uJobNSSet,"ViewReload",0,0)) htmlPlainTextError("tView.SubmitJob() CONFIRMMOD");; uModBy=guLoginClient; ModtView(); } else tView("Error: Denied by permissions settings"); } } }//void ExttViewCommands(pentry entries[], int x) void ExttViewButtons(void) { OpenFieldSet("tView 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: printf("Table Tips
"); printf("BIND 9 introduced views. mysqlBind could not cope, thus iDNS (mysqlBind2.) " "Apart from the mundane internal/external view model for firewalled environments. " "iDNS supports n views, for advanced geographically (approximated by IP ranges) " "differentiated DNS query result sets. Start out with internal/external views and " "then if you are a very large world-wide concern you can setup whatever you need, " "and the iDNS automation will reduce critical errors and keep you sane and away from your shell editor.\n"); printf("

Search Tools
"); printf(" cSearch",cSearch); tViewNavList(); printf("
\n"); tViewContextInfo(); } CloseFieldSet(); }//void ExttViewButtons(void) void ExttViewAuxTable(void) { }//void ExttViewAuxTable(void) void ExttViewGetHook(entry gentries[], int x) { register int i; for(i=0;i"); if(strcmp(gcFilter,"uView")) printf(""); else printf(""); if(strcmp(gcFilter,"None")) printf(""); else printf(""); printf(""); }//void ExttViewListFilter(void) void ExttViewNavBar(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 ExttViewNavBar(void) void tViewNavList(void) { MYSQL_RES *res; MYSQL_ROW field; unsigned uCount=0; if(!cSearch[0]) { printf("

tViewNavList
\n"); printf("Must restrict via cSearch
\n"); return; } ExtSelectSearch("tView","tView.uView,tView.cLabel","tView.cLabel",cSearch,NULL,0); mysql_query(&gMysql,gcQuery); if(mysql_errno(&gMysql)) { printf("

tViewNavList
\n"); printf("%s",mysql_error(&gMysql)); return; } res=mysql_store_result(&gMysql); printf("

tViewNavList
\n"); if(mysql_num_rows(res)) { while((field=mysql_fetch_row(res))) { uCount++; printf("%s
\n",field[0],cURLEncode(cSearch),field[1]); if(uCount>=100) { printf("More than 100 records: You must refine your search further
\n"); break; } } } else printf("No records found
"); mysql_free_result(res); }//void tViewNavList(void) void tViewContextInfo(void) { printf("Record Context Info
"); printf("No context info available
"); }//void tViewContextInfo(void)