| | 589 | //unxsISP radius integration code |
| | 590 | |
| | 591 | void CreateProductInstace(void) |
| | 592 | { |
| | 593 | unsigned uInstance=0; |
| | 594 | |
| | 595 | //Insert tInstance record |
| | 596 | sprintf(gcQuery,"INSERT INTO tInstance SET uClient=%u,uProduct=1,cLabel='AstraTurbo',uCreatedBy=1,uOwner='%s',uCreatedDate=UNIX_TIMESTAMP(NOW())", |
| | 597 | guLoginClient |
| | 598 | ,cuCompany |
| | 599 | ); |
| | 600 | mysql_query(&gMysql,gcQuery); |
| | 601 | if(mysql_errno(&gMysql)) |
| | 602 | htmlPlainTextError(mysql_error(&gMysql)); |
| | 603 | |
| | 604 | uInstance=mysql_insert_id(&gMysql); |
| | 605 | |
| | 606 | //Insert tClientConfig records |
| | 607 | //radius login |
| | 608 | sprintf(gcQuery,"INSERT INTO tClientConfig SET uGroup=%u,uService=1,uParameter=1," |
| | 609 | "cValue='%s',uOwner=%u,uCreatedBy=1,uCreatedDate=UNIX_TIMESTAMP(NOW())", |
| | 610 | uInstance |
| | 611 | ,cUser |
| | 612 | ,guLoginClient |
| | 613 | ); |
| | 614 | mysql_query(&gMysql,gcQuery); |
| | 615 | if(mysql_errno(&gMysql)) |
| | 616 | htmlPlainTextError(mysql_error(&gMysql)); |
| | 617 | |
| | 618 | //radius password |
| | 619 | sprintf(gcQuery,"INSERT INTO tClientConfig SET uGroup=%u,uService=1,uParameter=2," |
| | 620 | "cValue='%s',uOwner=%u,uCreatedBy=1,uCreatedDate=UNIX_TIMESTAMP(NOW())", |
| | 621 | uInstance |
| | 622 | ,cPassword |
| | 623 | ,guLoginClient |
| | 624 | ); |
| | 625 | mysql_query(&gMysql,gcQuery); |
| | 626 | if(mysql_errno(&gMysql)) |
| | 627 | htmlPlainTextError(mysql_error(&gMysql)); |
| | 628 | |
| | 629 | //radius profile |
| | 630 | sprintf(gcQuery,"INSERT INTO tClientConfig SET uGroup=%u,uService=1,uParameter=3," |
| | 631 | "cValue='Unlimited',uOwner=%u,uCreatedBy=1,uCreatedDate=UNIX_TIMESTAMP(NOW())", |
| | 632 | uInstance |
| | 633 | ,guLoginClient |
| | 634 | ); |
| | 635 | mysql_query(&gMysql,gcQuery); |
| | 636 | if(mysql_errno(&gMysql)) |
| | 637 | htmlPlainTextError(mysql_error(&gMysql)); |
| | 638 | |
| | 639 | //radius cleartext yes/no |
| | 640 | sprintf(gcQuery,"INSERT INTO tClientConfig SET uGroup=%u,uService=1,uParameter=41," |
| | 641 | "cValue='Yes',uOwner=%u,uCreatedBy=1,uCreatedDate=UNIX_TIMESTAMP(NOW())", |
| | 642 | uInstance |
| | 643 | ,guLoginClient |
| | 644 | ); |
| | 645 | mysql_query(&gMysql,gcQuery); |
| | 646 | if(mysql_errno(&gMysql)) |
| | 647 | htmlPlainTextError(mysql_error(&gMysql)); |
| | 648 | |
| | 649 | }//void CreateProductInstace(void) |
| | 650 | |
| | 651 | |
| | 652 | void SubmitunxsISPJob(void) |
| | 653 | { |
| | 654 | }//void SubmitunxsISPJob(void) |
| | 655 | |