-
Notifications
You must be signed in to change notification settings - Fork 3
/
slides.php
57 lines (54 loc) · 3.54 KB
/
slides.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
if (isset($_SESSION['logget_ind'])) {
$query = "SELECT SlideID,Slidetekst FROM Slide2 WHERE (SangID = " . $intSongId . ") ORDER BY SlideID";
$result = doSQLQuery($query);
$slide_arr = array();
while ($res_arr = db_fetch_array($result)) {
$tmp = $res_arr["SlideID"];
array_push($slide_arr, $res_arr["Slidetekst"]);
}
?>
<div id="slides_input">
<span class="stamdata">Afspilningsrækkefølge: </span><br />
<input name="slides" id="slides" type="text" value="<?php echo $strSlides; ?>" size="18" />
<button name="send" value="Kopier tekst fra sangtekst" class="submit_btn" onclick="javascript:copyToSlides();return false;"> Kopier tekst fra sangtekst </button>
<!--<button name="send" value="Gem slides" class="submit_btn_2" onClick="javascript:saveSlides();return false;"> Gem slides </button>-->
<button name="send" value="Generer præsentation" class="submit_btn" onclick="javascript:window.location = 'odp-handler/createSlides.php?songcount=1&Song0=<?php echo $intSongId; ?>';return false;"> <img src="img/oo-impress.gif" alt="Udskriv" width="18" height="19" border="0" align="absmiddle" /> Generer præsentation </button>
<button name="send" value="Vis nu" class="submit_btn" onclick="javascript:window.open('odf-viewer/#../odp-handler/createSlides.php?songcount=1&Song0=<?php echo $intSongId; ?>&ext=.odp', '', 'width=800, height=640');return false;"> <img src="img/slide_show_48.png" alt="Vis nu" width="18" height="19" border="0" align="absmiddle" /> Vis nu </button>
<br />
<span class="stamdata">Slide A: (maximum 11 linier)</span><br />
<textarea cols="60" rows="8" id="slideA"><?php print(stripslashes($slide_arr[0])); ?></textarea><br />
<span class="stamdata">Slide B: (maximum 11 linier)</span><br />
<textarea cols="60" rows="8" id="slideB"><?php print(stripslashes($slide_arr[1])); ?></textarea><br />
<span class="stamdata">Slide C: (maximum 11 linier)</span><br />
<textarea cols="60" rows="8" id="slideC"><?php print(stripslashes($slide_arr[2])); ?></textarea><br />
<span class="stamdata">Slide D: (maximum 11 linier)</span><br />
<textarea cols="60" rows="8" id="slideD"><?php print(stripslashes($slide_arr[3])); ?></textarea><br />
<span class="stamdata">Slide E: (maximum 11 linier)</span><br />
<textarea cols="60" rows="8" id="slideE"><?php print(stripslashes($slide_arr[4])); ?></textarea><br />
<span class="stamdata">Slide F: (maximum 11 linier)</span><br />
<textarea cols="60" rows="8" id="slideF"><?php print(stripslashes($slide_arr[5])); ?></textarea><br />
<span class="stamdata">Slide G: (maximum 11 linier)</span><br />
<textarea cols="60" rows="8" id="slideG"><?php print(stripslashes($slide_arr[6])); ?></textarea><br />
<span class="stamdata">Slide H: (maximum 11 linier)</span><br />
<textarea cols="60" rows="8" id="slideH"><?php print(stripslashes($slide_arr[7])); ?></textarea><br />
<div id="refresh">
<p> <br /> </p>
</div>
</div>
<?php
} // session
?>
<script>
(function () {
document.getElementById('slides_input')
.addEventListener('keydown', function (e) {
if (e.keyCode !== 13) { return; }
var result = e.target.value.match(/\n/g);
if (!result || result.length < 11) { return; }
e.preventDefault();
})
} ());
</script>