OPiQuotations  v.03.00.00 — April 5, 2019
Namespaces | Functions | Variables
index.php File Reference

Main page to the Web application OPiCitations http://www.opimedia.be/OPiCitations/. More...

Go to the source code of this file.

Namespaces

 OPiCitations
 

Functions

 nb_to_nb_page ($nb_quotations)
 
 nb_to_offset ($nb_quotations)
 
 s ($n)
 
 print_page_links ()
 

Variables

if(true) else
 
 $opiquotations = new OPiQuotations\OPiQuotations()
 
 $lists
 
 $LABELS
 
 $ALL_KEYS = array_merge(array_keys($LABELS), ['id', 'all_marked', 'all', 'page', 'selection'])
 
 $SELECTION_LABELS
 
 $NB_FOR_RANDOM = 10
 
 $nb_by_page = 100
 
 $num_page = 1
 
 $params = array()
 
 $param_key = null
 
 $param_value = null
 
if(!empty($params)) $search = null
 
 $param_id = null
 
 $header = '<strong>'.count($quots).'</strong> citations choisies <strong>aléatoirement</strong>'
 
 $only_one = (count($quots) === 1)
 
 $keywords = ['citation', 'citations', 'maxime', 'maximes', 'proverbe', 'proverbes', 'littérature', 'français']
 
 $desc = 'Dictionnaire de citations.'
 
if($header !==null) $desc_open_graph = OPiQuotations\html_text_cut($desc, 300)
 
 $url_site = 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/'
 
 $url = $url_site
 
 $all_is_maxim = !empty($quots) || ($param_key === 'nation')
 
 if ( $search !==null &&$search !=='')
 

Detailed Description

Main page to the Web application OPiCitations http://www.opimedia.be/OPiCitations/.

(October 24, 2019)

Piece of OPiQuotations. https://bitbucket.org/OPiMedia/opiquotations

GPLv3 — Copyright (C) 2014, 2015, 2016, 2017, 2018, 2019 Olivier Pirson http://www.opimedia.be/

Definition in file index.php.

Function Documentation

◆ nb_to_nb_page()

nb_to_nb_page (   $nb_quotations)

Definition at line 58 of file index.php.

References $nb_by_page.

Referenced by print_page_links().

◆ nb_to_offset()

nb_to_offset (   $nb_quotations)

Definition at line 69 of file index.php.

References $nb_by_page, and $num_page.

◆ print_page_links()

print_page_links ( )

Definition at line 642 of file index.php.

References $i, $num_page, $params, $quot, $search, and nb_to_nb_page().

◆ s()

s (   $n)

Definition at line 81 of file index.php.

Variable Documentation

◆ $all_is_maxim

$all_is_maxim = !empty($quots) || ($param_key === 'nation')

Definition at line 424 of file index.php.

◆ $ALL_KEYS

$ALL_KEYS = array_merge(array_keys($LABELS), ['id', 'all_marked', 'all', 'page', 'selection'])

Definition at line 108 of file index.php.

◆ $desc

$desc = 'Dictionnaire de citations.'

Definition at line 371 of file index.php.

◆ $desc_open_graph

if ( $header !==null) $desc_open_graph = OPiQuotations\html_text_cut($desc, 300)

Definition at line 379 of file index.php.

◆ $header

$header = '<strong>'.count($quots).'</strong> citations choisies <strong>aléatoirement</strong>'

Definition at line 318 of file index.php.

◆ $keywords

$keywords = ['citation', 'citations', 'maxime', 'maximes', 'proverbe', 'proverbes', 'littérature', 'français']

Definition at line 329 of file index.php.

◆ $LABELS

$LABELS
Initial value:
= array('ids' => 'numéro(s)',
'subject' => 'sujet',
'text' => 'texte',
'translation' => 'traduction',
'author' => 'auteur',
'work' => '&oelig;uvre',
'nation' => 'maxime')

Definition at line 101 of file index.php.

◆ $lists

$lists
Initial value:
= array('author' => $opiquotations->list_authors(),
'nation' => $opiquotations->list_nations(),
'subject' => $opiquotations->list_subjects(),
'work' => $opiquotations->list_works())
$opiquotations
Definition: index.php:94

Definition at line 96 of file index.php.

◆ $nb_by_page

$nb_by_page = 100

Definition at line 117 of file index.php.

Referenced by nb_to_nb_page(), and nb_to_offset().

◆ $NB_FOR_RANDOM

$NB_FOR_RANDOM = 10

Definition at line 115 of file index.php.

◆ $num_page

$num_page = 1

Definition at line 118 of file index.php.

Referenced by nb_to_offset(), and print_page_links().

◆ $only_one

$only_one = (count($quots) === 1)

Definition at line 327 of file index.php.

◆ $opiquotations

$opiquotations = new OPiQuotations\OPiQuotations()

Definition at line 94 of file index.php.

◆ $param_id

$param_id = null

Definition at line 176 of file index.php.

◆ $param_key

$param_key = null

Definition at line 162 of file index.php.

◆ $param_value

$param_value = null

Definition at line 163 of file index.php.

◆ $params

$params = array()

Definition at line 122 of file index.php.

Referenced by print_page_links().

◆ $search

if (!empty( $params)) $search = null

◆ $SELECTION_LABELS

$SELECTION_LABELS
Initial value:
= array('Facebook' => 'Facebook - 1OPiCitationParJour',
'Twitter' => 'Twitter - OPiCitationJour',
'Web' => 'Web')

Definition at line 110 of file index.php.

◆ $url

$url = $url_site

◆ $url_site

$url_site = 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/'

Definition at line 384 of file index.php.

◆ else

if ( $only_one) else
Initial value:
{
#DEBUG_END
ini_set('display_errors', 'stderr')

Definition at line 34 of file index.php.

◆ if

if
Initial value:
{
$quots = $opiquotations->quotations_by_random($NB_FOR_RANDOM)
$NB_FOR_RANDOM
Definition: index.php:115
$opiquotations
Definition: index.php:94

Definition at line 542 of file index.php.