Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. function colorSelect(param)
  2. {
  3. x = param.id.replace(/[a-z]/ig, '');
  4. rezult = $("#colorPred" + x + " option:selected").text();
  5.  
  6. rez = ($("#colorPred" + x)[0].selectedIndex);
  7. color = '';
  8.  
  9. switch(rez)
  10. {
  11. case 1:
  12. color = '#ffbebe';
  13. break;
  14.  
  15. case 2:
  16. color = '#95e28b';
  17. break;
  18.  
  19. case 3:
  20. color = '#ffffff';
  21. break;
  22.  
  23. case 4:
  24. color = '#fbe198';
  25. break;
  26.  
  27. }
  28.  
  29. colorTable(x, color);
  30.  
  31. return false;
  32. }
  33.  
  34. function reId(id)
  35. {
  36. if(id == '' || id == null) return '';
  37. x = id.replace(/[a-z]/ig, '');
  38. return x;
  39. }
  40.  
  41. function editSelectColor($id, $color)
  42. {
  43. mysql_query("UPDATE `crm_agreement` SET `colorPred` = '".$color."' WHERE id = '".$id."'");
  44. echo "UPDATE `crm_agreement` SET `colorPred` = '".$color."' WHERE id = '".$id."'";
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement