Guest User

Untitled

a guest
Mar 25th, 2015
73
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $outletLight = $_POST['outletId'];
  3. $outletStatus = $_POST['outletStatus'];
  4. if ($outletLight == "1" && $outletStatus == "on") {
  5. $rfCode = 1070387;
  6. } else if ($outletLight == "1" && $outletStatus == "off") {
  7. $rfCode = 1070396;
  8. } else if ($outletLight == "2" && $outletStatus == "on") {
  9. $rfCode = 1070531;
  10. } else if ($outletLight == "2" && $outletStatus == "off") {
  11. $rfCode = 1070540;
  12. } else if ($outletLight == "3" && $outletStatus == "on") {
  13. $rfCode = 1070851;
  14. } else if ($outletLight == "3" && $outletStatus == "off") {
  15. $rfCode = 1070860;
  16. } else if ($outletLight == "4" && $outletStatus == "on") {
  17. $rfCode = 1072387;
  18. } else if ($outletLight == "4" && $outletStatus == "off") {
  19. $rfCode = 1072396;
  20. } else if ($outletLight == "5" && $outletStatus == "on") {
  21. $rfCode = 1078531;
  22. } else if ($outletLight == "5" && $outletStatus == "off") {
  23. $rfCode = 1078540;
  24. } else if ($outletLight == "6" && $outletStatus == "on") {
  25. $rfcode = 1070387;
  26. sleep(3);
  27. $rfCode = 1070531;
  28. sleep(3);
  29. $rfCode = 1070851;
  30. sleep(3);
  31. $rfCode = 1072387;
  32. sleep(3);
  33. $rfCode = 1078531;
  34. } else if ($outletLight == "6" && $outletStatus == "off") {
  35. $rfcode = 1070396;
  36. sleep(3);
  37. $rfCode = 1070540;
  38. sleep(3);
  39. $rfCode = 1070860;
  40. sleep(3);
  41. $rfCode = 1072396;
  42. sleep(3);
  43. $rfCode = 1078540;
  44. }
  45.  
  46.  
  47. $rfPath = '/var/www/rfoutlet/codesend ' . $rfCode;
  48. shell_exec($rfPath);
  49. echo json_encode(['success' => true, 'rfPath' => $rfPath]);
  50. ?>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×