Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions common/lib/iam_csvdump.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ public function _db_connect($dbname="mysql", $user="root", $password="", $host="

public function _db_connect_mysql($dbname="mysql", $user="root", $password="", $host="localhost")
{
$result = @mysql_pconnect($host, $user, $password);
$result = @mysqli_connect($host, $user, $password);
if (!$result) { // If no connection, return 0

return false;
}

if (!@mysql_select_db($dbname)) { // If db not set, return 0
if (!@mysqli_select_db($result, $dbname)) { // If db not set, return 0

return false;
}
Expand Down Expand Up @@ -272,13 +272,13 @@ public function _generate_csv_mysql($query_string, $dbname="mysql", $user="root"
if(!$conn= $this->_db_connect_mysql($dbname, $user , $password, $host))
die("Error. Cannot connect to Database.");
else {
$result = @mysql_query($query_string, $conn);
$result = @mysqli_query($conn, $query_string);
if(!$result)
die("Could not perform the Query: ".mysql_error());
die("Could not perform the Query: ".mysqli_error($conn));
else {
$file = "";
$crlf = $this->_define_newline();
while ($str= @mysql_fetch_array($result, MYSQL_NUM)) {
while ($str= @mysqli_fetch_array($result, MYSQLI_NUM)) {
$file .= $this->arrayToCsvString($str,",").$crlf;
}
echo $file;
Expand Down Expand Up @@ -366,9 +366,9 @@ public function _generate_xml_mysql($query_string, $dbname="mysql", $user="root"
if (!$conn= $this->_db_connect_mysql($dbname, $user , $password, $host)) {
die("Error. Cannot connect to Database.");
} else {
$result = @mysql_query($query_string, $conn);
$result = @mysqli_query($conn, $query_string);
if (!$result) {
die("Could not perform the Query: ".mysql_error());
die("Could not perform the Query: ".mysqli_error($result));
} else {
$file = "";
$crlf = $this->_define_newline();
Expand All @@ -391,22 +391,22 @@ public function _generate_msqlxml($result=NULL)
// Output header row
$j = 0;
echo "\t<header>\n";
$totalFields = @mysql_num_fields($result);
$totalFields = @mysqli_num_fields($result);
for ($i=0; $i<$totalFields; $i++) {
$name = htmlspecialchars(@mysql_field_name($result, $i));
$type = htmlspecialchars(@mysql_field_type($result, $i));
$name = htmlspecialchars(@mysqli_fetch_field_direct($result, $i)->name);
$type = htmlspecialchars(@mysqli_fetch_field_direct($result, $i)->type);
echo "\t\t<column name=\"{$name}\" type=\"{$type}\" />\n";
}
echo "\t</header>\n";

echo "\t<records>\n";
$totalRows = @mysql_num_rows($result);
while ($row = @mysql_fetch_array($result, MYSQL_NUM)) {
$totalRows = @mysqli_num_rows($result);
while ($row = @mysqli_fetch_array($result, MYSQLI_NUM)) {
$j = 0;
echo "\t\t<row>\n";

for ($l = 0; $l < $totalFields; $l++) {
$name = htmlspecialchars(@mysql_field_name($result, $l));
$name = htmlspecialchars(@mysqli_fetch_field_direct($result, $l)->name);
$v = $row[$l];
if ($v != null) {
$v = htmlspecialchars($v);
Expand Down
2 changes: 1 addition & 1 deletion customer/simulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
if ($FG_DEBUG == 1)
echo "cardnumber = " . $result[0][0] . " - balance=$balance<br>";

if ($A2B->callingcard_ivr_authenticate_light($error_msg)) {
if ($A2B->callingcard_ivr_authenticate_light($error_msg, 0)) {
if ($FG_DEBUG == 1)
$RateEngine->debug_st = 1;

Expand Down