Webbserverprogrammering 1

Show sourcecode

The following files exists in this folder. Click to view.

webbutv3/

exercices/
exercises.php
header.php
incl/
index.php
ovningar/
project
projects.php
projekt/
reflections.php
source.php
stresstest.php
style.css
test
test.py
upgifter/
viewsource.php
word-app/

exercises.php

119 lines UTF-8 Windows (CRLF)
<?php

include("incl/config.php");

$title "Övningar - Alriks sida (wsprog 1)";
$pageId "exercises";
$pageStyle ''// page unique styles

include("incl/header.php");
?>

<?php

function newExerciseTheme($name) {
 
?>
 <div class="exercise-theme">
  <h3><span class="arrow-right"></span><?= $name ?></h3>
  <div class="exercise-subs">
 <?php
}

function 
endExerciseTheme() {
 
?>
  </div>
 </div>
 <?php
}

function 
exerciseGroup($pathPart1$pathPart2$from$to$displayName) {
 for (
$i $from$i <= $to$i++) {
  echo 
"<a class='sub-link' target='_blank' href='exercises/{$pathPart1}{$i}{$pathPart2}'>{$displayName} {$i}</a>";
 } 
}

function 
exerciseSingle($path$displayName) {
 echo 
"<a class='sub-link' target='_blank' href='exercises/{$path}'>{$displayName}</a>";
}

?>


<!-- main content  -->
<main>
 <article>
     <h1>Övningar</h1>

     <p>Detta är en samlingssida för mina övningar i de olika kursmomenten.</p>

  <p>Här finns endast övningar från kursen Webbserverprogrammering 1. Äldre övningar från Webbutveckling 1 och 2 finns uppladdat men åtkomst sker via separata samlingssidor. Länkar till dessa finns på <a href="http://labb.vgy.se/~alrikmz/">startsidan</a>.</p>

  <p>Källkoden till mina övningar och övriga delar till sidan, hittar du i <a href="viewsource.php?dir=exercises">denna katalogen</a>.</p>
 </article>
 <article>
  
  <?php

  newExerciseTheme
("Funktioner");
   
exerciseGroup("functions/functions_"".php"19"Funktioner");
  
endExerciseTheme();

  
newExerciseTheme("Formulär");
   
exerciseGroup("forms/forms_"".html"17"Formulär");
   
exerciseSingle("forms/forms_8.php""Formulär 8");
  
endExerciseTheme();

  
newExerciseTheme("Inkludera filer");
   
exerciseSingle("include/include_1.php""Inkludera filer 1");
   
exerciseSingle("include/include_2_page1.php""Inkludera filer 2");
  
endExerciseTheme();

  
newExerciseTheme("Formulär - Quiz");
   
exerciseGroup("forms_quiz/forms_quiz_"".php"16"Quiz");
  
endExerciseTheme();

  
newExerciseTheme("Textsträngar");
   
exerciseGroup("strings/strings_"".php"16"Textsträngar");
  
endExerciseTheme();

  
newExerciseTheme("Cookies/Sessions");
   
exerciseSingle("cookies_and_sessions/cookies_sessions_1.php""Cookies 1");
   
exerciseGroup("cookies_and_sessions/cookies_sessions_"".php"25"Session");
  
endExerciseTheme();

  
newExerciseTheme("Klasser");
   
exerciseGroup("classes/classes_"".php"15"Klasser");
  
endExerciseTheme();

  
newExerciseTheme("Klasser - tärning");
   
exerciseGroup("classes_dice/dice_"".php"17"Tärning");
  
endExerciseTheme();

  
newExerciseTheme("Repetition");
   
exerciseSingle("repetition/repetition.php""Repetition, allmänt");
   
exerciseSingle("repetition/repetition_login.php""Logga in-system");
   
exerciseSingle("repetition/special_repetition.php""Specialrepetition, efter prov");
  
endExerciseTheme();

  
newExerciseTheme("MySQL");
   
exerciseGroup("mysql/exercise_"""12"Övning");
   
exerciseSingle("mysql/exercise_3/exercise_3_a""Övning 3a");
   
exerciseSingle("mysql/exercise_3/exercise_3_b""Övning 3b");
   
exerciseSingle("mysql/exercise_3/exercise_3_c""Övning 3c");
   
exerciseSingle("mysql/exercise_3/exercise_3_d""Övning 3d");
   
exerciseSingle("mysql/exercise_3/exercise_3_e""Övning 3e");
  
endExerciseTheme();

  
newExerciseTheme("AJAX (Asynchronous Javascript and XML)");
   
exerciseSingle("ajax/search_suggestions/user_search.html""Real-time sökförslag med AJAX");
  
endExerciseTheme();

  
?>

 </article>
</main>
<script type="text/javascript" src="js/exercises.js"></script>

<?php
include("incl/footer.php");
?>