Changeset 1253

Show
Ignore:
Timestamp:
03/15/10 17:18:53 (2 years ago)
Author:
Hugo
Message:

iDNS: unstable save commit

Location:
trunk/unxsBind
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/unxsBind/mysqlrad.h

    r1251 r1253  
    169169void ExttZoneNavBar(void); 
    170170unsigned OnLineZoneCheck(unsigned uZone,unsigned uCalledMode,unsigned uCalledFrom); 
     171void CreatetResourceTest(void); 
    171172 
    172173//tResource 
  • trunk/unxsBind/tresourcefunc.h

    r1234 r1253  
    14521452}//int AutoAddPTRResource() 
    14531453 
     1454 
     1455void PrepareTestData(void) 
     1456{ 
     1457        CreatetResourceTest(); 
     1458        sprintf(gcQuery,"TRUNCATE tResourceTest"); 
     1459        mysql_query(&gMysql,gcQuery); 
     1460        if(mysql_errno(&gMysql)) 
     1461                htmlPlainTextError(mysql_error(&gMysql)); 
     1462         
     1463        sprintf(gcQuery,"INSERT INTO tResourceTest (uResource,cName,uOwner,uCreatedBy,uCreatedDate,uModBy," 
     1464                        "uModDate,uTTL,uRRType,cParam1,cParam2,cParam3,cParam4,cComment,uZone) " 
     1465                        "SELECT uResource,cName,uOwner,uCreatedBy,uCreatedDate,uModBy,uModDate,uTTL,uRRType," 
     1466                        "cParam1,cParam2,cParam3,cParam4,cComment,uZone FROM tResource WHERE " 
     1467                        "uZone=%u",uZone); 
     1468 
     1469        mysql_query(&gMysql,gcQuery); 
     1470        if(mysql_errno(&gMysql)) 
     1471                htmlPlainTextError(mysql_error(&gMysql)); 
     1472         
     1473        if(!strcmp(gcCommand,LANG_NB_CONFIRMNEW)) 
     1474                sprintf(gcQuery,"INSERT INTO tResourceTest SET cName='%s',uTTL=%u,uRRType=%u,cParam1='%s'" 
     1475                                ",cParam2='%s',cParam3='%s',cParam4='%s',cComment='%s',uOwner=%u,uCreatedBy=%u," 
     1476                                "uCreatedDate=UNIX_TIMESTAMP(NOW()),uZone=%u", 
     1477                                cName, 
     1478                                uTTL, 
     1479                                uRRType, 
     1480                                cParam1, 
     1481                                cParam2, 
     1482                                cParam3, 
     1483                                cParam4, 
     1484                                TextAreaSave(cComment), 
     1485                                guCompany, 
     1486                                guLoginClient, 
     1487                                uZone); 
     1488                else if(!strcmp(gcCommand,LANG_NB_CONFIRMMOD)) 
     1489                sprintf(gcQuery,"UPDATE tResourceTest SET cName='%s',uTTL=%u,uRRType=%u,cParam1='%s',cParam2='%s'," 
     1490                                "cParam3='%s',cParam4='%s',cComment='%s',uModBy=%u,uModDate=UNIX_TIMESTAMP(NOW()) " 
     1491                                "WHERE uResource=%u", 
     1492                                cName, 
     1493                                uTTL, 
     1494                                uRRType, 
     1495                                cParam1, 
     1496                                cParam2, 
     1497                                cParam3, 
     1498                                cParam4, 
     1499                                TextAreaSave(cComment), 
     1500                                guLoginClient, 
     1501                                uResource); 
     1502        mysql_query(&gMysql,gcQuery); 
     1503        if(mysql_errno(&gMysql)) 
     1504                htmlPlainTextError(mysql_error(&gMysql)); 
     1505 
     1506}//void PrepareTestData(void) 
     1507 
     1508 
     1509 
     1510