mirror of
https://github.com/php/web-pres2.git
synced 2026-03-23 23:12:07 +01:00
46 lines
1.3 KiB
PHP
46 lines
1.3 KiB
PHP
<?php
|
|
require_once 'config.php';
|
|
require_once 'XML_Presentation.php';
|
|
require_once 'XML_Slide.php';
|
|
|
|
session_start();
|
|
?>
|
|
<html><title>Slide Listing</title>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<script language="JavaScript1.2">
|
|
<!--
|
|
function slide(url){
|
|
window.opener.location=url
|
|
}
|
|
//-->
|
|
</script>
|
|
</head>
|
|
<body bgcolor="#ffffff">
|
|
<?php
|
|
echo "<table border=0><tr><th> # </th><td>Slide Title</td></tr>\n";
|
|
$lastSection = $lastChapter = '';
|
|
|
|
foreach($_SESSION['titles'] as $k=>$v) {
|
|
$spacer = '';
|
|
if(!empty($v['section'])) {
|
|
$spacer = " ";
|
|
if($v['section'] != $lastSection) {
|
|
echo "<tr><th colspan=2 align=left><font size=+2>$v[section]</font></th></tr>\n";
|
|
}
|
|
}
|
|
if(!empty($v['chapter'])) {
|
|
$spacer .= " ";
|
|
if($v['chapter'] != $lastChapter) {
|
|
echo "<tr><th colspan=2 align=left>$spacer$v[chapter]</th></tr>\n";
|
|
}
|
|
}
|
|
$lastSection = isset($v['section']) ? $v['section'] : '';
|
|
$lastChapter = isset($v['chapter']) ? $v['chapter'] : '';
|
|
echo "<tr><td align=right>".($k)."</td><td><a href=\"slidelist.php\" style=\"text-decoration: none;\" onClick=\"javascript:slide('$_SERVER[REQUEST_SCHEME]://$_SERVER[HTTP_HOST]$baseDir$showScript/$_SESSION[currentPres]/$k'); window.close();\">$spacer$v[title]</a></td></tr>\n";
|
|
}
|
|
echo "</table>\n";
|
|
?>
|
|
</body>
|
|
</html>
|