[smoothoperator] r4180 committed - Convert for commandline

0 views
Skip to first unread message

smootho...@googlecode.com

unread,
Apr 10, 2013, 2:53:00 PM4/10/13
to smootho...@googlegroups.com
Revision: 4180
Author: ma...@venturevoip.com
Date: Wed Apr 10 11:52:50 2013
Log: Convert for commandline
http://code.google.com/p/smoothoperator/source/detail?r=4180

Modified:
/SmoothOperatorCRM/add_hung_up.php

=======================================
--- /SmoothOperatorCRM/add_hung_up.php Wed Apr 10 11:51:32 2013
+++ /SmoothOperatorCRM/add_hung_up.php Wed Apr 10 11:52:50 2013
@@ -14,7 +14,6 @@

$string_to_match = "hung up";
$result = mysqli_query($connection,"SELECT * FROM job_dispositions order
by job_id");
-echo "<pre>";
$job_id = 0;
$best_match_number = 0;
$best_match = "";
@@ -23,7 +22,7 @@
//print_r($row);
if ($row['job_id'] != $job_id) {
if ($job_id != 0) {
- echo "<h3>Best Match for ID: $job_id is $best_match
($best_match_id) with a match of $best_match_number</h3><br />";
+ echo "<h3>Best Match for ID: $job_id is $best_match
($best_match_id) with a match of $best_match_number</h3>\n";
$hung_up[$job_id] = $best_match_id;
}
$job_id = $row['job_id'];
@@ -37,9 +36,9 @@
$best_match = $row['text'];
$best_match_id = $row['id'];
}
- echo "<b>".$row['text']."</b> ".$p."<br />";
+ echo "<b>".$row['text']."</b> ".$p."\n";
}
-echo "<h3>Best Match for ID: $job_id is $best_match ($best_match_id) with
a match of $best_match_number</h3><br />";
+echo "<h3>Best Match for ID: $job_id is $best_match ($best_match_id) with
a match of $best_match_number</h3>\n";
$hung_up[$job_id] = $best_match_id;

// Now we have the matches (or closest) so we can start finding records
@@ -50,7 +49,7 @@
$phonenumber = $split[0];
$job = $split[1]-100000;
$uniqueid = $row['uniqueid'];
- echo "Job: $job Phone Number: $phonenumber UniqueID: $uniqueid<br />";
+ echo "Job: $job Phone Number: $phonenumber UniqueID: $uniqueid\n";
$jobs[$phonenumber] = $job;
$sql = "select id from customers where cleaned_number
= ".$phonenumber." order by last_updated desc limit 1";
$result_customer = mysqli_query($connection, $sql) or die
(mysqli_error($connection));
@@ -63,8 +62,8 @@
if ($count == 0) {
$sql = "INSERT INTO `customer_dispositions` (`customer_id`,
`contact_date_time`, `disposition`, `user_id`, `extension`, `job_id`)
VALUES
(".$row_customer['id'].", '".$row['calldate']."', ".$hung_up[$jobs[$phonenumber]].",
0, 0, ".$job.")";
$sql2 = "UPDATE cdr set userfield2 = 'adjusted' WHERE uniqueid
= '".$uniqueid."'";
- echo $sql."<br />";
- echo $sql2."<br />";
+ echo $sql."\n";
+ echo $sql2."\n";
mysqli_query($connection, $sql);
mysqli_query($connection, $sql2);
//exit(0);
Reply all
Reply to author
Forward
0 new messages