Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. db_connection();
  2. $act = clean($_GET["act"]);
  3. if (!is_login_admin())
  4. {
  5. header("location: login.php");
  6. }
  7. else
  8. {
  9. if ($act == "edit")
  10. {
  11. if (isset($_POST["save"]))
  12. {
  13. $id = clean($_POST["id"]);
  14. $content = clean($_POST["content"]);
  15. $used = clean($_POST["used"]);
  16. $category = clean($_POST["category"]);
  17. $spliter = clean($_POST["spliter"]);
  18. $numpost = clean($_POST["numpost"]);
  19. $cvvpost = clean($_POST["datepost"]);
  20. $monpost = clean($_POST["verpost"]);
  21. $yeapost = clean($_POST["yeapost"]);
  22. $coupost = clean($_POST["coupost"]);
  23. $statepost = clean($_POST["statepost"]);
  24. $citypost = clean($_POST["citypost"]);
  25. $zippost = clean($_POST["zippost"]);
  26. $status = clean($_POST["status"]);
  27. $price = clean($_POST["price"]);
  28. $price = str_replace(",",".",$price);
  29. $iseller = clean($_POST["seller"]);
  30. $isellerprc = clean($_POST["sellerprc"]);
  31. $isellerprc = str_replace(",",".",$isellerprc);
  32. if ($content != "" && $spliter != "" && $numpost != "" && $monpost != "" && $yeapost != "")
  33. {
  34. $cardField = explode($spliter, $content);
  35. if ($numpost < 1 || ($cvvpost < 1 && $cvvpost != "") || $monpost < 1 || $yeapost < 1 || ($coupost < 1 && $coupost != ""))
  36. {
  37. echo "<center><font color='#ff0000'>Please give correct position</font></center>";
  38. }
  39. else if (count($cardField) >= 4 && count($cardField) >= $numpost && (count($cardField) >= $cvvpost || $cvvpost == "") && count($cardField) >= $monpost && count($cardField) >= $yeapost && (count($cardField) >= $coupost || $coupost == ""))
  40. {
  41. $cardNumber = clean($cardField[$numpost - 1]);
  42. $cardMonth = clean($cardField[$monpost - 1]);
  43. $cardYear = clean($cardField[$yeapost - 1]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement