Webbserverprogrammering 1

Källkod

Följande filer och mappar finns under mappen webbserverprogrammering.
Mappar visas till vänster och filer till höger. Klicka på en fil eller mapp för att öppna nedan eller visa dess innehåll.

webbserverprogrammering/projects/quiz-extended/

26 filer

admin.php
confirm_account.php
create_account.php
create_quiz.php
css/
dbconnection.php
highscore.php
index.php
js/
logbook.php
login.php
mysql_create_table_options.php
mysql_create_table_questions.php
mysql_create_table_quizzes.php
mysql_create_table_results.php
mysql_create_table_submits.php
mysql_create_table_users.php
plan.php
planering.txt
profile.php
projektrapport.txt
quizzes.php
resources/
result.php
send_email.php
session_variable_array_check.php

send_email.php

69 lines ASCII Windows (CRLF)
<?php

function sendUserVerificationEmail($regtoken$email$username) {
 
$to $email;
 
$from "verify@curiousquizzes.com";

 
$content "
 <!DOCTYPE html>
 <html lang='sv'>
 <head>
  <meta charset='utf-8'>
  <style type='text/css'>
   #wrap {
    font-family: Arial, sans-serif;
    color: #5f5f5f;
    font-size: 14px;
    text-align: center;
    padding: 3em 0;
    background: #f9f9f9;
    width: 100%;
    max-width: 950px;
   }
   #container {
    display: inline-block;
    border: 22px solid rgb(200, 204, 255);
    padding: 6em 4em 4em 4em;
    background: white;
    text-align: center;
   }
   a {
    margin: 1em;
   }
   p, a {
    font-size: 17px;
   }
   h2 {
    font-size: 25px;
   }
   #legal {
    width: 100%;
    font-size: 7px;
    color: gray;
    margin-top: 10em;
   }

  </style>
 </head>
 <body>
  <div id='wrap'>
   <div id='container'>
    <h2>
$username, welcome to CuriousQuizzes!</h2>
    <p>In order for you to turn your creative quiz ideas into reality, your account needs to be verified.<br>Click on the link below to get going:</p>
    <a href='http://labb.vgy.se/~alrikmz/projekt/quiz-extended/confirm_account.php?tkn=
$regtoken'>Verify your account at CuriousQuizzes</a>
    <p>Thanks for using CuriousQuizzes and keep on quizzing!</p>
    <div id='legal'>You are receiving this email because someone recently attempted to make an account at CuriousQuizzes using this email address. If this was you, verify your account by clicking on the link provided above. If you did not make this attempt please contact God and hope He helps you. CuriousQuizzes Company Ltd. ('the Company') niether confirms nor denies its existance and it is up to each individual to assess the credibility of any and all information or similar thereby received or encountered, signed or otherwise indicated to have been sent, by the Company. The Company is not responsible for any physical injury, psychological trauma or otherwise negative consequences for the individual nor for the society in any capacity related (even remotely so) to use of our product or in connection to it. No payments directed to the Company will be refunded.</div>
   </div>
  </div>
 </body>
 </html>"
;

 
$subject "Welcome to CuriousQuizzes! Verify your account.";
 
$header "MIME-Version: 1.0\r\n";
 
$header .= "Content-type: text/html; charset=utf-8\r\n";
 
$header .= 'From: "CuriousQuizzes" <' $from '>';

 
mail($to$subject$content$header);
}

?>