define('SM_PATH', '../');
/*
- * Load config before output begins. functions/strings.php depends on
+ * Load config before output begins. functions/strings.php depends on
* functions/globals.php. functions/global.php needs to be run before
- * any html output starts. If config.php is missing, error will be displayed
+ * any html output starts. If config.php is missing, error will be displayed
* later.
*/
if (file_exists(SM_PATH . 'config/config.php')) {
echo "<p><table>\n<tr><td>SquirrelMail version:</td><td><b>" . $version . "</b></td></tr>\n" .
'<tr><td>Config file version:</td><td><b>' . $config_version . "</b></td></tr>\n" .
- '<tr><td>Config file last modified:</td><td><b>' .
+ '<tr><td>Config file last modified:</td><td><b>' .
date ('d F Y H:i:s', filemtime(SM_PATH . 'config/config.php')) .
"</b></td></tr>\n</table>\n</p>\n\n";
if(!file_exists($data_dir)) {
do_err("Data dir ($data_dir) does not exist!");
-}
+}
if(!is_dir($data_dir)) {
do_err("Data dir ($data_dir) is not a directory!");
-}
+}
if(!is_readable($data_dir)) {
do_err("I cannot read from data dir ($data_dir)!");
-}
+}
if(!is_writable($data_dir)) {
do_err("I cannot write to data dir ($data_dir)!");
}
} else {
if(!file_exists($attachment_dir)) {
do_err("Attachment dir ($attachment_dir) does not exist!");
- }
+ }
if (!is_dir($attachment_dir)) {
do_err("Attachment dir ($attachment_dir) is not a directory!");
- }
+ }
if (!is_writable($attachment_dir)) {
do_err("I cannot write to attachment dir ($attachment_dir)!");
}
// is_executable also checks for existance, but we want to be as precise as possible with the errors
if(!file_exists($sendmail_path)) {
do_err("Location of sendmail program incorrect ($sendmail_path)!");
- }
+ }
if(!is_executable($sendmail_path)) {
do_err("I cannot execute the sendmail program ($sendmail_path)!");
}
if (class_exists('DB')) {
echo "$IND PHP Pear DB support is present.<br />\n";
$db_functions=array(
- 'dbase' => 'dbase_open',
- 'fbsql' => 'fbsql_connect',
- 'interbase' => 'ibase_connect',
+ 'dbase' => 'dbase_open',
+ 'fbsql' => 'fbsql_connect',
+ 'interbase' => 'ibase_connect',
'informix' => 'ifx_connect',
'msql' => 'msql_connect',
'mssql' => 'mssql_connect',
if ( $linkid ) {
echo "$IND LDAP connect to ".$param['host']." successful: ".$linkid."<br />\n";
-
+
if ( !empty($param['protocol']) &&
!ldap_set_option($linkid, LDAP_OPT_PROTOCOL_VERSION, $param['protocol']) ) {
do_err('Unable to set LDAP protocol');
- }
+ }
if ( empty($param['binddn']) ) {
- $bind = ldap_bind($linkid);
+ $bind = ldap_bind($linkid);
} else {
$bind = ldap_bind($param['binddn'], $param['bindpw']);
}
} else {
do_err('Unable to Bind to LDAP Server');
}
-
+
ldap_close($linkid);
} else {
do_err('Connection to LDAP failed');
</html>
<?php
// vim: et ts=4
-?>
+?>
\ No newline at end of file