diff options
author | Colin Viebrock <cmv@php.net> | 2000-04-06 16:57:33 +0000 |
---|---|---|
committer | Colin Viebrock <cmv@php.net> | 2000-04-06 16:57:33 +0000 |
commit | 5115342c6ed0aab1d86a3b9ba36d0144580692d6 (patch) | |
tree | d6ec170f2c6e788932a98ffbf6c4999239be29fa | |
parent | a9159c2eec7ce25ad6df38a2befa0924463d2032 (diff) | |
download | php-git-5115342c6ed0aab1d86a3b9ba36d0144580692d6.tar.gz |
More phpinfo() prettying.
Can someone check my code for the interbase
support, and I need someone else to decode the LDAP stuff ... it's beyond
me.
-rw-r--r-- | ext/hyperwave/hw.c | 5 | ||||
-rw-r--r-- | ext/icap/php_icap.c | 10 | ||||
-rw-r--r-- | ext/imap/php_imap.c | 12 | ||||
-rw-r--r-- | ext/interbase/interbase.c | 45 | ||||
-rw-r--r-- | ext/ldap/ldap.c | 4 | ||||
-rw-r--r-- | ext/mcal/php_mcal.c | 15 |
6 files changed, 52 insertions, 39 deletions
diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c index 8a8c810c43..c9432dbbf0 100644 --- a/ext/hyperwave/hw.c +++ b/ext/hyperwave/hw.c @@ -3664,7 +3664,10 @@ PHP_FUNCTION(hw_getrellink) { PHP_MINFO_FUNCTION(hw) { - php_printf("HG-CSP Version: 7.17<BR>\n"); + php_info_print_table_start(); + php_info_print_table_row(2, "Hyperwave Support", "enabled"); + php_info_print_table_row(2, "HG-CSP Version", "7.17"); + php_info_print_table_end(); DISPLAY_INI_ENTRIES(); } diff --git a/ext/icap/php_icap.c b/ext/icap/php_icap.c index 74d86a4be0..06322edafd 100644 --- a/ext/icap/php_icap.c +++ b/ext/icap/php_icap.c @@ -50,6 +50,7 @@ #include "cal.h" #include "php_icap.h" #include "modules.h" +#include "ext/standard/info.h" #if (WIN32|WINNT) #include "winsock.h" #endif @@ -127,11 +128,10 @@ CALSTREAM *cal_close_it (pils *icap_le_struct) PHP_MINFO_FUNCTION(icap) { - php_printf("Icap Support enabled<br>"); - php_printf("<table>"); - php_printf("<tr><td>Icap Version:</td>"); - php_printf("<td>%s</td>",CALVER); - php_printf("</tr></table>"); + php_info_print_table_start(); + php_info_print_table_row(2, "ICAP Support", "enabled"); + php_info_print_table_row(2, "ICAP Version", CALVER); + php_info_print_table_end(); } PHP_MINIT_FUNCTION(icap) diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 6cf20e420b..c07b3e9360 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -34,6 +34,7 @@ #include "php_ini.h" #include "php_imap.h" #include "ext/standard/php_string.h" +#include "ext/standard/info.h" ZEND_DECLARE_MODULE_GLOBALS(imap) @@ -345,15 +346,14 @@ void mail_free_messagelist(MESSAGELIST **msglist) PHP_MINFO_FUNCTION(imap) { - php_printf("Imap Support enabled<br>"); - php_printf("<table>"); - php_printf("<tr><td>Imap c-client Version:</td>"); + php_info_print_table_start(); + php_info_print_table_row(2, "IMAP Support", "enabled"); #ifdef IMAP41 - php_printf("<td>Imap 4.1</td>"); + php_info_print_table_row(2, "IMAP c-Client Version", "4.1"); #else - php_printf("<td>Imap 4.0</td>"); + php_info_print_table_row(2, "IMAP c-Client Version", "4.0"); #endif - php_printf("</tr></table>"); + php_info_print_table_end(); } diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index 40d416162f..0afca99a96 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -45,6 +45,7 @@ A lot... */ #include <ibase.h> #include <time.h> #include "ext/standard/fsock.h" +#include "ext/standard/info.h" /* #include "php_list.h" #include "php_string.h" @@ -510,35 +511,41 @@ PHP_RSHUTDOWN_FUNCTION(ibase) PHP_MINFO_FUNCTION(ibase) { + + char tmp[128]; + char tmp2[128]; + IBLS_FETCH(); - php_printf( - "<table>" - "<tr><td>Revision:</td><td>$Revision$</td></tr>\n" + php_info_print_table_start(); + php_info_print_table_row(2, "Interbase Support", "enabled"); + php_info_print_table_row(2, "Revision", "$Revision$"); #ifdef COMPILE_DL - "<tr><td>Dynamic module:</td><td>Yes</td></tr>\n" + php_info_print_table_row(2, "Dynamic Module", "yes"); #endif - "<tr><td>Allow persistent links:</td><td>%s</td></tr>\n" - "<tr><td>Persistent links:</td><td>%d/", - (IBG(allow_persistent)?"Yes":"No"), - IBG(num_persistent)); + php_info_print_table_row(2, "Allow Persistent Links", (IBG(allow_persistent)?"Yes":"No") ); + + sprintf(tmp, "%d/", IBG(num_persistent) ); if (IBG(max_persistent) == -1) { - php_printf("Unlimited"); + strcat(tmp, "unlimited"); } else { - php_printf("%ld",IBG(max_persistent)); + sprintf(tmp2, "%ld", IBG(max_persistent)); + strcat(tmp, tmp2); } - php_printf("</td></tr>\n" - "<tr><td>Total links:</td><td>%d/", - IBG(num_links)); + php_info_print_table_row(2, "Persistent Links", tmp ); + + sprintf(tmp, "%d/", IBG(num_links) ); if (IBG(max_links) == -1) { - php_printf("Unlimited"); + strcat(tmp, "unlimited"); } else { - php_printf("%ld",IBG(max_links)); + sprintf(tmp2, "%ld", IBG(max_links)); + strcat(tmp, tmp2); } - php_printf("</td></tr>\n" - "<tr><td>Time format:</td><td>\"%s\"</td></tr>\n" - "</table>\n", - IBG(timeformat)); + php_info_print_table_row(2, "Total Links", tmp ); + + php_info_print_table_row(2, "Time Format", IBG(timeformat) ); + + php_info_print_table_end(); } /* }}} */ diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index ce822b2551..5a59f1688d 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -44,7 +44,7 @@ #endif #include "ext/standard/php_string.h" - +#include "ext/standard/info.h" ZEND_DECLARE_MODULE_GLOBALS(ldap) @@ -1274,4 +1274,4 @@ PHP_FUNCTION(ldap_error) { RETURN_STRING(ldap_err2string(ld_errno), 1); } -/* }}} */
\ No newline at end of file +/* }}} */ diff --git a/ext/mcal/php_mcal.c b/ext/mcal/php_mcal.c index f2af5e99ac..aaa53004f6 100644 --- a/ext/mcal/php_mcal.c +++ b/ext/mcal/php_mcal.c @@ -50,6 +50,7 @@ #include "mcal.h" #include "php_mcal.h" #include "modules.h" +#include "ext/standard/info.h" #ifdef PHP_WIN32 #include "winsock.h" #endif @@ -149,14 +150,16 @@ CALSTREAM *cal_close_it (pils *mcal_le_struct) PHP_MINFO_FUNCTION(mcal) { - php_printf("Mcal Support enabled<br>"); - php_printf("<table>"); - php_printf("<tr><td>Mcal Version:</td>"); - php_printf("<td>%s</td>", CALVER); + char tmp[128]; + + php_info_print_table_start(); + php_info_print_table_row(2, "MCAL Support", "enabled" ); + php_info_print_table_row(2, "MCAL Version", CALVER ); #ifdef MCALVER - php_printf("<td>%d</td>", MCALVER); + sprintf(tmp, "%d", MCALVER ); + php_info_print_table_row(2, "", tmp ); #endif - php_printf("</tr></table>"); + php_info_print_table_end(); } PHP_MINIT_FUNCTION(mcal) |