* Add sql_use_http_credentials configuration directive to connect to the sql database using the http user
credentials (that way there can be more than one administrator usernames, each with different privileges
on the sql database).
+* Add more error messages when interacting with the SQL database
Ver 1.61:
* Add a string encoder for greek
* If general_decode_normal_attributes is set then encode attributes in lib/ldap/change_info. In the near future
echo "</tr>\n";
}
}
+ else
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
echo <<<EOM
</table>
</td></tr>
EOM;
}
}
+ else
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
+else
+ echo "<b>Could not connect to SQL database</b><br>\n";
echo <<<EOM
</table>
<tr><td>
EOM;
}
}
+ else
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
+else
+ echo "<b>Could not connect to SQL database</b><br>\n";
echo <<<EOM
</table>
<tr><td>
echo "<b>Could not find any groups</b><br>\n";
}
else
- echo "<b>Search failed. SQL Error: " . da_sql_error($link,$config) . "</b><br>\n";
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
echo "<b>Could not connect to SQL database</b><br>\n";
$data[sum][3] += $row["$res[3]"];
$num[3] = ($data[$day][3]) ? $num[3] + 1 : $num[3];
}
+ else
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
}
+else
+ echo "<b>Could not connect to SQL database</b><br>\n";
$num[1] = ($num[1]) ? $num[1] : 1;
$num[2] = ($num[2]) ? $num[2] : 1;
$acct_upload_sum = bytes2str($acct_upload_sum);
$acct_download_sum = bytes2str($acct_download_sum);
}
+ else
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
+else
+ echo "<b>Could not connect to SQL database</b><br>\n";
echo <<<EOM
<tr bgcolor="lightyellow">
<td colspan=3 align="right">Page Total</td>
$avg_output = bytes2str($row['avg(AcctOutputOctets)']);
$tot_conns = $row['COUNT(*)'];
}
+ else
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
$search = @da_sql_query($link,$config,
"SELECT COUNT(*) FROM $config[sql_accounting_table] WHERE UserName = '$login'
AND AcctStopTime >= '$week_str' AND AcctStopTime <= '$now_str'
$row = @da_sql_fetch_array($search,$config);
$tot_badlogins = $row['COUNT(*)'];
}
+ else
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
for($i = 0; $i <=6; $i++){
if ($days[$i] == '')
continue;
$daily_used = "<font color=red>$daily_used</font>";
}
}
+ else
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
if ($weekly_limit != 'none'){
$tmp = $weekly_limit - $weekly_used;
$lastlog_output = 'not available';
}
}
+ else
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
if (! $logged_now){
$search = @da_sql_query($link,$config,
"SELECT * FROM $config[sql_accounting_table]
else
$not_known = 1;
}
+ else
+ echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
}
+else
+ echo "<b>Could not connect to SQL database</b><br>\n";
$monthly_limit = (is_numeric($monthly_limit)) ? time2str($monthly_limit) : $monthly_limit;
$weekly_limit = (is_numeric($weekly_limit)) ? time2str($weekly_limit) : $weekly_limit;
$server_rem[$servers_num] = ($config[$portnum]) ? ($config[$portnum] - $num) : 'unknown';
}
}
+else
+ echo "<b>Could not connect to SQL database</b><br>\n";
?>
<body bgcolor="#80a040" background="images/greenlines1.gif" link="black" alink="black">
}
}
else
- echo "<b>Could not connect to database</b><br>\n";
+ echo "<b>Could not connect to SQL database</b><br>\n";
}
else
- echo "<b>Could not connect to database</b><br>\n";
+ echo "<b>Could not connect to SQL database</b><br>\n";
?>
echo "<b>Could not open encryption library file</b><br>\n";
}
else
- echo "<b>Could not connect to database</b><br>\n";
+ echo "<b>Could not connect to SQL database</b><br>\n";
?>
echo "<b>Group created successfully</b><br>\n";
}
else
- echo "<b>Could not connect to database</b><br>\n";
+ echo "<b>Could not connect to SQL database</b><br>\n";
?>
echo "<b>Could not open encryption library file</b><br>\n";
}
else
- echo "<b>Could not connect to database</b><br>\n";
+ echo "<b>Could not connect to SQL database</b><br>\n";
?>
}
}
else
- echo "<b>Could not connect to database</b><br>\n";
+ echo "<b>Could not connect to SQL database</b><br>\n";
}while($stop == 0);
}
?>
echo "<b>Error deleting group $login from group reply table: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
- echo "<b>Could not connect to database</b><br>\n";
+ echo "<b>Could not connect to SQL database</b><br>\n";
?>
echo "<b>Error deleting user $login from reply table: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
- echo "<b>Could not connect to database</b><br>\n";
+ echo "<b>Could not connect to SQL database</b><br>\n";
?>
}
}
else
- echo "<b>Could not connect to database</b><br>\n";
+ echo "<b>Could not connect to SQL database</b><br>\n";
?>
}
}
else
- echo "<b>Could not connect to database</b><br>\n";
+ echo "<b>Could not connect to SQL database</b><br>\n";
?>
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
- echo "<b>Could not connect to database</b><br>\n";
+ echo "<b>Could not connect to SQL database</b><br>\n";
?>
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
else
- echo "<b>Could not connect to database</b><br>\n";
+ echo "<b>Could not connect to SQL database</b><br>\n";
?>