Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. require_once 'Excel/reader.php';
  5. $excel = new Spreadsheet_Excel_Reader();
  6. $excel->setOutputEncoding('UTF-8');
  7. $excel->read('eset.xls');
  8.  
  9. include_once 'MailMaster.php';
  10.  
  11. $user = "horvathzoltan";
  12. $pass = "2da1cexxxxxxxxxx3d3395b89b7";
  13. $list_id = "47869";
  14. $form_id = "97958";
  15.  
  16. //excel feldolgoz·sa
  17. $x=2;
  18. while($x<=$excel->sheets[0]['numRows']) {
  19. $nev = isset($excel->sheets[0]['cells'][$x][1]) ? $excel->sheets[0]['cells'][$x][1] : '';
  20. $email = isset($excel->sheets[0]['cells'][$x][2]) ? $excel->sheets[0]['cells'][$x][2] : '';
  21. $iranyitoszam = isset($excel->sheets[0]['cells'][$x][3]) ? $excel->sheets[0]['cells'][$x][3] : '';
  22. $varos = isset($excel->sheets[0]['cells'][$x][4]) ? $excel->sheets[0]['cells'][$x][4] : '';
  23. $utca_hsz = isset($excel->sheets[0]['cells'][$x][5]) ? $excel->sheets[0]['cells'][$x][5] : '';
  24. $telefon = isset($excel->sheets[0]['cells'][$x][6]) ? $excel->sheets[0]['cells'][$x][6] : '';
  25. $termek = isset($excel->sheets[0]['cells'][$x][7]) ? $excel->sheets[0]['cells'][$x][7] : '';
  26. $mennyiseg = isset($excel->sheets[0]['cells'][$x][8]) ? $excel->sheets[0]['cells'][$x][8] : '';
  27. $felhasznaloinev = isset($excel->sheets[0]['cells'][$x][9]) ? $excel->sheets[0]['cells'][$x][9] : '';
  28. $jelszo = isset($excel->sheets[0]['cells'][$x][10]) ? $excel->sheets[0]['cells'][$x][10] : '';
  29. $licenckulcs = isset($excel->sheets[0]['cells'][$x][11]) ? $excel->sheets[0]['cells'][$x][11] : '';
  30. $status = isset($excel->sheets[0]['cells'][$x][12]) ? $excel->sheets[0]['cells'][$x][12] : '';
  31. $licenctipusa = isset($excel->sheets[0]['cells'][$x][13]) ? $excel->sheets[0]['cells'][$x][13] : '';
  32. $megbizasos = isset($excel->sheets[0]['cells'][$x][14]) ? $excel->sheets[0]['cells'][$x][14] : '';
  33. $kezdet = isset($excel->sheets[0]['cells'][$x][15]) ? $excel->sheets[0]['cells'][$x][15] : '';
  34. $lejarat = isset($excel->sheets[0]['cells'][$x][16]) ? $excel->sheets[0]['cells'][$x][16] : '';
  35. $rendeles = isset($excel->sheets[0]['cells'][$x][17]) ? $excel->sheets[0]['cells'][$x][17] : '';
  36. $teljesites = isset($excel->sheets[0]['cells'][$x][18]) ? $excel->sheets[0]['cells'][$x][18] : '';
  37. $kedvezmeny = isset($excel->sheets[0]['cells'][$x][19]) ? $excel->sheets[0]['cells'][$x][19] : '';
  38. $vfelhasznar = isset($excel->sheets[0]['cells'][$x][20]) ? $excel->sheets[0]['cells'][$x][20] : '';
  39. $viszontar = isset($excel->sheets[0]['cells'][$x][21]) ? $excel->sheets[0]['cells'][$x][21] : '';
  40.  
  41.  
  42. $SA = new MailMaster($list_id, $form_id, $user, $pass);
  43. if (isset($SA))
  44. $SA->update($email,
  45. array('szamitogepek_szama' => $mennyiseg,
  46. 'trial_kezdet' => $kezdet,
  47. 'trial_vege' => $lejarat,
  48. 'trial_username' => $felhasznaloinev,
  49. 'trial_jelszo' => $jelszo,
  50. 'licenc_azonosito' => $status,
  51. 'trial_licenc_kulcs' => $licenckulcs));
  52.  
  53. $x++;
  54.  
  55. }
  56.  
  57. echo "mindenki boldog";
  58.  
  59. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement