Guest User

gfrgr

a guest
Feb 16th, 2018
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. <table class="tbl-qa" border="1">
  2. <thead>
  3. <tr>
  4. <th class="table-header">ID
  5. </th>
  6. <th class="table-header">ORDERID
  7. </th>
  8. <th class="table-header">Status
  9. </th>
  10. </tr>
  11. </thead>
  12. <tbody id="table-body">
  13. <?php
  14. $tabindex=1;
  15. if(!empty($orderrecords))
  16. {
  17. foreach($orderrecords as $k=>$v)
  18. {
  19. $data['username']='outthinking781346';
  20. $data['password']='ouhk78epe34csmed46d';
  21. $data['awb']='890927143';
  22. $url = 'https://plapi.ecomexpress.in/track_me/api/mawbd/?awb=awbnumber&order='.$orderrecords[$k]["order_id"].'&username=outthinking781346&password=ouhk78epe34csmed46d';
  23. $ch = curl_init(); // initiate curl
  24. curl_setopt($ch, CURLOPT_URL,$url);
  25. curl_setopt($ch, CURLOPT_POST, true); // tell curl you want to post something
  26. curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // define what you want to post
  27. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // return the output in string format
  28. $output = curl_exec ($ch); // execute
  29. curl_close($ch);
  30. $res = explode("\n",$output);
  31. echo $res[13];
  32. if($orderrecords[$k]["order_id"][$res[13]] !== "Undelivered") // BE SURE TO GET YOUR STATUS VALUE HERE + check if you need to use U or u, etc.
  33. { ?>
  34. <tr class="table-row" id="table-row-<?php echo $orderrecords[$k]["id"]; ?>" tabindex="<?php echo $tabindex;?>">
  35. <td>
  36. <input type="checkbox" onclick="assignorderids('<?php echo $orderrecords[$k]["order_id"]; ?>')" name="assigneeid" id="assigneeid-<?php echo $orderrecords[$k]["order_id"]; ?>" value="<?php echo $orderrecords[$k]["order_id"]; ?>">
  37. </td>
  38. <td>
  39. <?php echo $orderrecords[$k]["order_id"]; ?>
  40. </td>
  41. <td>
  42. <?php echo $res[13]; ?>
  43. </td>
  44. <?php }
  45. ?>
  46. <!-- my code end-->
  47. </tr>
  48. <?php
  49. $tabindex++;
  50. }
  51. }?>
  52. </tbody>
  53. </table>
Add Comment
Please, Sign In to add comment