/*
* brisk - admin.php
*
- * Copyright (C) 2006-2011 Matteo Nastasi
+ * Copyright (C) 2011-2012 Matteo Nastasi
* mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
function ImpPoints($s)
{
- // error_log($s, 0);
$arr = explode('|', $s);
- // error_log("TTOK: ".count($arr), 0);
if (count($arr) != 20) {
- error_log("COUNT: ".count($arr));
return FALSE;
}
$cont .= sprintf("Loading failed.<br>\n");
break;
}
- $newdb = new BriskDB();
+
+ if (($newdb = BriskDB::create()) == FALSE) {
+ $cont .= sprintf("Database connection failed.<br>\n");
+ break;
+ }
$newdb->users_load();
if ($newdb->addusers_from_olddb($olddb, $cont) == FALSE) {
$cont .= sprintf("Insert failed.<br>\n");
break;
}
- $newdb = new BriskDB();
+ if (($newdb = BriskDB::create()) == FALSE) {
+ $cont .= sprintf("Database connection failed.<br>\n");
+ break;
+ }
+
$newdb->users_load();
$dbconn = $newdb->getdbconn();
for ($pts_n = 0 ; !feof($fp) ; $pts_n++) {
</body>
-</html>
\ No newline at end of file
+</html>