Advertisement
tormod17

Untitled

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