Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
1,185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.52 KB | None | 0 0
  1. if ($_POST<'cmd'> == 'add_bike') {
  2.  
  3. if ((!isset($_POST<'password1'>) || strlen($_POST<'password1'>) < 5) && $error == 0) { xmlerror(423); $error = 423; }
  4. if ((!isset($_POST<'password2'>) || strlen($_POST<'password2'>) < 5) && $error == 0) { xmlerror(423); $error = 423; }
  5. if (($_POST<'password1'> != $_POST<'password2'>) && $error == 0) { xmlerror(424); $error = 424; }
  6.  
  7. if ((!isset($_POST<'owner_name'>) || strlen($_POST<'owner_name'>) < 5) && $error == 0) { xmlerror(402); $error = 402; }
  8. if ((!isset($_POST<'owner_email'>) || strlen($_POST<'owner_email'>) < 5 || substr_count($_POST<'owner_email'>, '.') == 0 || substr_count($_POST<'owner_email'>, '@') == 0) && $error == 0) { xmlerror(403); $error = 403; }
  9.  
  10. // if ((!isset($_POST<'owner_phone1'>) || strlen($_POST<'owner_phone1'>) > 3 || strlen($_POST<'owner_phone1'>) < 1 || !is_numeric($_POST<'owner_phone1'>)) && $error == 0) { xmlerror(404); $error = 404; }
  11. // if ((!isset($_POST<'owner_phone2'>) || strlen($_POST<'owner_phone2'>) > 4 || strlen($_POST<'owner_phone2'>) < 1 || !is_numeric($_POST<'owner_phone1'>)) && $error == 0) { xmlerror(404); $error = 404; }
  12. // if ((!isset($_POST<'owner_phone3'>) || strlen($_POST<'owner_phone3'>) > 7 || strlen($_POST<'owner_phone3'>) < 6 || !is_numeric($_POST<'owner_phone3'>)) && $error == 0) { xmlerror(404); $error = 404; }
  13.  
  14. if ((!isset($_POST<'name'>) || strlen($_POST<'name'>) < 3) && $error == 0) { xmlerror(405); $error = 405; }
  15. if ((!isset($_POST<'color'>) || strlen($_POST<'color'>) < 3) && $error == 0) { xmlerror(406); $error = 406; }
  16. if ((!isset($_POST<'year'>) || !is_numeric($_POST<'year'>) || $_POST<'year'> > 2050) && $error == 0) { xmlerror(407); $error = 407; }
  17. if ((!isset($_POST<'value'>) || !is_numeric($_POST<'value'>) || $_POST<'value'> < 0 || $_POST<'value'> > 5) && $error == 0) { xmlerror(408); $error = 408; }
  18. if ((!isset($_POST<'reward'>) || !is_numeric($_POST<'reward'>) || $_POST<'reward'> < 0) && $error == 0) { xmlerror(408); $error = 408; }
  19.  
  20. if ((!isset($_POST<'crime_year'>) || !is_numeric($_POST<'crime_year'>) || strlen($_POST<'crime_year'>) != 4) && $error == 0) { xmlerror(409); $error = 409; }
  21. if ((!isset($_POST<'crime_month'>) || !is_numeric($_POST<'crime_month'>) || strlen($_POST<'crime_month'>) > 2 || $_POST<'crime_month'> < 1 || $_POST<'crime_month'> > 12) && $error == 0) { xmlerror(409); $error = 409; }
  22. if (strlen($_POST<'crime_month'>) == 1) { $_POST<'crime_month'> = '0'.$_POST<'crime_month'>; }
  23. if (strlen($_POST<'crime_day'>) == 1) { $_POST<'crime_day'> = '0'.$_POST<'crime_day'>; }
  24.  
  25. if ((!isset($_POST<'crime'>) || !is_numeric($_POST<'crime'>) || $_POST<'crime'> < 0 || $_POST<'crime'> > 3) && $error == 0) { xmlerror(410); $error = 410; }
  26. if ((!isset($_POST<'crime_description'>) || $_POST<'crime_description'> == '' || strlen($_POST<'crime_description'>) < 6) && $error == 0) { xmlerror(411); $error = 411; }
  27. if ((!isset($_POST<'lock'>) || !is_numeric($_POST<'lock'>) || $_POST<'lock'> < 0 || $_POST<'lock'> > 7) && $error == 0) { xmlerror(412); $error = 412; }
  28. if ((!isset($_POST<'camera'>) || !is_numeric($_POST<'camera'>) || $_POST<'camera'> < 0 || $_POST<'camera'> > 2) && $error == 0) { xmlerror(413); $error = 413; }
  29.  
  30. if ((!isset($_POST<'lat'>) || !is_numeric($_POST<'lat'>) || $_POST<'lat'> < -90 || $_POST<'lat'> > 90) && $error == 0) { xmlerror(415); $error = 415; }
  31. if ((!isset($_POST<'lng'>) || !is_numeric($_POST<'lng'>) || $_POST<'lng'> < -180 || $_POST<'lng'> > 180) && $error == 0) { xmlerror(416); $error = 416; }
  32. if ($_POST<'lat'> == 0 && $_POST<'lon'> == 0 && $error == 0) { xmlerror(417); $error = 417; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement