]> granicus.if.org Git - php/commitdiff
More phpinfo() prettying.
authorColin Viebrock <cmv@php.net>
Thu, 6 Apr 2000 16:57:33 +0000 (16:57 +0000)
committerColin Viebrock <cmv@php.net>
Thu, 6 Apr 2000 16:57:33 +0000 (16:57 +0000)
Can someone check my code for the interbase
support, and I need someone else to decode the LDAP stuff ... it's beyond
me.

ext/hyperwave/hw.c
ext/icap/php_icap.c
ext/imap/php_imap.c
ext/interbase/interbase.c
ext/ldap/ldap.c
ext/mcal/php_mcal.c

index 8a8c810c43ce53000c28c02f7dace80686e65234..c9432dbbf057e25a210995c361499713c31c2474 100644 (file)
@@ -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();
 }
 
index 74d86a4be00632b090109609537141bb11f2d4e8..06322edafdaf02c7016d5ce2b22f683ffbb9f039 100644 (file)
@@ -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)
index 6cf20e420b2725609398b0133e23830e64de59c4..c07b3e93605df9783df7e46636f92512f7887450 100644 (file)
@@ -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();
 }
 
 
index 40d416162fb602694612b9f12acb9bc576a856a1..0afca99a96d566473bc9f8a7b597739f60c477f1 100644 (file)
@@ -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();
 }
 /* }}} */
 
index ce822b2551fbc042a6bcebd08f851fbc8bf4683d..5a59f1688d4763c135ab7ec12a240919ca8d98cb 100644 (file)
@@ -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
+/* }}} */
index f2af5e99ac666de3da850cb85c2238f640d7acca..aaa53004f6ae890ac6858585b6872b546d4085ff 100644 (file)
@@ -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)