SHARE
TWEET

Untitled

a guest Oct 13th, 2015 116 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(isset($_POST['val']))
  2. {
  3. //$val=$_POST['val'];
  4. $val = str_replace(',', '.', $_POST['val']);
  5. if(!preg_match('/^[0-9.]/',$val))
  6. {
  7.  echo '<div class="container alert alert-danger keskel" role="alert">'.$keel['kontroll_nr'].'</div>';
  8. }
  9. $from=$_POST['from'];
  10. if($from==0)
  11. {
  12. echo '<div class="container alert alert-danger keskel" role="alert">'.$keel['kontroll_valik'].'</div>';
  13. }
  14. else
  15. {
  16. function assign($from,$val)
  17. {
  18. switch ($from)
  19. {
  20. case 1:
  21. $tulemus=$keel['cm'];$cm=1;$me=0.01;$km=0.00001;$ft=0.3280839;$in=0.39370078;$mi=0.000006213;$ya=0.010936132;break;
  22. case 2:
  23. $tulemus="Meeter";$cm=100;$me=1;$km=0.001;$ft=3.280839;$in=39.370078;$mi=0.00062137;$ya=1.0936132;break;
  24. case 3:
  25. $tulemus="Kilomeeter";$cm=100000;$me=1000;$km=1;$ft=3280.839;$in=39370.078;$mi=0.6213;$ya=1093.6132;break;
  26. case 4:
  27. $tulemus="Jalga";$cm=30.48;$me=0.3048;$km=0.0003048;$ft=1;$in=12;$mi=0.00018939;$ya=0.33333;break;
  28. case 5:
  29. $tulemus="Tolli";$cm=2.54;$me=0.0254;$km=0.0000254;$ft=0.083333;$in=1;$mi=0.0000157828;$ya=0.027778;break;
  30. case 6:
  31. $tulemus="Miili";$cm=160934.4;$me=1609.344;$km=1.609344;$ft=5280;$in=63360;$mi=1;$ya=1760;break;
  32. case 7:
  33. $tulemus="Jardi";$cm=91.44;$me=0.9144;$km=0.0009144;$ft=3;$in=36;$mi=0.000568181;$ya=1;break;
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top