@@ -92,14 +92,6 @@ static int php_info_printf(const char *fmt, ...) /* {{{ */
92
92
}
93
93
/* }}} */
94
94
95
- static void php_info_print_request_uri (TSRMLS_D ) /* {{{ */
96
- {
97
- if (SG (request_info ).request_uri ) {
98
- php_info_print_html_esc (SG (request_info ).request_uri , strlen (SG (request_info ).request_uri ));
99
- }
100
- }
101
- /* }}} */
102
-
103
95
static int php_info_print (const char * str ) /* {{{ */
104
96
{
105
97
TSRMLS_FETCH ();
@@ -671,7 +663,6 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
671
663
if (flag & PHP_INFO_GENERAL ) {
672
664
char * zend_version = get_zend_version ();
673
665
char temp_api [10 ];
674
- char * logo_guid ;
675
666
676
667
php_uname = php_get_uname ('a' );
677
668
@@ -680,13 +671,18 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
680
671
}
681
672
682
673
if (expose_php && !sapi_module .phpinfo_as_text ) {
683
- php_info_print ("<a href=\"http://www.php.net/\"><img border=\"0\" src=\"" );
684
- php_info_print_request_uri (TSRMLS_C );
685
- php_info_print ("?=" );
686
- logo_guid = php_logo_guid ();
687
- php_info_print (logo_guid );
688
- efree (logo_guid );
689
- php_info_print ("\" alt=\"PHP Logo\" /></a>" );
674
+ time_t the_time ;
675
+ struct tm * ta , tmbuf ;
676
+
677
+ the_time = time (NULL );
678
+ ta = php_localtime_r (& the_time , & tmbuf );
679
+
680
+ php_info_print ("<a href=\"http://www.php.net/\"><img border=\"0\" src=\"" );
681
+ if (ta && (ta -> tm_mon == 3 ) && (ta -> tm_mday == 1 )) {
682
+ php_info_print (PHP_EGG_LOGO_DATA_URI "\" alt=\"PHP logo\" /></a>" );
683
+ } else {
684
+ php_info_print (PHP_LOGO_DATA_URI "\" alt=\"PHP logo\" /></a>" );
685
+ }
690
686
}
691
687
692
688
if (!sapi_module .phpinfo_as_text ) {
@@ -789,8 +785,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
789
785
php_info_print_box_start (0 );
790
786
if (expose_php && !sapi_module .phpinfo_as_text ) {
791
787
php_info_print ("<a href=\"http://www.zend.com/\"><img border=\"0\" src=\"" );
792
- php_info_print_request_uri (TSRMLS_C );
793
- php_info_print ("?=" ZEND_LOGO_GUID "\" alt=\"Zend logo\" /></a>\n" );
788
+ php_info_print (ZEND_LOGO_DATA_URI "\" alt=\"Zend logo\" /></a>\n" );
794
789
}
795
790
php_info_print ("This program makes use of the Zend Scripting Language Engine:" );
796
791
php_info_print (!sapi_module .phpinfo_as_text ?"<br />" :"\n" );
@@ -805,11 +800,23 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
805
800
806
801
if ((flag & PHP_INFO_CREDITS ) && expose_php && !sapi_module .phpinfo_as_text ) {
807
802
php_info_print_hr ();
808
- php_info_print ("<h1><a href=\"" );
809
- php_info_print_request_uri (TSRMLS_C );
810
- php_info_print ("?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000\">" );
803
+ php_info_print ("<script>(function () {\n" );
804
+ php_info_print ("'use strict';\n" );
805
+ php_info_print (" window.onload = function () {\n" );
806
+ php_info_print (" document.getElementById('credits').style.display = 'none';\n" );
807
+ php_info_print (" document.getElementById('revealcredits').style.display = 'block';\n" );
808
+ php_info_print (" document.getElementById('revealcredits').onclick = function () {\n" );
809
+ php_info_print (" document.getElementById('credits').style.display = 'block';\n" );
810
+ php_info_print (" document.getElementById('revealcredits').style.display = 'none';\n" );
811
+ php_info_print (" };\n" );
812
+ php_info_print (" };\n" );
813
+ php_info_print ("}());</script>\n" );
814
+ php_info_print ("<h1><a id=\"revealcredits\" href=\"#credits\" style=\"display: none;\">" );
811
815
php_info_print ("PHP Credits" );
812
816
php_info_print ("</a></h1>\n" );
817
+ php_info_print ("<div id=\"credits\">\n" );
818
+ php_print_credits (PHP_CREDITS_ALL , TSRMLS_C );
819
+ php_info_print ("</div>\n" );
813
820
}
814
821
815
822
zend_ini_sort_entries (TSRMLS_C );
@@ -1191,77 +1198,6 @@ PHP_FUNCTION(phpcredits)
1191
1198
}
1192
1199
/* }}} */
1193
1200
1194
- /* {{{ php_logo_guid
1195
- */
1196
- PHPAPI char * php_logo_guid (void )
1197
- {
1198
- char * logo_guid ;
1199
-
1200
- time_t the_time ;
1201
- struct tm * ta , tmbuf ;
1202
-
1203
- the_time = time (NULL );
1204
- ta = php_localtime_r (& the_time , & tmbuf );
1205
-
1206
- if (ta && (ta -> tm_mon == 3 ) && (ta -> tm_mday == 1 )) {
1207
- logo_guid = PHP_EGG_LOGO_GUID ;
1208
- } else {
1209
- logo_guid = PHP_LOGO_GUID ;
1210
- }
1211
-
1212
- return estrdup (logo_guid );
1213
-
1214
- }
1215
- /* }}} */
1216
-
1217
- /* {{{ proto string php_logo_guid(void)
1218
- Return the special ID used to request the PHP logo in phpinfo screens*/
1219
- PHP_FUNCTION (php_logo_guid )
1220
- {
1221
- if (zend_parse_parameters_none () == FAILURE ) {
1222
- return ;
1223
- }
1224
-
1225
- RETURN_STRING (php_logo_guid (), 0 );
1226
- }
1227
- /* }}} */
1228
-
1229
- /* {{{ proto string php_real_logo_guid(void)
1230
- Return the special ID used to request the PHP logo in phpinfo screens*/
1231
- PHP_FUNCTION (php_real_logo_guid )
1232
- {
1233
- if (zend_parse_parameters_none () == FAILURE ) {
1234
- return ;
1235
- }
1236
-
1237
- RETURN_STRINGL (PHP_LOGO_GUID , sizeof (PHP_LOGO_GUID )- 1 , 1 );
1238
- }
1239
- /* }}} */
1240
-
1241
- /* {{{ proto string php_egg_logo_guid(void)
1242
- Return the special ID used to request the PHP logo in phpinfo screens*/
1243
- PHP_FUNCTION (php_egg_logo_guid )
1244
- {
1245
- if (zend_parse_parameters_none () == FAILURE ) {
1246
- return ;
1247
- }
1248
-
1249
- RETURN_STRINGL (PHP_EGG_LOGO_GUID , sizeof (PHP_EGG_LOGO_GUID )- 1 , 1 );
1250
- }
1251
- /* }}} */
1252
-
1253
- /* {{{ proto string zend_logo_guid(void)
1254
- Return the special ID used to request the Zend logo in phpinfo screens*/
1255
- PHP_FUNCTION (zend_logo_guid )
1256
- {
1257
- if (zend_parse_parameters_none () == FAILURE ) {
1258
- return ;
1259
- }
1260
-
1261
- RETURN_STRINGL (ZEND_LOGO_GUID , sizeof (ZEND_LOGO_GUID )- 1 , 1 );
1262
- }
1263
- /* }}} */
1264
-
1265
1201
/* {{{ proto string php_sapi_name(void)
1266
1202
Return the current SAPI module name */
1267
1203
PHP_FUNCTION (php_sapi_name )
0 commit comments