コード例 #1
0
 /**
  * Recover a specific verse from the holy bible
  * @author Jonathan Sandoval <[jonathan_s_pisis@yahoo.com.mx]>
  * 
  * @param  integer $book    The number of Book
  * @param  integer $chapter The number of Chapter
  * @param  integer $verse   The number of Verse
  * @return string           The Current verse
  */
 static function findVerse($book = 1, $chapter = 1, $verse = 1)
 {
     $myLang = LanguageSupport::getActualLanguage();
     if ($myLang == 'es') {
         //getting the book's text
         $text = self::getBookText($book, $myLang);
         //find the chapter
         $chapterNombre = self::numberBookToName($book) . " {$chapter}";
         $posInicio = stripos($text, $chapterNombre);
         //cut since the beggin
         $inicioCapitulo = substr($text, $posInicio + strlen($chapterNombre));
         //Eval verse
         $vers = $verse;
         $posVerse = stripos($inicioCapitulo, strval($vers));
         $text = substr($inicioCapitulo, $posVerse);
         $vers = $vers + 1;
         $posVerse = stripos($text, strval($vers));
         $text = substr($text, 0, $posVerse);
         //remove until the point
         $posPoint = strpos($text, ".");
         if ($posPoint === false) {
             $text = substr($text, strlen(strval($verse)));
         } else {
             $text = substr($text, strlen(strval($verse)), $posPoint);
         }
         $text = str_replace("<br>", " ", $text);
         return $text;
     } else {
         if ($myLang == 'en') {
             //getting the book's text
             $text = self::getBookText($book, 'en');
             //find verse
             $verseNotation = "{" . $chapter . ":" . $verse . "}";
             $posVerse = stripos($text, $verseNotation);
             $text = substr($text, $posVerse + strlen($verseNotation));
             //remove until the key
             $posKey = strpos($text, "{");
             if ($posPoint !== false) {
                 $text = substr($text, 0, $posKey);
             }
             //remove until the point
             $posPoint = strpos($text, ".");
             if ($posPoint !== false) {
                 $text = substr($text, 0, $posKey);
             }
             $text = str_replace("<br>", " ", $text);
             return $text;
         }
     }
 }
コード例 #2
0
<?php

require_once __DIR__ . "/../../Backend/SessionManager.php";
require_once __DIR__ . "/../../Backend/CityManager.php";
require_once __DIR__ . "/../../Backend/LanguageSupport.php";
SessionManager::validateUserInPage('NoticeOfPrivacy.php');
//Get File Contest
$string = file_get_contents("template/NoticeOfPrivacy.html");
//Remplace the nav
$string = str_replace("|NavBar|", SessionManager::getNavBar(), $string);
$notice = "";
if (LanguageSupport::getActualLanguage() == 'es') {
    $notice = "Le informamos que sus datos personales recabados a través de sus solicitudes \n                   acudiendo a alguna iglesia de la Zona Metropolitana del estado de Jalisco, \n                   son incorporadas, protegidas y tratadas en los sistemas de datos personales del \n                   Arzobispado de Guadalajara para el ejercicio de las facultades de esta \n                   institución, y sólo pueden ser proporcionados en los términos establecidos en el \n                   Artículo 69 del Código Fiscal de la Federación.\n                   <br><br>\n                   Si desea modificar o corregir sus datos personales, puede hacerlo a través de \n                   acudir a cualquier iglesia donde ya haya hecho algun trámite o \n                   directamente en la oficina central.\n                   <br><br>\n                   Lo anterior se informa en cumplimiento del Lineamiento Decimoséptimo de los \n                   Lineamientos de Protección de Datos Personales, publicados en el Diario Oficial \n                   de la Federación el 30 de septiembre de 2005.";
} else {
    $notice = "We inform the personal data that is received through his request            \n                   going to a church of the Metropolitan Zone of the State of Jalisco,        \n                   are incorpored, protected and storage in the systems of the personal data by  \n                   Arzobispado de Guadalajara for the execution of the faculties of this  \n                   institution and only can be received in the established center in the          \n                   'Artículo 69 del Código Fiscal de la Federación'.\n                   <br><br>\n                   if you want to change or update his personal data could done through of \n                   going to any church that you was done a request or go to the central office.\n                   <br><br>\n                   The Before inform the fulfillment of the 'Lineamiento Decimoséptimo' of \n                   'Lineamientos de Protección de Datos Personales', publish in the official diary   \n                   of the Federation September 30th 2005.";
}
$string = str_replace("|NoticeOfPrivacy|", $notice, $string);
//Display the page
$string = LanguageSupport::HTMLEvalLanguage($string);
echo $string;
コード例 #3
0
require_once __DIR__ . "/../../Backend/SessionManager.php";
require_once __DIR__ . "/../../Backend/LanguageSupport.php";
SessionManager::validateUserInPage('config.php');
//Get File Contest
$string = file_get_contents("template/Config.html");
//Remplace the nav
$string = str_replace("|NavBar|", SessionManager::getNavBar(), $string);
//Get the alert to keep
$alert = "";
if (isset($_GET) && $_GET["success"] === 'true') {
    $alert = '  <div class="alert alert-success" role="alert" style="text-align: center;">
                        <h3>^Successful Change^</h3>
                    </div>';
}
//Set the language of the select
$actualLanguage = LanguageSupport::getActualLanguage();
if ($actualLanguage === 'en') {
    $string = str_replace("|isEnglish|", 'selected', $string);
} else {
    if ($actualLanguage === 'en') {
        $string = str_replace("|isEnglish|", 'selected', $string);
    }
}
$string = str_replace("|Alert|", $alert, $string);
//Get the data value
$user = SessionManager::getCurrentUser();
$paperConfig = SessionManager::getSinglePaperConfig('id', $user->getIdPaperConfig());
$cbcx = $paperConfig->getCopyBaptismCertX();
$cbcy = $paperConfig->getCopyBaptismCertY();
$bcx = $paperConfig->getBaptismCertX();
$bcy = $paperConfig->getBaptismCertY();