Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. foreach ($fields as $key => $row)
  2. {
  3.     $tmp = 0;
  4.     if ((int)$row['id_customer'] AND $row['id_customer'] != $customer->id AND $row['email'] != $from)
  5.         continue;
  6.     if ($row['id_order'] != 0 AND Tools::getValue('id_order') != $row['id_order'])
  7.         continue;
  8.     if ($row['email'] == $from)
  9.         $tmp += 4;
  10.     if ($row['id_contact'] == $id_contact)
  11.         $tmp++;
  12.     if (Tools::getValue('id_product') != 0 AND $row['id_product'] ==  Tools::getValue('id_product'))
  13.         $tmp += 2;
  14.     if ($tmp >= 5 AND $tmp >= $score)
  15.     {
  16.         $score = $tmp;
  17.         $id_customer_thread = $row['id_customer_thread'];
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement