Skip to content

Commit

Permalink
Install OK ?
Browse files Browse the repository at this point in the history
  • Loading branch information
glorieux-f committed Sep 28, 2017
1 parent a411f09 commit 52fcce9
Show file tree
Hide file tree
Showing 13 changed files with 105 additions and 207 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -3,3 +3,5 @@ toc/
epub/
kindle/
conf.php

test-play.csv
5 changes: 1 addition & 4 deletions .htaccess
@@ -1,12 +1,9 @@

php_flag zlib.output_compression on
php_value zlib.output_compression_level 9

# Nécessaire dans certains cas de conf Apache
Options -MultiViews +FollowSymLinks +Indexes
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# évite RewriteBase, rappel avec %1, le ? permet de faire fonctionner la règle partout
RewriteCond %{THE_REQUEST} ^[^/]*(.*/moliere/)?
RewriteCond %{THE_REQUEST} ^[^/]*(.*/moliere/)?
RewriteRule ^(.*)$ %1index.php/$1 [QSA,L]
6 changes: 3 additions & 3 deletions Moliere.php
Expand Up @@ -79,13 +79,13 @@ static function text( $playcode )
{
self::$qobj->execute(array($playcode, 'graph'));
echo current(self::$qobj->fetch(PDO::FETCH_NUM));
self::$qobj->execute(array($playcode, 'article'));
$res = self::$qobj->fetch(PDO::FETCH_NUM);
echo '<div style="padding: 0 20px 50px 45px; ">'.$res[0].'</div>';
self::$qobj->execute(array($playcode, 'roles'));
echo current(self::$qobj->fetch(PDO::FETCH_NUM));
self::$qobj->execute(array($playcode, 'relations'));
echo current(self::$qobj->fetch(PDO::FETCH_NUM));
self::$qobj->execute(array($playcode, 'article'));
$res = self::$qobj->fetch(PDO::FETCH_NUM);
echo '<div style="padding: 0 20px 50px 45px; ">'.$res[0].'</div>';
}

}
Expand Down
10 changes: 3 additions & 7 deletions build.sh
@@ -1,8 +1,4 @@
#!/bin/bash
BASEDIR=$(dirname $0)
export LC_CTYPE=fr_FR.UTF-8 # pour les noms de fichiers avec accents
/usr/bin/svn --non-interactive --trust-server-cert update $BASEDIR/
/usr/bin/php $BASEDIR/../teipub/Teipub.php "$BASEDIR/critique-moliere.xml" "$BASEDIR/critique-moliere.sqlite" 2>&1
/usr/bin/php $BASEDIR/../teipub/Teipub.php "$BASEDIR/critique/*.xml" "$BASEDIR/critique-moliere.sqlite" 2>&1

exit 0
php ../Dramagraph/Base.php moliere.sqlite urls_moliere.txt
php ../Dramagraph/Base.php contexte.sqlite urls_contexte.txt
php ../Teinte/Build.php
99 changes: 0 additions & 99 deletions contexte.php

This file was deleted.

Binary file modified contexte.sqlite
Binary file not shown.
45 changes: 0 additions & 45 deletions contexte.txt

This file was deleted.

30 changes: 18 additions & 12 deletions index.php
Expand Up @@ -3,14 +3,19 @@
error_reporting(-1);
include( dirname(dirname(__FILE__))."/Teinte/Web.php" );
include( dirname(dirname(__FILE__))."/Teinte/Base.php" );
$path = Teinte_Web::pathinfo(); // document demandé
$basehref = Teinte_Web::basehref(); //
$teinte = $basehref."../Teinte/";

$path = Teinte_Web::pathinfo(); // document demandé
// chercher le doc dans la base
$branches = explode( '/', $path );
$docid = end( $branches );


// les pièces commencent par moliere, laissaer la main au script pour le théâtre
if (strpos($path, 'moliere') === 0 || strpos($path, 'theatre') === 0) {
$conf = array(
"playcode" => current( explode( '/', $path )), // relatif à la politique d’URL décidée ici
"playcode" => $docid, // relatif à la politique d’URL décidée ici
"url" => Teinte_Web::basehref()."moliere/",
"title" => "Molière",
"sqlite" => "moliere.sqlite", // nom de la base sqlite
Expand All @@ -22,7 +27,7 @@
// devanciers et contemporains
if (strpos($path, 'contexte') === 0) {
$conf = array(
"playcode" => end ( explode( '/', $path ) ), // relatif à la politique d’URL décidée ici
"playcode" => $docid, // relatif à la politique d’URL décidée ici
"url" => Teinte_Web::basehref()."contexte/",
"title" => "Devanciers et contemporains",
"sqlite"=> "contexte.sqlite", // nom de la base sqlite
Expand All @@ -46,8 +51,6 @@
$conf = include( $f );
}

// chercher le doc dans la base
$docid = current( explode( '/', $path ) );
if ( !file_exists( $conf['sqlite'] )) {
echo '<h1>Première installation ? Allez voir la page <a href="pull.php">pull.php</a> pour transformer vos fichiers XML.</h1>';
exit();
Expand Down Expand Up @@ -76,17 +79,21 @@
<div id="center">
<header id="header">
<h1><?php
echo $path;
if ( !$path && $base->search ) {
echo '<a href="'.$basehref.'">'.$conf['title'].'</a>';
echo '<a href="?">'.$conf['title'].'</a>';
}
else if ( !$path ) {
echo '<a href="//obvil.paris-sorbonne.fr/projets/edition-digitale-et-etude-de-la-polemique-autour-de-gongora">OBVIL, '.$conf['title'].'</a>';
echo '<a class="home" href="'.$basehref.'?">Molière</a>';
}
else if ( trim( $path, "/" ) == "critique" ) {
echo '<a href="'.$basehref.'">Molière, accueil</a>';
}
else {
echo '<a href="'.$basehref.'?'.$_COOKIE['lastsearch'].'">'.$conf['title'].'</a>';
echo '<a href="'.$basehref.'critique/?'.$_COOKIE['lastsearch'].'">Critique moliéresque</a>';
}
?></h1>
<a class="logo" href="http://obvil.paris-sorbonne.fr/"><img class="logo" src="<?php echo $basehref; ?>../theme/img/logo-obvil.png" alt="OBVIL"></a>
<a class="logo" href="http://obvil.paris-sorbonne.fr/projets/projet-moliere"><img class="logo" src="<?php echo $basehref; ?>../theme/img/logo-obvil.png" alt="OBVIL"></a>
</header>
<div id="contenu">
<aside id="aside">
Expand All @@ -99,7 +106,7 @@
<a class="title" href="' . $basehref . $doc['code'] . '">'.$doc['title'].'</a>
</header>
<form action="#mark1">
<a title="Retour aux résultats" href="'.$basehref.'?'.$_COOKIE['lastsearch'].'"><img src="'.$basehref.'../theme/img/fleche-retour-corpus.png" alt="←"/></a>
<a title="Retour aux résultats" href="'.$basehref.'critique/?'.$_COOKIE['lastsearch'].'"><img src="'.$basehref.'../theme/img/fleche-retour-corpus.png" alt="←"/></a>
<input name="q" value="'.str_replace( '"', '&quot;', $base->p['q'] ).'"/><button type="submit">🔎</button>
</form>
';
Expand Down Expand Up @@ -132,7 +139,7 @@
echo '
<h1>OBVIL - corpus Molière</h1>
<div class="clear">
<a href="./moliere" class="square">Théâtre</a>
<a href="./moliere" class="square couleur1">Théâtre</a>
<a href="./critique/" class="square couleur2">Critique</a>
<a href="./contexte/" class="square couleur3">Devanciers et contemporains</a>
<a href="http://obvil-dev.paris-sorbonne.fr/corpus/moliere/anecdotes/index.php" class="square couleur4">Anecdotes</a>
Expand All @@ -149,7 +156,6 @@
}
// pas de livre demandé, page de couverture
else {
readfile('accueil.html');
$base->biblio( array( "date", "author", "title" ) );
}
?>
Expand Down
Binary file modified moliere.sqlite
Binary file not shown.

0 comments on commit 52fcce9

Please sign in to comment.