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:
if(uZone && guPermLevel>11)
{
printf("Import Tools
\n"); printf("
\n"); printf("
\n"); printf("
\n"); printf("
\n"); printf("
\n");
}
else
{
printf("No zones or no permission. Use command line to import.\n");
}
}
CloseFieldSet();
}//void ExttZoneImportButtons(void)
void ExttZoneImportGetHook(entry gentries[], int x)
{
register int i;
for(i=0;i ");
while((field=mysql_fetch_row(res)))
{
char *cColorName=cBlack;
char *cColorTTL=cBlack;
char *cColorType=cBlack;
char *cColorParam1=cBlack;
char *cColorParam2=cBlack;
char *cColorComment=cBlack;
//Compare against possible existing records
sprintf(gcQuery,"SELECT tResource.cName,tResource.uTTL,tRRType.cLabel,tResource.cParam1,"
"tResource.cParam2,tResource.cComment,tResource.uResource FROM "
"tZone,tResource,tRRType WHERE tResource.uZone=tZone.uZone AND "
"tResource.uRRType=tRRType.uRRType AND tZone.cZone='%s' AND "
"tZone.uView=2 AND tResource.cName='%s' AND tRRType.cLabel='%s' AND tResource.cParam1='%s'",
cZone,field[0],field[2],TextAreaSave(field[3]));
mysql_query(&gMysql,gcQuery);
if(mysql_errno(&gMysql))
htmlPlainTextError(mysql_error(&gMysql));
res2=mysql_store_result(&gMysql);
field2=mysql_fetch_row(res2);
if(field2==NULL)
{
cColorName=cRed;
cColorTTL=cRed;
cColorType=cRed;
cColorParam1=cRed;
cColorParam2=cRed;
cColorComment=cRed;
}
if(strcmp(field[1],"0"))
sprintf(cTTL,"%.15s",field[1]);
else
sprintf(cTTL," ");
if(!field[0][0] || field[0][0]=='\t')
strcpy(cName,"@");
else
strcpy(cName,field[0]);
//Compare and set color to red if it does not match current tResource
if(field2!=NULL)
{
if(strcmp(field[1],field2[1]))
cColorTTL=cRed;
else
cColorTTL=cBlack;
if(strcmp(field[4],field2[4]))
cColorParam2=cRed;
else
cColorParam2=cBlack;
if(strcmp(field[5],field2[5]))
cColorComment=cRed;
else
cColorComment=cBlack;
}
if(strcmp(cColorName,cRed))
{
printf("Name TTL "
"Type Param 1 "
"Param 2 Comment \n",
field[6],cZone,cColorName,cName,
cColorTTL,cTTL,cColorType,field[2],
cColorParam1,field[3],cColorParam2,field[4],cColorComment,field[5]);
}
else
{
printf(""
"%s %s "
"%s %.64s "
"%s %s \n",
field[6],cZone,cColorName,cName,field[6],
cColorTTL,cTTL,cColorType,field[2],
cColorParam1,field[3],cColorParam2,field[4],cColorComment,field[5]);
}
i++;
mysql_free_result(res2);
}
mysql_free_result(res);
if(!i)
printf(""
"%s"
" "
"%s %s "
"%.64s %s "
"%s \n");
CloseFieldSet();
}//void ResourceImportRecordList(void)
void ExttZoneImportAuxTable(void)
{
ResourceImportRecordList(uZone);
}//void ExttZoneImportAuxTable(void)
No resource records