Affiche une page statique

@return string HTML
552603
function afficheEdito()
    {
        $html = '';
        $mail = new mailObject();
        $t = new Template('modules/archi/templates/');
        $t->set_filenames(array('edito'=>'edito.tpl'));
        $t->assign_vars(array('email'=>$mail->encodeEmail("fabien.romary@gmail.com")));
        
        ob_start();
        $t->pparse('edito');
        $html .= ob_get_contents();
        ob_end_clean();
        
        return $html;
    }
1356142
public function viewPage()
    {
        $page = isset($_GET['sub']) ? (string)$_GET['sub'] : self::DEFAULT_SUB_PAGE;
        View::page('admin/' . $page);
    }
1229645
public function pages_render()
	{
		// no links if we only have one page
		if ($this->config['total_pages'] == 1)
		{
			return '';
		}

		$html = '';

		// calculate start- and end page numbers
		$start = $this->config['calculated_page'] - floor($this->config['num_links'] * $this->config['link_offset']);
		$end = $this->config['calculated_page'] + floor($this->config['num_links'] * ( 1 - $this->config['link_offset']));

		// adjust for the first few pages
		if ($start < 1)
		{
			$end -= $start - 1;
			$start = 1;
		}

		// make sure we don't overshoot the current page due to rounding issues
		if ($end < $this->config['calculated_page'])
		{
			$start++;
			$end++;
		}

		// make sure we don't overshoot the total
		if ($end > $this->config['total_pages'])
		{
			$start = max(1, $start - $end + $this->config['total_pages']);
			$end = $this->config['total_pages'];
		}

		for($i = intval($start); $i <= intval($end); $i++)
		{
			if ($this->config['calculated_page'] == $i)
			{
				$html .= str_replace(
				    '{link}',
				    str_replace(array('{uri}', '{page}'), array('#', $i), $this->template['active-link']),
				    $this->template['active']
				);
				$this->raw_results[] = array('uri' => '#', 'title' => $i, 'type' => 'active');
			}
			else
			{
				$html .= str_replace(
				    '{link}',
				    str_replace(array('{uri}', '{page}'), array($this->_make_link($i), $i), $this->template['regular-link']),
				    $this->template['regular']
				);
				$this->raw_results[] = array('uri' => $this->_make_link($i), 'title' => $i, 'type' => 'regular');
			}
		}

		return $html;
	}
789886
public function index()
    {
        $this->authorize(Policies\PagesPolicy::PERMISSION_LIST);

        $pages = Page::with(['footers'])->paginate(50);

        $this->setTitle($title = trans('seo::pages.titles.pages-list'));
        $this->addBreadcrumb($title);

        return $this->view('admin.pages.index', compact('pages'));
    }
608855
public function getPageContent()
    {
        $response = Director::test($this->owner->Link());

        if (!$response->isError()) {
            return $response->getBody();
        }

        return '';
    }
962555
protected function _pages()
    {
        $pages = new AnConfig();
        $current  = ($this->current - 1) * $this->limit;
        
        // First
        $page    = 1;
        $offset  = 0;
        $active  = $offset != $this->offset;
        
        $pages->first = array(
            'title' => 'First', 
            'page' => 1, 
            'offset' => $offset, 
            'limit' => $this->limit, 
            'current' => false, 
            'active' => $active, 
            'rel' => 'first'
        );
      
        // Previous
        $offset  = max(0, ($this->current - 2) * $this->limit);
        $active  = $offset != $this->offset;
        $pages->prev = array(
            'title' => 'Prev', 
            'page' => $this->current - 1, 
            'offset' => $offset, 
            'limit' => $this->limit, 
            'current' => false, 
            'active' => $active, 
            'rel' => 'prev'
        );

        // Pages
        $offsets = array();
        foreach ($this->_offsets() as $page => $offset) {
            $current = $offset == $this->offset;
            $offsets[] = array(
                'title' => $page, 
                'page' => $page, 
                'offset' => $offset, 
                'limit' => $this->limit, 
                'current' => $current, 
                'active' => !$current
            );
        }
        
        $pages->offsets = $offsets;
        
        // Next
        $offset = min(($this->count-1) * $this->limit, ($this->current) * $this->limit);
        $active = $offset != $this->offset;
        $pages->next = array(
            'title' => 'Next', 
            'page' => $this->current + 1, 
            'offset' => $offset, 
            'limit' => $this->limit, 
            'current' => false, 
            'active' => $active, 
            'rel' => 'next'
        );
       
        // Last
        $offset  = ($this->count - 1) * $this->limit;
        $active  = $offset != $this->offset;
        $pages->last = array(
            'title' => 'Last', 
            'page' => $this->count, 
            'offset' => $offset, 
            'limit' => $this->limit, 
            'current' => false, 
            'active' => $active, 
            'rel' => 'last'
        );
        
        return $pages;
    }
256467
public function current(): string
    {
        if (!$this->Wp->is_admin) {
            return ''; // Not applicable.
        }
        return !empty($_GET['page'])
            ? $this->c::unslash((string) $_GET['page'])
            : $this->now(); // Fallback on `$pagenow`.
    }
1150307
public function index()
    {
        $pageGrid = new PageDataGrid($this->repository->query());
        return view('avored-framework::cms.page.index')
            ->with('dataGrid', $pageGrid->dataGrid);
    }
1370487
public function getEasyMarkup(){

        $markup = '';

        if($this->prevUrl){
            $markup .= "<li class='pagination-previous' title='View previous page'><a href='{$this->prevUrl}'>prev</a></li>";
        }//if

        $pages = $this->getPrevUrls(5);

        foreach($pages as $i => $page){
            $markup .= "<li><a href='{$page}' title='View page {$i} of {$this->totalPages}'>{$i}</a></li>";
        }//foreach

        if($this->totalPages){
            $markup .= "<li class='current' title='Your viewing page {$this->currentPage} of {$this->totalPages}'><a>{$this->currentPage}</a></li>";
        }//if

        $pages = $this->getNextUrls(5);

        foreach($pages as $i => $page){
            $markup .= "<li><a href='{$page}' title='View page {$i} of {$this->totalPages}'>{$i}</a></li>";
        }//foreach

        if($this->nextUrl){
            $markup .= "<li class='pagination-next' title='View next page'><a href='{$this->nextUrl}'>next</a></li>";
        }//if

        return "<ul class='pagination'>{$markup}</ul>";

    }
480486
public function render()
    {
        if ($this->hasPages()) {
            if ($this->simple) {
                return sprintf('<ul class="pager">%s %s</ul>', $this->getPreviousButton(), $this->getNextButton());
            } else {
                return sprintf('<ul class="am-pagination am-fr tpl-pagination">%s %s %s</ul>', $this->getPreviousButton(), $this->getLinks(), $this->getNextButton());
            }
        }
    }
259726
public function afficher($id)
    {
        $html = '';
        $formulaire = new formGenerator();
        if ($formulaire->estChiffre($id) == 1) {
            $sql = 'SELECT p.nom as nom, p.prenom as prenom,  m.nom as metier,  p.idPersonne as idPersonne,  p.dateNaissance as dateNaissance,  p.dateDeces as dateDeces,  p.description as description
                    FROM personne p
                    LEFT JOIN metier m ON m.idMetier = p.idMetier
                    WHERE p.idPersonne='.$id.' LIMIT 1';
            $rep = $this->connexionBdd->requete($sql);
            if (mysql_num_rows($rep) == 1) {
                $res = mysql_fetch_object($rep);

                $t = new Template('modules/archi/templates/');
                $t->set_filenames((array('pe'=>'personne.tpl')));

                $e = new archiEvenement();

                $t->assign_vars(
                    array(
                        'prenom' => $res->prenom,
                        'nom'    => $res->nom,
                        'metier' => $res->metier,
                        'dateNaissance'=> $this->date->toFrench($res->dateNaissance),
                        'dateDeces'    => $this->date->toFrench($res->dateDeces),
                        'description'  => $res->description,
                        'urlAjout'     => $this->creerUrl('ajouterPersonne'),
                        'evenementLies'=> $e->afficherListe(array( 'selection' => 'personne',  'id' => $res->idPersonne))
                    )
                );

                ob_start();
                $t->pparse('pe');
                $html .= ob_get_contents();
                ob_end_clean();
            } else {
                $html .= 'ERREUR aucun résultat !';
            }
        } else {
            $html .= 'ERREUR mauvais ID!';
        }
        return $html;
    }
1155968
public function afficherFormulaire()
    {
        $html = '';
        $t = new Template('modules/archi/templates');
        $t->set_filenames(array('formulaire'=>'personneFormulaire.tpl'));

        $modeAffichage='';
        if (isset($this->variablesGet['modeAffichage']) && $this->variablesGet['modeAffichage']!='') {
            $modeAffichage = $this->variablesGet['modeAffichage'];
        }


        switch ($modeAffichage) {
            case 'nouveauDossier':
            case "modifEvenement":
                $t->assign_vars(array('urlAction'=>$this->creerUrl('ajouterPersonne', '', array('noHeaderNoFooter'=>1, 'modeAffichage'=>$modeAffichage))));
                $t->assign_vars(array('boutonAnnulation'=>"location.href='".$this->creerUrl('', 'personneListe', array('noHeaderNoFooter'=>1, 'modeAffichage'=>$modeAffichage))."';"));
                break;
            default:
                $t->assign_block_vars('allowAjouterMetier', array());
                break;
        }

        // récupération des métiers
        $sql = "SELECT nom,  idMetier FROM metier";
        $rep = $this->connexionBdd->requete($sql);
        while ($res = mysql_fetch_object($rep)) {
            $t->assign_block_vars('metier', array('valeur'=>$res->idMetier,  'nom'=>$res->nom));
        }

        if ($this->erreurs->tabFormExiste()) {
            foreach ($this->erreurs->getErreursFromFormulaire() as $name => $value) {
                if ($value['type']=='date') {
                     $val = $this->date->toFrench($this->date->toBdd($value['value']));
                } else {
                    $val = htmlspecialchars(stripslashes($value["value"]));
                }

                $t->assign_vars(array( $name => $val));
                if ($value["error"]!='') {
                    $t->assign_vars(array($name."-error" => $value["error"]));
                }
            }
        }

        ob_start();
        $t->pparse('formulaire');
        $html .= ob_get_contents();
        ob_end_clean();

        return $html;
    }
1221979
public function getHtmlFromAdresses()
    {
        $html="<div id='".$this->googleMapNameId."' style='width: ".$this->googleMapWidth."px; height: ".$this->googleMapHeight."px;'>Veuilliez patienter pendant le chargement de la carte...</div>";

        $html.="<script  >";

        if (count($this->coordonnees)>0) {
            foreach ($this->coordonnees as $indice => $value) {
                if (isset($value['link'])) {
                    $html.="tabAdresses[".$indice."]=\"".$value['link']."\";\n";
                }
            }
        }

        $html.="</script>";
        //$html.="<div id='".$this->googleMapNameId."' style='width: ".$this->googleMapWidth."px; height: ".$this->googleMapHeight."px;'>Veuilliez patienter pendant le chargement de la carte...</div>";

        if ($this->debugMode)
            $displayDebug='block';
        else
            $displayDebug='none';

        //$html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>";
        $html.="<script>load();</script>";

        // fonction appelant les affichages de coordonnées ,  appels regroupées dans une fonction qui groupe les coordonnées par paquet ,  afin de ne pas trop en envoyer a la fois
        if (count($this->coordonnees)>0) {
            $html.="<script>";
            $html.="var numPaquet=0;\n";
            $html.="var timer;\n";
            $html.="startTimerPaquets();\n";
            $html.="function startTimerPaquets()\n";
            $html.="{";
            $html.="afficheCoordonneesParPaquets();\n";
            $html.="timer = setInterval(\"afficheCoordonneesParPaquets()\", ".$this->setTimeOutPaquets.");\n";
            $html.="}\n";

            $html.="function afficheCoordonneesParPaquets(){\n";
            $i=0;
            $numPaquet = 0;
            foreach ($this->coordonnees as $indice => $value) {
                $image = ", \"https://www.google.com/mapfiles/marker.png\"";//
                if (isset($value['imageFlag']) && $value['imageFlag']!='') {
                    $image = ", \"".$value['imageFlag']."\"";
                }

                if ($i%10==0) {
                    $html.="if (numPaquet==".$numPaquet.")\n";
                    $html.="{\n";
                    $iDebut = $i;
                }

                $html.=" getCoordonnees(\"".$value['adresse']."\", ".$indice." ".$image.");\n";

                if ($i==$iDebut+9 || $i==count($this->coordonnees)-1 ) {
                    $html.="}\n";
                    $numPaquet++;
                }
                $i++;
            }


            $html.="if (numPaquet>".$numPaquet.")\n";
            $html.="{\n";
            $html.="clearInterval(timer);\n";
            $html.="}\n";
            $html.="numPaquet++;\n";
            $html.="}\n";
            $html.="</script>";
        }



        if ($this->debugMode)
            $displayDebug='block';
        else
            $displayDebug='none';

        $html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>";
        return $html;
    }
929565
public function getPseudoPage()
    {
        $page = $this;
        while ($page && !$page->isPseudoPage) {
            $page = $page->parent;
        }
        return $page;
    }
292714
public function getHTML()
    {

            $html="<div id='".$this->googleMapNameId."' style='width: ".$this->googleMapWidth."px; height: ".$this->googleMapHeight."px; ".$this->divStyle."'>Veuilliez patienter pendant le chargement de la carte...</div>";

        //$html.="<script  >";
        /*
        if (count($this->coordonnees)>0) {
            foreach ($this->coordonnees as $indice => $value) {
                if (isset($value['link'])) {
                    $html.="tabAdresses[".$indice."]=\"".$value['link']."\";\n";
                }
            }
        }

        $html.="</script>";
        $html.="<div id='".$this->googleMapNameId."' style='width: ".$this->googleMapWidth."px; height: ".$this->googleMapHeight."px;'>Veuilliez patienter pendant le chargement de la carte...</div>";

        if ($this->debugMode)
            $displayDebug='block';
        else
            $displayDebug='none';

        $html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>";
        $html.="<script  >load();</script>";

        // fonction appelant les affichages de coordonnées ,  appels regroupées dans une fonction qui groupe les coordonnées par paquet ,  afin de ne pas trop en envoyer a la fois
        if (count($this->coordonnees)>0) {
            $html.="<script  >";
            $html.="var numPaquet=0;\n";
            $html.="var timer;\n";
            $html.="startTimerPaquets();\n";
            $html.="function startTimerPaquets()\n";
            $html.="{";
            $html.="afficheCoordonneesParPaquets();\n";
            $html.="timer = setInterval(\"afficheCoordonneesParPaquets()\", ".$this->setTimeOutPaquets.");\n";
            $html.="}\n";

            $html.="function afficheCoordonneesParPaquets(){\n";
            $i=0;
            $numPaquet = 0;
            foreach ($this->coordonnees as $indice => $value) {
                $image = ", \"http://www.google.com/mapfiles/marker.png\"";//
                if (isset($value['imageFlag']) && $value['imageFlag']!='') {
                    $image = ", \"".$value['imageFlag']."\"";
                }

                if ($i%10==0) {
                    $html.="if (numPaquet==".$numPaquet.")\n";
                    $html.="{\n";
                    $iDebut = $i;
                }

                $html.=" getCoordonnees(\"".$value['adresse']."\", ".$indice." ".$image.");\n";

                if ($i==$iDebut+9 || $i==count($this->coordonnees)-1 ) {
                    $html.="}\n";
                    $numPaquet++;
                }
                $i++;
            }


            $html.="if (numPaquet>".$numPaquet.")\n";
            $html.="{\n";
            $html.="clearInterval(timer);\n";
            $html.="}\n";
            $html.="numPaquet++;\n";
            $html.="}\n";
            $html.="</script>";
        }
        */

        /*
        if ($this->debugMode)
            $displayDebug='block';
        else
            $displayDebug='none';
            */
        //$html.="<div style='width:500px; height:300px;overflow:scroll;display:".$displayDebug.";' id='debugGoogleMap'></div>";
        $html.="<script  >load();</script>";
        $html.="<script  >";
        if (isset($params['urlImageIcon']) && isset($params['pathImageIcon'])) {
            $urlImage = $params['urlImageIcon'];

            list($imageSizeX,  $imageSizeY,  $typeImage,  $attrImage) = getimagesize($params['pathImageIcon']);

            $html.="
                var icon = new GIcon();
                //icon.image = image;


                icon.image = \"$urlImage\";
                //icon.shadow = \"https://labs.google.com/ridefinder/images/mm_20_shadow.png\";
                icon.iconSize = new GSize($imageSizeX,  $imageSizeY);
                icon.shadowSize = new GSize(22,  20);
                icon.iconAnchor = new GPoint(2,  24);
                icon.infoWindowAnchor = new GPoint(5,  1);
                var iconMarker = new GIcon(icon);
            ";
        } else {
            $html.="
                var icon = new GIcon();
                //icon.image = image;
                var iconMarker = new GIcon(icon);

                icon.image = \"https://labs.google.com/ridefinder/images/mm_20_red.png\";
                //icon.shadow = \"https://labs.google.com/ridefinder/images/mm_20_shadow.png\";
                icon.iconSize = new GSize(30,  24);
                icon.shadowSize = new GSize(22,  20);
                icon.iconAnchor = new GPoint(2,  24);
                icon.infoWindowAnchor = new GPoint(5,  1);
            ";
        }
        $html.="</script>";

        if (isset($params['listeCoordonnees'])) {
            $html.="<script  >";
            foreach ($params['listeCoordonnees'] as $indice => $values) {
                $html.="

                    point$indice = new GLatLng(".$values['latitude'].", ".$values['longitude'].");
                    marker$indice = new GMarker(point$indice, iconMarker);
                    overlay$indice = map.addOverlay(marker$indice);
                    //marker$indice.openInfoWindowHtml(\"".$values['libelle']."\");

                    ";

                if (isset($values['jsCodeOnClickMarker'])) {
                    $html.="
                            function onClickFunction$indice(overlay,  point){".$values['jsCodeOnClickMarker']."}";

                    $html.="GEvent.addListener(marker$indice,  'click',  onClickFunction$indice);";
                }

                if (isset($values['jsCodeOnMouseOverMarker'])) {
                    $html.="function onMouseOverFunction$indice(overlay, point){".$values['jsOnMouseOverMarker']."}";
                    $html.="GEvent.addListener(marker$indice, 'mouseover', onMouseOverFunction$indice);";

                }

                if (isset($values['jsCodeOnMouseOutMarker'])) {
                    $html.="function onMouseOutFunction$indice(overlay, point){".$values['jsCodeOnMouseOutMarker']."}";
                    $html.="GEvent.addListener(marker$indice, 'mouseout', onMouseOutFunction$indice);";

                }

            }
            $html.="</script>";
        }



        return $html;
    }
714963
protected function Page()
    {
        if (!$this->page) {
            $this->page = new Page(Request::GetData('page'));
        }
        return $this->page;
    }
143412
public function hPrintHeader() {
	    $html = '';
	    if($this->getSetting('MAJ_ADD_HTML_HEADER', 0) == 1){
	        if(Auth::accessLevel(Globals::getTree()) >= $this->getSetting('MAJ_SHOW_HTML_HEADER', Auth::PRIV_HIDE)  && !Filter::getBool('noheader')){
	            $html .= $this->getSetting('MAJ_HTML_HEADER', '');
	        }
	    }	
	    return $html;
	}