Advertisement
tormod17

Untitled

Apr 22nd, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 12.96 KB | None | 0 0
  1. <?php  session_start();
  2.  
  3.   ob_start();
  4.  
  5.   error_reporting(E_ALL ^ E_NOTICE);
  6.  
  7.  
  8. ?>
  9.  
  10.  
  11.  
  12. <!DOCTYPE html>
  13.  
  14. <html lang="en">
  15.  
  16. <!-- Facebook Pixel Code -->
  17. <script>
  18. !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  19. n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
  20. n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
  21. t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
  22. document,'script','https://connect.facebook.net/en_US/fbevents.js');
  23. fbq('init', '258407727903820'); // Insert your pixel ID here.
  24. fbq('track', 'PageView');
  25. </script>
  26. <noscript><img height="1" width="1" style="display:none"
  27. src="https://www.facebook.com/tr?id=258407727903820&ev=PageView&noscript=1"
  28. /></noscript>
  29. <!-- DO NOT MODIFY -->
  30. <!-- End Facebook Pixel Code -->
  31.  
  32.  
  33.  
  34.  
  35.   <head>
  36.  
  37.     <meta charset="utf-8">
  38.  
  39.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  40.  
  41.     <meta name="viewport" content="width=device-width, initial-scale=1">
  42.  
  43.     <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
  44.  
  45.     <meta name="description" content="">
  46.  
  47.     <meta name="author" content="">
  48.  
  49.     <link rel="icon" href="../../favicon.ico">
  50.  
  51.  
  52.  
  53.     <title>Pinpoint Learning</title>
  54.  
  55.    
  56.  
  57. <!-- Bootstrap Core CSS -->
  58.     <link href="https://www.pinpointlearning.co.uk/css/bootstrap.min.css" rel="stylesheet">
  59.     <!-- Custom CSS -->
  60.     <link href="https://www.pinpointlearning.co.uk/css/agency.css" rel="stylesheet">
  61.     <link href="stylenew.css" rel="stylesheet">
  62.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
  63.  
  64.  
  65.  
  66.  
  67.  
  68. <!-- _ _ _ _ _ _ _ _ HTTPS _ _ _ _ _ _ _ _   -->
  69.  
  70. <!-- HTTPS Latest compiled and minified CSS -->
  71. <!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
  72.  
  73. Optional theme
  74. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> -->
  75.  
  76. <!-- Latest compiled and minified JavaScript -->
  77. <!-- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> -->
  78.  
  79.  
  80. <!-- _ _ _ _ _ _ _ _ END OF HTTPS _ _ _ _ _ _ _ _   -->
  81.  
  82.     <!-- <link href="../../dist/css/bootstrap.min.css" rel="stylesheet">
  83.  
  84.  
  85.  
  86.     <!-- Custom styles for this template -->
  87.  
  88.     <link href="theme.css" rel="stylesheet">
  89.  
  90.  
  91.  
  92.     <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
  93.  
  94.     <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
  95.  
  96.     <!-- Tormod -->
  97.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.0.0/css/bootstrap-slider.min.css" />
  98.  
  99.  <!--    <script src="../../assets/js/ie-emulation-modes-warning.js"></script> -->
  100.  
  101.  
  102.  
  103.     <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  104.  
  105.     <!--[if lt IE 9]>
  106.  
  107.       <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  108.  
  109.       <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  110.  
  111.     <![endif]-->
  112.  
  113. </head>
  114.  
  115.  
  116.  
  117.   <body role="document">
  118.  
  119.  
  120.  
  121.     <!-- Fixed navbar -->
  122.  
  123.        <nav class="navbar navbar-inverse navbar-fixed-top">
  124.  
  125.       <div class="container">
  126.  
  127.         <div class="navbar-header">
  128.  
  129.           <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  130.  
  131.             <span class="sr-only">Toggle navigation</span>
  132.  
  133.             <span class="icon-bar"></span>
  134.  
  135.             <span class="icon-bar"></span>
  136.  
  137.             <span class="icon-bar"></span>
  138.  
  139.           </button>
  140.  
  141.  </div>
  142.  
  143.         <div id="navbar" class="navbar-collapse collapse">
  144.  
  145.           <ul class="nav navbar-nav">
  146.  
  147.  
  148.                   <li><a href="index.php">Home</a></li>  
  149.                  
  150.                   <li><a href="contact.php">Contact</a></li>
  151.                  
  152.           </ul>
  153.  
  154.         </div><!--/.nav-collapse -->
  155.  
  156.       </div>
  157.  
  158.     </nav>
  159.    
  160.      <!-- This is what you need -->
  161.   <script src="dist/sweetalert-dev.js"></script>
  162.   <link rel="stylesheet" href="dist/sweetalert.css">
  163.   <!--.......................-->
  164.  
  165.   <?php
  166.   If (!isset($_POST["submit"])) {
  167.    ?>
  168.  
  169. <!--   <script> $(document).ready(function () {
  170.     swal("Sign up your school. Choose a login and password for your whole department to use.")
  171. }); </script>  
  172.  -->
  173. <?php
  174.  
  175. }
  176.  
  177. ?>
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184. <?php
  185.  
  186.  $servername="localhost";
  187.  $username="roots";
  188.  $password="1cheese";
  189.  $db="Students";
  190.  
  191. // Create connection
  192.  $conn = new mysqli($servername, $username, $password,$db);
  193.  echo "";
  194. // Check connection
  195. if ($conn->connect_error) {
  196.      die("Connection failed: " . $conn->connect_error);
  197.      }
  198.  
  199. $cfg['Servers'][$i]['password'] = '1cheese';
  200.  
  201.  
  202.  
  203.  
  204.     if (isset($_POST["submit"])) {
  205.         $school = $_REQUEST['dropdown'];
  206.         //$name = $_POST['name'];
  207.         //$email = $_POST['email'];
  208.         //$_SESSION['temail'] = $email;
  209.         //$password = $_POST['password'];
  210.         //$username = $_POST['username'];
  211.         $_SESSION['Teachername'] = $username;
  212.         //$human = intval($_POST['human']);
  213.         $from = '';
  214.         $to = $_POST['email'];
  215.         $subject = 'Welcome to Pinpoint Learning';
  216.        
  217.        
  218.         $_SESSION['Test_Number'] = mysqli_real_escape_string($conn, $_POST['name']);
  219.        
  220.         echo 'Test_Number = ' . $_SESSION['Test_Number'] . '<br>';
  221.        
  222.         $_SESSION['Lower_Percent_Bounder'] = str_replace("'","",$_POST['username']);
  223.        
  224.         echo 'Lower_Percent_Bound = ' . $_SESSION['Lower_Percent_Bounder'] . '<br>';
  225.          
  226.         $_SESSION['Upper_Percent_Bounder'] = mysqli_real_escape_string($conn, $_POST['password']);
  227.          
  228.         echo 'Upper_Percent_Bound = ' . $_SESSION['Upper_Percent_Bounder'] . '<br>';
  229.                
  230.         echo 'points = ' . $_POST['points'] . '<br>';  
  231.            
  232.         echo 'strand = ' . $_POST['AO_Strand'] . '<br>';    
  233.          
  234.                  // header("location: http://www.pinpointlearning.co.uk/tmgg.php");    
  235.            
  236.         // header("location: http://www.pinpointlearning.co.uk/aauto_class_packs.php");
  237.            
  238.        
  239.            
  240.            
  241.  
  242.  
  243. // If there are no errors, insert data and send the email
  244. if (!$errusername && !$errEmail && !$errHuman && !$errschool && !$errpassword && !$errtandc && !$errboard && !$errHear) {
  245.    
  246. // IFFFFFF EVERYTHING IS OK
  247.    
  248.     }
  249.     }
  250.    
  251.  
  252.     ;
  253.  
  254. // Now go to uploading the class gap page
  255.  
  256.    
  257.    
  258.    
  259. ?>
  260.  
  261. <!DOCTYPE html>
  262. <html lang="en">
  263.   <head>
  264.     <meta charset="utf-8">
  265.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  266.     <meta name="viewport" content="width=device-width, initial-scale=1">
  267.     <meta name="description" content="Bootstrap contact form with PHP example by BootstrapBay.com.">
  268.     <meta name="author" content="BootstrapBay.com">
  269.     <title>Student Sign Up</title>
  270.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
  271.   </head>
  272.   <body>
  273.     <div class="container">
  274.         <div class="row">
  275.             <div class="col-md-6 col-md-offset-3">
  276.                 <h1 class="page-header text-center">AI Pinpoint Packs</h1>
  277.                
  278.         <form class="form-horizontal" role="form" method="post" action="AI_Selector_Tormod.php">
  279.                     <div class="form-group">
  280.                         <label for="name" class="col-sm-2 control-label">Paper Depth</label>
  281.                         <div class="col-sm-10">
  282.                             <input type="text" class="form-control" id="name" name="name" placeholder="First & Last Name" value="<?php echo htmlspecialchars($_POST['name']); ?>">
  283.                             <?php echo "<p class='text-danger'>$errName</p>";?>
  284.                         </div>
  285.                     </div>
  286.                    
  287.                                        
  288.                   <br><br><br>
  289.       <!-- Tormod -->
  290.  
  291.           <div class="form-group">
  292.             <label for="password" class="col-sm-2 control-label">Lower %</label>
  293.             <div class="col-sm-10">
  294.               <input onInput="showRangeValueOne()" type="range" min="0" max="100" id="points" name="points"
  295.                      value="<?php echo htmlspecialchars($_POST['points']); ?>">
  296.               <?php echo "<p class='text-danger'>$errusername</p>";?>
  297.               <div class="rangeDisplayOne container"></div>
  298.             </div>
  299.           </div>  
  300.  
  301.             <div class="form-group">
  302.                         <label for="password" class="col-sm-2 control-label">Lower %</label>
  303.                         <div class="col-sm-10">
  304.                      Filter by price interval: <b>0</b>
  305.               <input onChange="showRangeValueTwo()" id="ex2" type="text" class="span2"
  306.                 value=""
  307.                 name="pointrange"
  308.                 data-slider-min="0"
  309.                 data-slider-max="100"      
  310.                 data-slider-step="5"
  311.                 data-slider-value="[25,45]"/> <b>100</b>
  312.               <div class="rangeDisplayTwo container"></div>
  313.                         </div>
  314.                     </div>    
  315.    
  316.  
  317.                    
  318.                     <div class="form-group">
  319.                         <label for="password" class="col-sm-2 control-label">Lower %</label>
  320.                         <div class="col-sm-10">
  321.                             <input type="text" class="form-control" id="username" name="username" placeholder="MyAcademy123" value="<?php echo htmlspecialchars($_POST['username']); ?>">
  322.                             <?php echo "<p class='text-danger'>$errusername</p>";?>
  323.                         </div>
  324.                     </div>  
  325.                    
  326.                     <div class="form-group">
  327.                         <label for="password" class="col-sm-2 control-label">Upper %</label>
  328.                         <div class="col-sm-10">
  329.                             <input type="text" class="form-control" id="password" name="password" placeholder="MXYZQ1RT" value="<?php echo htmlspecialchars($_POST['password']); ?>">
  330.                             <?php echo "<p class='text-danger'>$errpassword</p>";?>
  331.                         </div>
  332.                     </div>  
  333.            
  334.                                 <div class="form-group">
  335.                         <label for="AO_Strand" class="col-sm-2 control-label">AO Strand</label>
  336.                         <div class="col-sm-10">
  337.                             <input type="text" class="form-control" id="AO_Strand" name="AO_Strand" placeholder="AO Strand 1, 2, or 3" value="<?php echo htmlspecialchars($_POST['AO_Strand']); ?>">
  338.                             <?php echo "<p class='text-danger'>$errpassword</p>";?>
  339.                         </div>
  340.                     </div>  
  341.            
  342.            
  343.  
  344.                     <br>  
  345.                     <div class="form-group">
  346.                         <div class="col-sm-10 col-sm-offset-4">
  347.                             <input id="submit" name="submit" type="submit" value="submit" class="btn btn-primary">
  348.                         </div>
  349.                     </div>
  350.                     <div class="form-group">
  351.                         <div class="col-sm-10 col-sm-offset-2">
  352.                             <?php
  353.                             if(isset($result)){
  354.                                
  355.                                 echo $result;  
  356.                                 echo "<br>";
  357.                                 echo $res; 
  358.                                
  359.                                 } else
  360.                                 {
  361.                                 }
  362.                             ?> 
  363.                         </div>
  364.                     </div>
  365.                 </form>
  366.             </div>
  367.         </div>
  368.     </div>      
  369.  
  370.     <?php   ?>
  371.  
  372.  
  373.     <!-- Bootstrap core JavaScript
  374.     ================================================== -->
  375.     <!-- Placed at the end of the document so the pages load faster -->
  376.     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
  377.     <script src="bootstrap-3.3.4/docs/dist/js/bootstrap.min.js"></script>
  378.     <script src="bootstrap-3.3.4/docs/assets/js/docs.min.js"></script>
  379.     <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
  380.     <script src="bootstrap-3.3.4/docs/assets/js/ie10-viewport-bug-workaround.js"></script>
  381.    
  382.      <!-- Tormod -->
  383.     <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/10.0.0/bootstrap-slider.min.js"></script>
  384.  
  385.    
  386.    
  387.     <!-- Twitter universal website tag code -->
  388. <script>
  389. !function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);
  390. },s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='//static.ads-twitter.com/uwt.js',
  391. a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');
  392. // Insert Twitter Pixel ID and Standard Event data below
  393. twq('init','nwc8u');
  394. twq('track','PageView');
  395.  
  396.  
  397.  
  398.  
  399. function getoutput(v){
  400.   var text;
  401.   switch(true){
  402.     case v <= 50:
  403.       text = 'apple';
  404.       break;
  405.     case v > 50 && v < 70:
  406.       text = 'pears';
  407.       break;
  408.     case v > 70:
  409.       text = 'pineapples';
  410.       break;
  411.  
  412.     default:
  413.       text = 'oranges';
  414.   }
  415.   return 'points:- ' + v + ' ' + text;
  416. }
  417.  
  418. function showRangeValueOne(){
  419.   var v = $('input[name="points"]').val();
  420.   var output = getoutput(v);
  421.   $('.rangeDisplayOne').html(output);
  422. }
  423.  
  424. showRangeValueOne();
  425.  
  426. function showRangeValueTwo(){
  427.   $("#ex2").slider({});
  428.   var vals  = $('#ex2').val().split(',');
  429.   var outputOne = getoutput(Number(vals[0]));
  430.   var outputTwo = getoutput(Number(vals[1]));
  431.   $('.rangeDisplayTwo').html(outputOne +' '+ outputTwo);
  432. }
  433.  
  434. showRangeValueTwo();
  435.  
  436. </script>
  437. <!-- End Twitter universal website tag code -->
  438.    
  439.    
  440.   </body>
  441. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement