FuckAdBlock 3.1.1 Copyright (c) 2015 Valentin Allaire <valentin.allaire@sitexw.fr> Released under the MIT license https://github.com/sitexw/FuckAdBlock
189153
function() {
      var ad = React.findDOMNode(this.refs.fakeAd)

      if (ad) {
        if (window.document.body.getAttribute('abp') !== null ||
        ad.offsetParent === null || ad.offsetHeight === 0 ||
        ad.offsetLeft === 0 || ad.offsetTop === 0 ||
        ad.offsetWidth === 0 || ad.clientHeight === 0 ||
        ad.clientWidth === 0) {
          this.setState({ adBlock: true })
        }

        if (window.getComputedStyle !== undefined) {
          var adStyles = window.getComputedStyle(ad, null)

          if (adStyles.getPropertyValue('display') == 'none' ||
          adStyles.getPropertyValue('visibility') == 'hidden') {
            this.setState({ adBlock: true })
          }
        }
      }
    }
253854
function _metadataBlock_Ai(packet, i) {

    // TODO common code
    var Dir;
    if (packet.getDir() == 'up') {
        Dir = util.bufferFromUInt8(0);
    } else if (packet.getDir() == 'down') {
        Dir = util.bufferFromUInt8(1);
    } else {
        throw new Error(errHdr + "expecting direction to be either 'up' or 'down'");
    }

    var Ai_buf = Buffer.concat([
        new Buffer("0100000000", 'hex'), // as spec
        Dir, // direction ('Dir')
        util.reverse(packet.getBuffers().DevAddr),
        util.reverse(packet.getBuffers().FCnt),
        util.bufferFromUInt16LE(0), // upper 2 bytes of FCnt (zeroes)
        util.bufferFromUInt8(0), // 0x00
        util.bufferFromUInt8(i + 1) // block number
    ]);

    return Ai_buf;
}
406959
function afficheAccueil($params=array())
	{
		$t = new Template($this->getCheminPhysique().$this->cheminTemplates);
		$t->set_filenames(array('accueil'=>'accueil.tpl'));
		$html = '';
		$infos = "";

		$calque = new calqueObject();
		$date = new dateObject();
		$auth = new archiAuthentification();

		
		
		if ($auth->estConnecte()) {
			$t->assign_block_vars('estConnecte', array());
		}

		$t->assign_vars(
				array(
						'urlAjoutAdresse'=>$this->creerUrl('', 'ajoutNouveauDossier')
				)
		);

		$adresses = new archiAdresse();

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

		switch($modeAffichage) {
			// **********************************************************************************************************************************
			// PROFIL
			// **********************************************************************************************************************************
			case 'profil':

				$t->assign_block_vars('afficheProfil', array());

				$t->assign_vars(
						array(
								'onglet1'=>"<a href='".$this->creerUrl('', 'afficheAccueil', array('modeAffichage'=>''))."'><font color='#FFFFFF'>"._("Nouveautés")."</font></a>",
								'onglet2'=>_("Mon Profil"),
								'onglet3'=>"<a href='".$this->creerUrl('', 'afficheAccueil', array('modeAffichage'=>'monArchi'))."'><font color='#FFFFFF'>"._("Mon Archi")."</font></a>"
						)
				);


				$u = new archiUtilisateur();
				$s = new objetSession();

				if ($s->isInSession('utilisateurConnecte'.$this->idSite)) {
					$profil = $u->afficher(array(), $s->getFromSession('utilisateurConnecte'.$this->idSite), 'utilisateurProfil');
				} else {
					//header('Location: ?archiAffichage=authentification&archiActionPrecedente=afficheProfil');
					$authentification = new ArchiAuthentification();
					echo $authentification->afficheFormulaireAuthentification();
				}


				$t->assign_vars(array('htmlProfil'=>$profil));
				break;
				//Mon Archi
			case 'monArchi':

				$t->assign_block_vars('afficheMonArchi', array());

				$t->assign_vars(
						array(
								'onglet1'=>"<a href='".$this->creerUrl('', 'afficheAccueil', array('modeAffichage'=>''))."'><font color='#FFFFFF'>"._("Nouveautés")."</font></a>",
								'onglet2'=>"<a href='".$this->creerUrl('', 'afficheAccueil', array('modeAffichage'=>'profil'))."'><font color='#FFFFFF'>"._("Mon Profil")."</font></a>",
								'onglet3'=>_("Mon Archi")
						)
				);

				$utilisateur = new archiUtilisateur();
				$adresse = new archiAdresse();


				$arrayInfosConnexions = $utilisateur->getInfosConnexions($auth->getIdUtilisateur());

				$arrayInfosModifs = $utilisateur->getInfosModifsPerso($auth->getIdUtilisateur());

				$monArchi="<table border=''><tr><td width=500><h2>"._("Mon Archi")."</h2></td></tr></table>";
				if (mysql_fetch_assoc($this->connexionBdd->requete("SELECT idImage FROM historiqueImage WHERE idUtilisateur = '".$auth->getIdUtilisateur()."' AND licence = '3'"))) {
					$monArchi.= "<strong>"._("Certaines de vos images ne sont pas librement réutilisables !")."</strong>";
					$monArchi.="<br/>";
					$monArchi.=_("Cliquez")." <a href='".$this->creerUrl("",  "batchLicence")."'>"._("ici")."</a> "._("pour les publier sous licence libre.");
					$monArchi.="<br/><br/>";
				}
				$monArchi.="<div style='font-size:12px;'>
						<b>"._("En tant qu'utilisateur vous pouvez :")."</b><ul>
						<li> <a href='".$this->creerUrl('', 'ajoutNouveauDossier')."' onmouseover=\"".$calque->getJsContextHelpOnMouseOver(_("En ajoutant votre adresse vous contribuez au développement du site. Mais d\'abord qu\'entend t-on par \"votre adresse\" ? Et bien cela peut être l\'immeuble ou la maison que vous occupez. Un immeuble que vous aimez mais que vous ne trouvez pas sur le site. Avec le développement des appareils photo numériques,  il devient très simple de prendre une photo,  et de la copier sur l\'ordinateur. Ajouter une adresse dans www.archi-strasbourg.org ne prend pas plus de 20 secondes. Copier la photo 10 secondes de plus..."))."\" onmouseout='".$calque->getJSContextHelpOnMouseOut()."'>"._("ajouter des adresses")."</a></li>
						<li> <span onmouseover=\"".$calque->getJsContextHelpOnMouseOver(_("Vous pouvez ajouter des photos afin d'illustrer une adresse."))."\" onmouseout=\"".$calque->getJSContextHelpOnMouseOut()."\"> "._("ajouter des photos à une adresse")."</span></li>
						<li> <span onmouseover=\"".$calque->getJsContextHelpOnMouseOver(_("Vous pouvez ajouter des évènements sur toute adresse qu'un autre utilisateur a créée."))."\" onmouseout=\"".$calque->getJSContextHelpOnMouseOut()."\">"._("ajouter des évènements à une adresse")."</span></li>
						<li> <span onmouseover=\"".$calque->getJsContextHelpOnMouseOver(_("En activant votre alerte mail sur les adresses,  vous serez prevenu de toute modification sur une adresse dont vous êtes l'auteur"))."\" onmouseout=\"".$calque->getJSContextHelpOnMouseOut()."\">"._("être prévenu par mail d'une modification de vos participations")."</span></li>
						<li> <span onmouseover=\"".$calque->getJsContextHelpOnMouseOver(_("En acceptant de recevoir les mails concernant les nouvelles adresses,  vous serez prévenu de l'ajout d'une nouvelle adresse sur le site."))."\" onmouseout=\"".$calque->getJSContextHelpOnMouseOut()."\">"._("être averti des nouvelles adresses")."</span></li>
						<li> <span onmouseover=\"".$calque->getJsContextHelpOnMouseOver(_("Grâce à l'alerte par mail sur les commentaires,  vous pouvez débattre avec les autres utilisateurs."))."\" onmouseout=\"".$calque->getJSContextHelpOnMouseOut()."\">"._("être averti des nouveaux commentaires ajoutés sur une adresse que vous avez créée.")."</span></li></ul>";
				$monArchi.="<b>"._("Vos statistiques :")."</b><br>";
				$monArchi.=""._("Vous vous êtes connecté :")." ".$arrayInfosConnexions['nbConnexions']." fois<br>";
				$monArchi.="&nbsp;&nbsp;&nbsp;"._("Date de votre dernière connexion :")." ".$this->date->toFrench($arrayInfosConnexions['derniereConnexion'])."<br>";

				$monArchi.="<p>
						&nbsp;&nbsp;&nbsp;"._("Nombre d'images modifiées :")." ".$arrayInfosModifs['nbModifImage']."<br />
						&nbsp;&nbsp;&nbsp;"._("Nombre d'images ajoutées :")." ".$arrayInfosModifs['nbAjoutImage']."<br />
						&nbsp;&nbsp;&nbsp;"._("Nombre d'évènements modifiés :")." ".$arrayInfosModifs['nbModifEvenement']."<br />
						&nbsp;&nbsp;&nbsp;"._("Nombre d'évènements ajoutés :")." ".$arrayInfosModifs['nbAjoutEvenement']."</p>";
				// ******************************************************************************************************************************************
				// liste des evenements ajoutés ou modifiés par l'utilisateur
				// ******************************************************************************************************************************************
				$paginationEvenements = new paginationObject();

				// calcul du nombre d'evenements ajoutes ou modifies pour la pagination
				$req = "
						SELECT distinct ha1.idAdresse, he1.dateCreationEvenement as dateCreationEvenement

						FROM evenements he2,  evenements he1
						LEFT JOIN _evenementEvenement ee1 ON ee1.idEvenementAssocie = he1.idEvenement
						LEFT JOIN _adresseEvenement ae ON ae.idEvenement = ee1.idEvenement
						LEFT JOIN historiqueAdresse ha1 ON ha1.idAdresse = ae.idAdresse
						LEFT JOIN historiqueAdresse ha2 ON ha2.idAdresse = ha1.idAdresse

						WHERE he2.idEvenement = he1.idEvenement
						AND he1.idUtilisateur = '".$auth->getIdUtilisateur()."'
								GROUP BY he1.idEvenement,  ha1.idAdresse,  ha1.idHistoriqueAdresse
								HAVING ha1.idHistoriqueAdresse = max(ha2.idHistoriqueAdresse)
								";
				$res = $this->connexionBdd->requete($req);

				//$fetchNbEvenements = mysql_fetch_assoc($res);

				$nbEnregistrementTotaux = mysql_num_rows($res);


				$nbEnregistrementsParPage=5;

				$arrayPaginationEvenements=$paginationEvenements->pagination(
						array(
								'nomParamPageCourante'=>'archiMonArchiEvenementPage',
								'nbEnregistrementsParPage'=>$nbEnregistrementsParPage,
								'nbEnregistrementsTotaux'=>$nbEnregistrementTotaux,
								'typeLiens'=>'noformulaire'
						)
				);



				$req = "
						SELECT distinct ha1.idAdresse as idAdresse, he1.dateCreationEvenement as dateCreationEvenement,  ha1.numero,  ha1.idRue,  ha1.idSousQuartier,  ha1.idQuartier,  ha1.idVille, ha1.idIndicatif,

						ha1.idAdresse as idAdresse,  ha1.numero,  ha1.idQuartier,  ha1.idVille, ind.nom,

						r.nom as nomRue,
						sq.nom as nomSousQuartier,
						q.nom as nomQuartier,
						v.nom as nomVille,
						p.nom as nomPays,
						ha1.numero as numeroAdresse,
						ha1.idRue,
						r.prefixe as prefixeRue,
						IF (ha1.idSousQuartier != 0,  ha1.idSousQuartier,  r.idSousQuartier) AS idSousQuartier,
						IF (ha1.idQuartier != 0,  ha1.idQuartier,  sq.idQuartier) AS idQuartier,
						IF (ha1.idVille != 0,  ha1.idVille,  q.idVille) AS idVille,
						IF (ha1.idPays != 0,  ha1.idPays,  v.idPays) AS idPays,

						ha1.numero as numero,
						ha1.idHistoriqueAdresse,
						ha1.idIndicatif as idIndicatif


						FROM evenements he2,  evenements he1
						LEFT JOIN _evenementEvenement ee1 ON ee1.idEvenementAssocie = he1.idEvenement
						LEFT JOIN _adresseEvenement ae ON ae.idEvenement = ee1.idEvenement
						LEFT JOIN historiqueAdresse ha1 ON ha1.idAdresse = ae.idAdresse
						LEFT JOIN historiqueAdresse ha2 ON ha2.idAdresse = ha1.idAdresse

						LEFT JOIN indicatif ind ON ind.idIndicatif = ha1.idIndicatif

						LEFT JOIN rue r         ON r.idRue = ha1.idRue
						LEFT JOIN sousQuartier sq    ON sq.idSousQuartier = if (ha1.idRue='0' and ha1.idSousQuartier!='0' , ha1.idSousQuartier , r.idSousQuartier )
						LEFT JOIN quartier q        ON q.idQuartier = if (ha1.idRue='0' and ha1.idSousQuartier='0' and ha1.idQuartier!='0' , ha1.idQuartier , sq.idQuartier )
						LEFT JOIN ville v        ON v.idVille = if (ha1.idRue='0' and ha1.idSousQuartier='0' and ha1.idQuartier='0' and ha1.idVille!='0' , ha1.idVille , q.idVille )
						LEFT JOIN pays p        ON p.idPays = if (ha1.idRue='0' and ha1.idSousQuartier='0' and ha1.idQuartier='0' and ha1.idVille='0' and ha1.idPays!='0' , ha1.idPays , v.idPays )


						WHERE he2.idEvenement = he1.idEvenement
						AND he1.idUtilisateur = '".$auth->getIdUtilisateur()."'
								GROUP BY he1.idEvenement,  ha1.idAdresse,  ha1.idHistoriqueAdresse
								HAVING ha1.idHistoriqueAdresse = max(ha2.idHistoriqueAdresse)
								ORDER BY he1.dateCreationEvenement DESC

								";

				$req = $paginationEvenements->addLimitToQuery($req);

				$res = $this->connexionBdd->requete($req);
				$monArchi.="<b>"._("Liste de vos derniers évènements créés :")."</b><br>";
				$monArchi.=$arrayPaginationEvenements['html'];
				$tableauEvenements = new tableau();
				if (mysql_num_rows($res)==0) {
					$monArchi.="<br>"._("Vous n'avez pas encore ajouté d'évènement.")."<br>";
				}
				while ($fetch = mysql_fetch_assoc($res)) {
					$tableauEvenements->addValue($date->toFrench($fetch['dateCreationEvenement']));
					$tableauEvenements->addValue("<a href='".$this->creerUrl('', 'adresseDetail', array('archiIdAdresse'=>$fetch['idAdresse']))."'>".stripslashes($adresse->getIntituleAdresse($fetch))."</a>");
				}

				$monArchi.= $tableauEvenements->createHtmlTableFromArray(2, "font-size:12px;");

				// ******************************************************************************************************************************************
				// liste des adresses ajoutés par l'utilisateur
				// ******************************************************************************************************************************************
				$paginationAdresses = new paginationObject();

				$nbEnregistrementsParPage=5;

				$req = "
						SELECT distinct ha1.idAdresse
						FROM historiqueAdresse ha2,  historiqueAdresse ha1
						LEFT JOIN indicatif ind ON ind.idIndicatif = ha1.idIndicatif
						WHERE ha2.idAdresse = ha1.idAdresse
						AND ha1.idUtilisateur = '".$auth->getIdUtilisateur()."'
								GROUP BY ha1.idAdresse ,  ha1.idHistoriqueAdresse
								HAVING ha1.idHistoriqueAdresse = max(ha2.idHistoriqueAdresse)
								ORDER BY ha1.date DESC
								";

				$res = $this->connexionBdd->requete($req);
				$nbEnregistrementTotaux=mysql_num_rows($res);
				$arrayPaginationAdresses=$paginationAdresses->pagination(
						array(
								'nomParamPageCourante'=>'archiMonArchiAdressesPage',
								'nbEnregistrementsParPage'=>$nbEnregistrementsParPage,
								'nbEnregistrementsTotaux'=>$nbEnregistrementTotaux,
								'typeLiens'=>'noformulaire'
						)
				);

				$req = "
						SELECT distinct ha1.idAdresse as idAdresse, ha1.date as date,  ha1.numero,  ha1.idRue,  ha1.idSousQuartier,  ha1.idQuartier,  ha1.idVille, ha1.idIndicatif,

						ha1.idAdresse as idAdresse,  ha1.numero,  ha1.idQuartier,  ha1.idVille, ind.nom,

						r.nom as nomRue,
						sq.nom as nomSousQuartier,
						q.nom as nomQuartier,
						v.nom as nomVille,
						p.nom as nomPays,
						ha1.numero as numeroAdresse,
						ha1.idRue,
						r.prefixe as prefixeRue,
						IF (ha1.idSousQuartier != 0,  ha1.idSousQuartier,  r.idSousQuartier) AS idSousQuartier,
						IF (ha1.idQuartier != 0,  ha1.idQuartier,  sq.idQuartier) AS idQuartier,
						IF (ha1.idVille != 0,  ha1.idVille,  q.idVille) AS idVille,
						IF (ha1.idPays != 0,  ha1.idPays,  v.idPays) AS idPays,

						ha1.numero as numero,
						ha1.idHistoriqueAdresse,
						ha1.idIndicatif as idIndicatif


						FROM historiqueAdresse ha2,  historiqueAdresse ha1

						LEFT JOIN indicatif ind ON ind.idIndicatif = ha1.idIndicatif

						LEFT JOIN rue r         ON r.idRue = ha1.idRue
						LEFT JOIN sousQuartier sq    ON sq.idSousQuartier = if (ha1.idRue='0' and ha1.idSousQuartier!='0' , ha1.idSousQuartier , r.idSousQuartier )
						LEFT JOIN quartier q        ON q.idQuartier = if (ha1.idRue='0' and ha1.idSousQuartier='0' and ha1.idQuartier!='0' , ha1.idQuartier , sq.idQuartier )
						LEFT JOIN ville v        ON v.idVille = if (ha1.idRue='0' and ha1.idSousQuartier='0' and ha1.idQuartier='0' and ha1.idVille!='0' , ha1.idVille , q.idVille )
						LEFT JOIN pays p        ON p.idPays = if (ha1.idRue='0' and ha1.idSousQuartier='0' and ha1.idQuartier='0' and ha1.idVille='0' and ha1.idPays!='0' , ha1.idPays , v.idPays )
						WHERE ha2.idAdresse = ha1.idAdresse
						AND ha1.idUtilisateur = '".$auth->getIdUtilisateur()."'
								GROUP BY ha1.idAdresse ,  ha1.idHistoriqueAdresse
								HAVING ha1.idHistoriqueAdresse = max(ha2.idHistoriqueAdresse)
								ORDER BY ha1.date DESC
								";
				$req = $paginationAdresses->addLimitToQuery($req);

				$res = $this->connexionBdd->requete($req);
				$monArchi.="<br><b>"._("Liste de vos adresses :")." </b><br>";
				$monArchi.=$arrayPaginationAdresses['html'];
				$tableauAdresse = new tableau();

				if (mysql_num_rows($res)==0) {
					$monArchi.="<br>"._("Vous n'avez pas encore ajouté d'adresse.")."<br>";
				}

				while ($fetch = mysql_fetch_assoc($res)) {
					$tableauAdresse->addValue($date->toFrench($fetch['date']));
					$tableauAdresse->addValue("<a href='".$this->creerUrl('', 'adresseDetail', array('archiIdAdresse'=>$fetch['idAdresse']))."'>".stripslashes($adresse->getIntituleAdresse($fetch))."</a>");
				}

				$monArchi.=$tableauAdresse->createHtmlTableFromArray(2, "font-size:12px;");

				// ******************************************************************************************************************************************
				// liste des adresses ou l'utilisateur a ajouté un commentaire
				// ******************************************************************************************************************************************
				$paginationCommentaires = new paginationObject();
				$nbEnregistrementsParPage=5;
				$req = "

						SELECT c.idCommentaire
						FROM commentaires c
						LEFT JOIN _adresseEvenement ae ON ae.idEvenement = c.idEvenementGroupeAdresse
						LEFT JOIN historiqueAdresse ha1 ON ha1.idAdresse = ae.idAdresse
						LEFT JOIN historiqueAdresse ha2 ON ha2.idAdresse = ha1.idAdresse
						WHERE c.idUtilisateur = '".$auth->getIdUtilisateur()."' OR c.email='".$utilisateur->getMailUtilisateur($auth->getIdUtilisateur())."'
								AND CommentaireValide=1
								GROUP BY ha1.idAdresse,  ha1.idHistoriqueAdresse
								HAVING ha1.idHistoriqueAdresse = max(ha2.idHistoriqueAdresse)
								ORDER BY c.date DESC
								";
				$res = $this->connexionBdd->requete($req);
				$nbEnregistrementTotaux=mysql_num_rows($res);
				$arrayPaginationCommentaires=$paginationCommentaires->pagination(
						array(
								'nomParamPageCourante'=>'archiMonArchiAdressesPage',
								'nbEnregistrementsParPage'=>$nbEnregistrementsParPage,
								'nbEnregistrementsTotaux'=>$nbEnregistrementTotaux,
								'typeLiens'=>'noformulaire'
						)
				);

				$req = "

						SELECT distinct ha1.idAdresse as idAdresse, c.date as dateCommentaire, ha1.date as date,  ha1.numero,  ha1.idRue,  ha1.idSousQuartier,  ha1.idQuartier,  ha1.idVille, ha1.idIndicatif,

						ha1.idAdresse as idAdresse,  ha1.numero,  ha1.idQuartier,  ha1.idVille, ind.nom,

						r.nom as nomRue,
						sq.nom as nomSousQuartier,
						q.nom as nomQuartier,
						v.nom as nomVille,
						p.nom as nomPays,
						ha1.numero as numeroAdresse,
						ha1.idRue,
						r.prefixe as prefixeRue,
						IF (ha1.idSousQuartier != 0,  ha1.idSousQuartier,  r.idSousQuartier) AS idSousQuartier,
						IF (ha1.idQuartier != 0,  ha1.idQuartier,  sq.idQuartier) AS idQuartier,
						IF (ha1.idVille != 0,  ha1.idVille,  q.idVille) AS idVille,
						IF (ha1.idPays != 0,  ha1.idPays,  v.idPays) AS idPays,

						ha1.numero as numero,
						ha1.idHistoriqueAdresse,
						ha1.idIndicatif as idIndicatif

						FROM commentaires c
						LEFT JOIN _adresseEvenement ae ON ae.idEvenement = c.idEvenementGroupeAdresse
						LEFT JOIN historiqueAdresse ha1 ON ha1.idAdresse = ae.idAdresse
						LEFT JOIN historiqueAdresse ha2 ON ha2.idAdresse = ha1.idAdresse

						LEFT JOIN indicatif ind ON ind.idIndicatif = ha1.idIndicatif

						LEFT JOIN rue r         ON r.idRue = ha1.idRue
						LEFT JOIN sousQuartier sq    ON sq.idSousQuartier = if (ha1.idRue='0' and ha1.idSousQuartier!='0' , ha1.idSousQuartier , r.idSousQuartier )
						LEFT JOIN quartier q        ON q.idQuartier = if (ha1.idRue='0' and ha1.idSousQuartier='0' and ha1.idQuartier!='0' , ha1.idQuartier , sq.idQuartier )
						LEFT JOIN ville v        ON v.idVille = if (ha1.idRue='0' and ha1.idSousQuartier='0' and ha1.idQuartier='0' and ha1.idVille!='0' , ha1.idVille , q.idVille )
						LEFT JOIN pays p        ON p.idPays = if (ha1.idRue='0' and ha1.idSousQuartier='0' and ha1.idQuartier='0' and ha1.idVille='0' and ha1.idPays!='0' , ha1.idPays , v.idPays )

						WHERE c.idUtilisateur = '".$auth->getIdUtilisateur()."' OR c.email='".$utilisateur->getMailUtilisateur($auth->getIdUtilisateur())."'
						AND CommentaireValide=1
						GROUP BY ha1.idAdresse,  ha1.idHistoriqueAdresse
						HAVING ha1.idHistoriqueAdresse = max(ha2.idHistoriqueAdresse)
						ORDER BY c.date DESC
								";

				$req = $paginationCommentaires->addLimitToQuery($req);

				$res = $this->connexionBdd->requete($req);
				$monArchi.="<br><b>"._("Liste de vos derniers commentaires :")." </b><br>";
				$monArchi.=$arrayPaginationCommentaires['html'];
				$tableauCommentaires = new tableau();

				if (mysql_num_rows($res)==0) {
					$monArchi.="<br>"._("Vous n'avez pas encore ajouté de commentaire.")."<br>";
				}

				while ($fetch = mysql_fetch_assoc($res)) {
					$tableauCommentaires->addValue($date->toFrench($fetch['dateCommentaire']));
					$tableauCommentaires->addValue("<a href='".$this->creerUrl('', 'adresseDetail', array('archiIdAdresse'=>$fetch['idAdresse']))."'>".stripslashes($adresse->getIntituleAdresse($fetch))."</a>");
				}

				$monArchi.=$tableauCommentaires->createHtmlTableFromArray(2, "font-size:12px;");
				
				
				$monArchi.="<a href=".$this->creerUrl('', 'mesInterets', array()).">Afficher mes interets </a>";

			
				$t->assign_vars(array('htmlMonArchi'=>$monArchi));
				$t->assign_vars(array('calqueHelp'=>$calque->getHtmlDivContextualHelp()));

				break;
				// **********************************************************************************************************************************
				// ACCUEIL
				// **********************************************************************************************************************************
			default:
				$params=array();
				$s = new objetSession();
				if (isset($this->variablesGet['archiIdVilleGeneral']) && $this->variablesGet['archiIdVilleGeneral']!=0 && $this->variablesGet['archiIdVilleGeneral']!='') {
					$params['idVille'] = $this->variablesGet['archiIdVilleGeneral'];
					$s->addToSession('archiIdVilleGeneral', $params['idVille']);
				} elseif ($s->isInSession('archiIdVilleGeneral') && $s->getFromSession('archiIdVilleGeneral')) {
					$params['idVille'] = $s->getFromSession('archiIdVilleGeneral');
					$s->addToSession('archiIdVilleGeneral', $params['idVille']);
				}
				if (isset($this->variablesGet['archiNomVilleGeneral'])
				&& $this->variablesGet['archiNomVilleGeneral']!=''
						) {
					$a = new archiAdresse();

					$params['idVille'] = $a->getIdVilleFromNomVille($this->variablesGet['archiNomVilleGeneral']);

					$_GET['archiIdVilleGeneral'] = $params['idVille'];

					// on place la ville general dans la session ,  ca simplifiera pas mal de choses

					$s->addToSession('archiIdVilleGeneral', $params['idVille']);

				}

				$news = $this->getLatestNewsInfo(1);
					
				//Simple templates
				$t->set_filenames(array('news' => 'accueil/news.tpl'));
				$t->set_filenames(array('derniereModfis' => 'accueil/lastmodifs.tpl'));
				$t->set_filenames(array('commentaire' => 'accueil/commentaire.tpl'));
				$t->set_filenames(array('favoris' => 'accueil/favoris.tpl'));
				$t->set_filenames(array('lastVisit' => 'accueil/lastVisit.tpl'));


				$news['titreCategory'] = 'Actualité de l\'association';
				$news['urlNewsList'] = $this->creerUrl('', 'toutesLesActualites', array());
				$t->assign_block_vars('newsAccueil', $news);
					

				//Gestion pour les commentaires
				$latestComments = $this->getLatestComments(2);
				$t->assign_vars(array(
						'commentaireSectionTitle'=>_("COMMENTAIRES RÉCENTS"),
						'urlListCommentaire' => $this->creerUrl('','tousLesCommentaires')
				));

				foreach ($latestComments as $com){
					$e = new archiEvenement();
					$commentaire = array(
							'date'=> $com['date'],
							'nom' =>  $com['nom'],
							'prenom' => $com['prenom'],
							'adresse' => $com['adresse'],
							'urlAdresse' => $com['urlAdresse'],
							'urlPersonne' => $com['urlPersonne'] ,
							'commentaire' => $com['commentaire']
					);
					$t->assign_block_vars('commentaire', $commentaire);
				}

				$lastModifs = $this->getLatestModification(8);
				foreach ( $lastModifs as $modif ) {
					if(isset($modif['idEvenement']) && $modif['idEvenement']){
						$idAdresse = $modif ['idAdresse'];
						$e = new archiEvenement ();
						$adresseArray = $e->getArrayAdresse ( $modif ['idEvenementGroupeAdresse'], 'idEvenementGroupeAdresse' );
						// Adresse
						$adresse = '';
						$adresse = $e->getAddressText ( $adresseArray );
						$infoImage = array ();
						// Image
						$a = new archiAdresse ();
						
						$reqImageEvtRelated = "				
							SELECT hi.idHistoriqueImage,hi.dateUpload,1 as priorite
							FROM historiqueImage hi
							LEFT JOIN _evenementImage ei on ei.idImage = hi.idImage
							WHERE ei.idEvenement = " . $modif ['idEvenement'] . "
					
									UNION
									
							SELECT hi.idHistoriqueImage,hi.dateUpload,2 as priorite
							FROM `evenements` evt
							LEFT JOIN _evenementEvenement ee ON ee.idEvenementAssocie = evt.idEvenement
							LEFT JOIN evenements evt2 ON evt2.idEvenement = ee.idEvenement
							LEFT JOIN historiqueImage hi on hi.idImage = evt2.idImagePrincipale
							LEFT JOIN _evenementImage ei ON ei.idImage = hi.idImage
							WHERE ee.idEvenement IS NOT NULL
							AND evt.idEvenement IS NOT NULL
							AND evt.idEvenement != 0
							AND ei.idEvenement =" . $modif ['idEvenement'] . "
							AND ee.idEvenement =" . $modif ['idEvenementGroupeAdresse'] . "
							
							ORDER BY priorite DESC
							LIMIT 1
							";
						$resImageEvtRelated = $this->connexionBdd->requete ( $reqImageEvtRelated );
						$arrayImage = mysql_fetch_assoc ( $resImageEvtRelated );
						if (isset ( $arrayImage ) && $arrayImage != '') {
							$infoImage = $arrayImage;
						} else {
							$reqImagePrincipale = "
						
							SELECT hi.idHistoriqueImage,hi.dateUpload
							FROM historiqueImage hi
							LEFT JOIN evenements evt on evt.idImagePrincipale = hi.idImage
							WHERE evt.idEvenement =" . $modif ['idEvenementGroupeAdresse'] . "
							LIMIT 1
							";
							$resImagePrincipale = $this->connexionBdd->requete ( $reqImagePrincipale );
							if (mysql_num_rows ( $reqImagePrincipale ) >= 1) {
								$infoImage = mysql_fetch_assoc ( $resImagePrincipale );
							} else {
								
								$reqOtherImage = "SELECT hi.idHistoriqueImage,hi.dateUpload
							FROM historiqueImage hi
							LEFT JOIN _evenementImage ei ON ei.idImage = hi.idImage
							LEFT JOIN _evenementEvenement ee on ee.idEvenementAssocie = ei.idEvenement
							WHERE ee.idEvenement IS NOT NULL
							AND ee.idEvenement =" . $modif ['idEvenementGroupeAdresse'] . "
							
							LIMIT 1
							";
								$resOtherImage = $this->connexionBdd->requete ( $reqOtherImage );
								if (mysql_num_rows ( $resOtherImage ) >= 1) {
									$infoImage = mysql_fetch_assoc ( $resOtherImage );
								}
							}
						}
						$urlImage = "";
						$urlEvenement = "";
						// Url Evenement
						$idEvenementGroupeAdresses = $e->getIdGroupeEvenement ( $modif ['idEvenement'] );
						if ($modif ['type'] == 'adresse') {
							$urlEvenement = $this->creerUrl ( '', '', array (
									'archiAffichage' => 'adresseDetail',
									'archiIdAdresse' => $idAdresse,
									'archiIdEvenementGroupeAdresse' => $idEvenementGroupeAdresses 
							) );
							// $urlImage = "resizeImage.php?id=".$infoImage['idHistoriqueImage']."&height=200&width=200";
							
							if (isset ( $infoImage ['dateUpload'] ) && isset ( $infoImage ['idHistoriqueImage'] ) && $infoImage ['idHistoriqueImage'] != '' && $infoImage ['dateUpload'] != '') {
								$urlImage = "images/grand/" . $infoImage ['dateUpload'] . "/" . $infoImage ['idHistoriqueImage'] . ".jpg";
							} else {
								$urlImage = "images/placeholder.jpg";
							}
						} else {
							$urlEvenement = $this->creerUrl ( '', '', array (
									'archiAffichage' => 'evenementListe',
									'selection' => "personne",
									'id' => $modif ['idPersonne'] 
							) );
							$urlImage = ArchiPersonne::getImage ( $modif ['idPersonne'], 'resized' );
						}
						
						// Description
						$so = new StringObject ();
						$bbcode = new bbCodeObject ();
						$description = $bbcode->stripBBCode ( $modif ['description'] );
						$description = $so->truncateStringToWord ( $description, 130, ' ', '...' );
						
						$t->assign_block_vars ( 'lastModif', array (
								'miniatureLabelLeft' => $modif ['typeEvenement'],
								'miniatureLabelRight' => $modif ['dateCreationEvenement'],
								'adresse' => ucfirst ( $adresse ),
								'ville' => ucfirst ( $adresseArray [0] ['nomVille'] ),
								'urlMiniature' => $urlImage,
								'urlEvenement' => $urlEvenement,
								'description' => $description,
								'titre' => $modif ['titre'] 
						) );
					}
					else{
						
					}
				}

				 

				//Gestion des dernieres visites
				$t->assign_vars(array('lastVisitTitle' => _("Dernières visites")));
				$lastVisitArray=$_SESSION['lastVisited'];
				if(empty($lastVisitArray)){
					$visite = array('content' => _("Vous n'avez visité aucune adresse pour le moment"));
					$t->assign_block_vars('lastVisitMessage', $visite);
				}
				else{
					foreach ($lastVisitArray as $lastVisit){
						$titre="";
						if($lastVisit['idAdresse'] != '' && $lastVisit['idEvenementGroupeAdresse']!=''){
							$idAdresse = $lastVisit['idAdresse'];
							$e = new archiEvenement();
							$adresseArray = $e->getArrayAdresse($lastVisit['idEvenementGroupeAdresse'], 'idEvenementGroupeAdresse');

							//Adresse
							$adresse = '';
							$adresse = $e->getAddressText($adresseArray);

							//Image
							$requeteImage = "
									SELECT hi.idHistoriqueImage ,hi.dateUpload, e.idEvenement
									FROM historiqueImage hi
									LEFT JOIN evenements e on e.idImagePrincipale = hi.idImage
									WHERE e.idEvenement = ".$lastVisit['idEvenementGroupeAdresse']."
									AND e.idImagePrincipale !=0 
									";
							$resultImage = $this->connexionBdd->requete($requeteImage);
							$array_image = mysql_fetch_assoc($resultImage);
							
								
							$a = new archiAdresse();
							if($array_image['idHistoriqueImage']==0 || !isset($array_image['idHistoriqueImage']) || $array_image['idHistoriqueImage']==''){
								$infoImage = $a->getUrlImageFromAdresse($idAdresse,'moyen');
								$image = new archiImage();
								$resImage = $image->getImagesEvenementsFromAdresse($idAdresse,  $lastVisit);
								$infoImage = mysql_fetch_assoc($resImage);
							}
							else{
								$infoImage=$array_image;
							}

							if(isset($infoImage['dateUpload']) && isset($infoImage['idHistoriqueImage'])&& $infoImage['idHistoriqueImage'] !='' && $infoImage['dateUpload'] !=''){
								$urlImage = "images/grand/".$infoImage['dateUpload']."/".$infoImage['idHistoriqueImage'].".jpg";
							}
							else{
								$urlImage="images/placeholder.jpg";
							}
								
							
							//Url Evenement
							$idEvenementGroupeAdresses = $lastVisit['idEvenementGroupeAdresse'];
							$urlEvenement = $this->creerUrl('', '', array('archiAffichage'=>'adresseDetail','archiIdAdresse'=>$idAdresse,'archiIdEvenementGroupeAdresse'=>$idEvenementGroupeAdresses));
								
								// Description
							$requeteDescription = "
									
									SELECT evt.description
									FROM evenements evt
									LEFT JOIN _evenementEvenement ee ON ee.idEvenementAssocie = evt.idEvenement
									LEFT JOIN positionsEvenements pe ON pe.idEvenementGroupeAdresse = ee.idEvenement
									WHERE ee.idEvenement =" . $lastVisit ['idEvenementGroupeAdresse'] . "
									ORDER BY pe.position
											";
							$resDescription = $this->connexionBdd->requete ( $requeteDescription );
							$arrayDescription = mysql_fetch_assoc($resDescription);
							$so = new StringObject();
							
							$description = $so->sansBalises($arrayDescription['description']);
							$description = stripslashes($description);
							$description = $so->truncateStringToWord($description, 80,' ','...');

							if(isset($lastVisit) && !empty($lastVisit) && isset($lastVisit['idEvenementGroupeAdresse'] )&& !empty($lastVisit['idEvenementGroupeAdresse']) && isset($lastVisit['idAdresse']) && !empty($lastVisit['idAdresse'])){
								//Titre
								$resTitre = $e->getIdEvenementTitre($lastVisit);
								$requeteTitre = "
										SELECT evt.titre
										FROM evenements evt
										WHERE evt.idEvenement = ".$resTitre."
												";
								$resTitre = $this->connexionBdd->requete($requeteTitre);
								$titreArray = mysql_fetch_array($resTitre);
								if($titreArray['titre'] != ''){
									//$titre = $adresse;
									$titre = $titreArray['titre'];
										
								}
								else{
								}
							}

							$visite = array(
									'adresse' => $adresse,
									'urlMiniature' => $urlImage,
									'urlEvenement' => $urlEvenement,
									'description' => $description,
									'titre' => $titre
							);
							$t->assign_block_vars('lastVisit', $visite);
						}
					}
				}


				$t->assign_vars(array(
						'lastModifTitle' => _("Dernières modifications"),
						'urlCustomNewsFeed'=>$this->creerUrl('', 'mesInterets', array())
				));


				//Associate template to the general template
				$t->assign_var_from_handle('news', 'news');
				$t->assign_var_from_handle('dernieresModifs', 'derniereModfis');
				$t->assign_var_from_handle('commentaires', 'commentaire');
				$t->assign_var_from_handle('lastVisits', 'lastVisit');
				
				break;
				

		}

		ob_start();
		$t->pparse('accueil');
		$html .= ob_get_contents();
		ob_end_clean();
		return $html;
	}
1340169
function divmod (q, r, n, d, t) {
        n = n | 0;
        t = t | 0;

        var rn = 0;
        var dt = (d[t - 1] & 0xFF) << 8;
        if (t > 1)
            dt |= (d[t - 2] & 0xFF);

        while (n-- >= t) {
            var z = (rn << 16) | ((r[n] & 0xFF) << 8);
            if (n > 0)
                z |= (r[n - 1] & 0xFF);

            var i = n - t + 1;
            z /= dt;
            rn += mula_small(r, r, i, d, t, -z);
            q[i] = (z + rn) & 0xFF;
            /* rn is 0 or -1 (underflow) */
            mula_small(r, r, i, d, t, -rn);
            rn = r[n] & 0xFF;
            r[n] = 0;
        }

        r[t-1] = rn & 0xFF;
    }
1306586
function templ_rights($attrib)
    {
        // Get supported rights
        $supported = $this->rights_supported();

        // give plugins the opportunity to adjust this list
        $data = $this->rc->plugins->exec_hook('acl_rights_supported',
            array('rights' => $supported, 'folder' => $this->mbox, 'labels' => array()));
        $supported = $data['rights'];

        // depending on server capability either use 'te' or 'd' for deleting msgs
        $deleteright = implode(array_intersect(str_split('ted'), $supported));

        $out = '';
        $ul  = '';
        $input = new html_checkbox();

        // Advanced rights
        $attrib['id'] = 'advancedrights';
        foreach ($supported as $key => $val) {
            $id = "acl$val";
            $ul .= html::tag('li', null,
                $input->show('', array(
                    'name' => "acl[$val]", 'value' => $val, 'id' => $id))
                . html::label(array('for' => $id, 'title' => $this->gettext('longacl'.$val)),
                    $this->gettext('acl'.$val)));
        }

        $out = html::tag('ul', $attrib, $ul, html::$common_attrib);

        // Simple rights
        $ul = '';
        $attrib['id'] = 'simplerights';
        $items = array(
            'read' => 'lrs',
            'write' => 'wi',
            'delete' => $deleteright,
            'other' => preg_replace('/[lrswi'.$deleteright.']/', '', implode($supported)),
        );

        // give plugins the opportunity to adjust this list
        $data = $this->rc->plugins->exec_hook('acl_rights_simple',
            array('rights' => $items, 'folder' => $this->mbox, 'labels' => array(), 'titles' => array()));

        foreach ($data['rights'] as $key => $val) {
            $id = "acl$key";
            $ul .= html::tag('li', null,
                $input->show('', array(
                    'name' => "acl[$val]", 'value' => $val, 'id' => $id))
                . html::label(array('for' => $id, 'title' => $data['titles'][$key] ?: $this->gettext('longacl'.$key)),
                    $data['labels'][$key] ?: $this->gettext('acl'.$key)));
        }

        $out .= "\n" . html::tag('ul', $attrib, $ul, html::$common_attrib);

        $this->rc->output->set_env('acl_items', $data['rights']);

        return $out;
    }
1132216
function checkAtrule(i) {
  let l;

  if (i >= tokensLength) return 0;

  // If token already has a record of being part of an @-rule,
  // return the @-rule's length:
  if (tokens[i].atrule_l !== undefined) return tokens[i].atrule_l;

  // If token is part of an @-rule, save the rule's type to token.
  if (l = checkKeyframesRule(i)) tokens[i].atrule_type = 4;
  // @-rule with ruleset:
  else if (l = checkAtruler(i)) tokens[i].atrule_type = 1;
  // Block @-rule:
  else if (l = checkAtruleb(i)) tokens[i].atrule_type = 2;
  // Single-line @-rule:
  else if (l = checkAtrules(i)) tokens[i].atrule_type = 3;
  else return 0;

  // If token is part of an @-rule, save the rule's length to token:
  tokens[i].atrule_l = l;

  return l;
}
1177646
def method_missing(m, *args, &block)  
        if @tracker_names.include? m
          @tracker_blocks[m] = block
        else
          super(name, *args, &block)
        end
      end
293606
function blockFromRpc (blockParams, uncles) {
  uncles = uncles || []
  const block = new Block({
    transactions: [],
    uncleHeaders: []
  })
  block.header = blockHeaderFromRpc(blockParams)

  block.transactions = (blockParams.transactions || []).map(function (_txParams) {
    const txParams = normalizeTxParams(_txParams)
    // override from address
    const fromAddress = ethUtil.toBuffer(txParams.from)
    delete txParams.from
    const tx = new Transaction(txParams)
    tx._from = fromAddress
    tx.getSenderAddress = function () { return fromAddress }
    // override hash
    const txHash = ethUtil.toBuffer(txParams.hash)
    tx.hash = function () { return txHash }
    return tx
  })
  block.uncleHeaders = uncles.map(function (uncleParams) {
    return blockHeaderFromRpc(uncleParams)
  })

  return block
}
655486
function placehold( $rules ) {
		if( 'development' == WP_ENV || 'staging' == WP_ENV ) {
			$dir = wp_upload_dir();

			$uploads_rel_path = str_replace( trailingslashit( home_url() ), '', $dir['baseurl'] );

			$tp_images_rules = array(
				'',
				'# BEGIN TP Development uploads',
				'RewriteCond %{REQUEST_FILENAME} !-f',
				'RewriteRule ^' . $uploads_rel_path . '/(.*)-([0-9]+)x([0-9]+).(gif|jpe?g|png|bmp)$ http://www.placehold.it/$2x$3 [NC,L]',
				'RewriteCond %{REQUEST_FILENAME} !-f',
				'RewriteRule ^' . $uploads_rel_path . '/(.*)(gif|jpe?g|png|bmp)$ http://www.placehold.it/600x600 [NC,L]',
				'# END TP Development uploads',
				'',
			);

			$rules = explode( "\n", $rules );
			$rules = wp_parse_args( $rules, $tp_images_rules );
			$rules = implode( "\n", $rules );
		}

		return $rules;
	}
1279406
function BlockMap() {

  if( !(this instanceof BlockMap) )
    return new BlockMap()

  this.signature = 0x00000000
  this.version = 0x00000000
  this.sectorNumber = 0x0000000000000000
  this.sectorCount = 0x0000000000000000
  this.dataOffset = 0x0000000000000000
  this.buffersNeeded = 0x00000000
  this.blockDescriptorCount = 0x00000000
  this.reserved1 = 0x00000000
  this.reserved2 = 0x00000000
  this.reserved3 = 0x00000000
  this.reserved4 = 0x00000000
  this.reserved5 = 0x00000000
  this.reserved6 = 0x00000000
  this.checksum = new UDIF.Checksum()
  this.blockCount = 0x00000000
  this.blocks = []

}
207467
function (fnCallbackAsyncL1) {
            /*
             order of artifacts
             1) DELETE files
             2) DELETE folders (starting with upper levels)
             3) CREATE folders (starting with lower levels)
             4) UPDATE folders -> not supported by ADT; but added to flow for completeness
             5) CREATE files
             6) UPDATE files
             */

            // level counter
            aArtifactsSync = aArtifactsSync.map(function (oItem) {
                oItem.levelCount = oItem.id.split('/').length - 1;
                return oItem;
            });

            me._oLogger.logVerbose('Artifacts to Sync: ', aArtifactsSync);

            // sort
            var aDeleteFiles = aArtifactsSync.filter(function (oItem) {
                return (oItem.type === util.OBJECT_TYPE.file && oItem.modif === util.MODIDF.delete);
            });
            var aDeleteFolders = aArtifactsSync.filter(function (oItem) {
                return (oItem.type === util.OBJECT_TYPE.folder && oItem.modif === util.MODIDF.delete);
            }).sort(function (oItem1, oItem2) {
                if (oItem1.levelCount > oItem2.levelCount) {
                    return -1;
                }
                if (oItem1.levelCount < oItem2.levelCount) {
                    return 1;
                }
                return 0;
            });

            var aCreateFolders = aArtifactsSync.filter(function (oItem) {
                return (oItem.type === util.OBJECT_TYPE.folder && oItem.modif === util.MODIDF.create);
            }).sort(function (oItem1, oItem2) {
                if (oItem1.levelCount < oItem2.levelCount) {
                    return -1;
                }
                if (oItem1.levelCount > oItem2.levelCount) {
                    return 1;
                }
                return 0;
            });
            var aUpdateFolders = aArtifactsSync.filter(function (oItem) {
                return (oItem.type === util.OBJECT_TYPE.folder && oItem.modif === util.MODIDF.update);
            });
            var aCreateFiles = aArtifactsSync.filter(function (oItem) {
                return (oItem.type === util.OBJECT_TYPE.file && oItem.modif === util.MODIDF.create);
            });
            var aUpdateFiles = aArtifactsSync.filter(function (oItem) {
                return (oItem.type === util.OBJECT_TYPE.file && oItem.modif === util.MODIDF.update);
            });

            aArtifactsSync = aDeleteFiles.concat(aDeleteFolders, aCreateFolders, aUpdateFolders, aCreateFiles, aUpdateFiles);
            aArtifactsSyncWork = aArtifactsSync.slice(0);

            fnCallbackAsyncL1(null, null);
        }
1276276
public Rule HtmlBlock() {
        return NodeSequence(
                FirstOf(HtmlBlockInTags(), HtmlComment(), HtmlBlockSelfClosing()),
                push(new HtmlBlockNode(ext(SUPPRESS_HTML_BLOCKS) ? "" : match())),
                BlankLine()
        );
    }
1134768
public function index() {

        $moufUI = getenv('MOUF_UI');
        if ($moufUI !== false) {
            $moufUI = (bool) $moufUI;
            if (!$moufUI) {
                header('HTTP/1.1 403 Forbidden');
                echo 'Error! Access to Mouf UI is forbidden on this environment (env variable MOUF_UI is set to 0)';
                exit;
            }
        }
        unset($moufUI);

		if (!extension_loaded("curl")) {
			$this->contentBlock->addFile(dirname(__FILE__)."/../../views/mouf_installer/missing_curl.php", $this);
		} else {
			$this->contentBlock->addFile(dirname(__FILE__)."/../../views/mouf_installer/welcome.php", $this);
		}
		
		$this->template->toHtml();	
	}
195038
protected function aliasAtRules()
    {
        if (empty($this->aliases['at-rules'])) {

            return;
        }

        $aliases = $this->aliases['at-rules'];
        $regex = Regex::$patt;

        foreach ($aliases as $at_rule => $at_rule_aliases) {

            $matches = $this->string->matchAll("~@$at_rule" . '[\s{]~i');

            // Find at-rules that we want to alias.
            while ($match = array_pop($matches)) {

                $curly_match = new BalancedMatch($this->string, $match[0][1]);

                if (! $curly_match->match) {
                    // Couldn't match the block.
                    continue;
                }

                // Build up string with aliased blocks for splicing.
                $original_block = $curly_match->whole();
                $new_blocks = [];

                foreach ($at_rule_aliases as $alias) {

                    // Copy original block, replacing at-rule with alias name.
                    $copy_block = str_replace("@$at_rule", "@$alias", $original_block);

                    // Aliases are nearly always prefixed, capture the current vendor name.
                    preg_match($regex->vendorPrefix, $alias, $vendor);

                    $vendor = $vendor ? $vendor[1] : null;

                    // Duplicate rules.
                    if (preg_match_all($regex->r_token, $copy_block, $copy_matches)) {

                        $originals = [];
                        $replacements = [];

                        foreach ($copy_matches[0] as $rule_label) {

                            // Clone the matched rule.
                            $originals[] = $rule_label;
                            $clone_rule = clone $this->tokens->get($rule_label);

                            $clone_rule->vendorContext = $vendor;

                            // Store the clone.
                            $replacements[] = $this->tokens->add($clone_rule);
                        }

                        // Finally replace the original labels with the cloned rule labels.
                        $copy_block = str_replace($originals, $replacements, $copy_block);
                    }

                    // Add the copied block to the stack.
                    $new_blocks[] = $copy_block;
                }

                // The original version is always pushed last in the list.
                $new_blocks[] = $original_block;

                // Splice in the blocks.
                $curly_match->replace(implode("\n", $new_blocks));
            }
        }
    }
993904
public function index()
    {
        $this->loadModel('Block.Blocks');
        if ($this->request->isPost()) {
            if ($this->_reorder()) {
                $this->Flash->success(__d('block', 'Blocks ordering updated!'));
            }
            $this->redirect(['plugin' => 'Block', 'controller' => 'manage', 'action' => 'index']);
        }

        $front = $this->Blocks->inFrontTheme();
        $back = $this->Blocks->inBackTheme();
        $unused = $this->Blocks->unused();

        $this->set(compact('front', 'back', 'unused'));
        $this->title(__d('block', 'Site Blocks'));
        $this->Breadcrumb
            ->push('/admin/system/structure')
            ->push(__d('block', 'Manage Blocks'), '#');
    }
325104
function(){
		var i = filters.length,
		    x = 0,
		    urlObj = url.parse(this.url, parseQueryString=false);

		while (x < i) {
			if(filters[x].domain === urlObj.hostname){
				for (var y = 0; y < filters[x].hCardBlockList.length; y++) {
					delete this.representativehCard.properties[filters[x].hCardBlockList[y]];
				}
			}
			x++;
		}
	}
908548
function normalizeObjectMultipleRedirectionRule(redirectTo) {
    var redirectionMap = {};

    angular.forEach(redirectTo, function (redirection, permission) {
      if (isInjectable(redirection)) {
        redirectionMap[permission] = redirection;
      } else {
        if (angular.isFunction(redirection)) {
          redirectionMap[permission] = redirection;
          redirectionMap[permission].$inject = [];
        }
      }

      if (angular.isObject(redirection)) {
        redirectionMap[permission] = function () {
          return redirection;
        };
        redirectionMap[permission].$inject = [];
      }

      if (angular.isString(redirection)) {
        redirectionMap[permission] = function () {
          return {state: redirection};
        };
        redirectionMap[permission].$inject = [];
      }
    });

    return redirectionMap;
  }