/**
  * 
  * 
  * 
  * @param string $query
  * @param int $currentPage
  * @param int $maxPagesDisplayed
  * @param int $viewPerPage
  */
 public function __construct($query, $currentPage, $maxPagesDisplayed = 15, $viewPerPage = 30)
 {
     parent::__construct();
     $this->maxPagesDisplayed = $maxPagesDisplayed;
     $this->viewPerPage = $viewPerPage;
     $this->currentPage = $currentPage;
     try {
         $resul = $this->query($query, true);
         $this->totalResults = $this->get_result($resul, 0);
     } catch (Exception $e) {
         Tlog::error($e->getMessage());
         $this->totalResults = 0;
     }
     $this->calculatePages();
 }
Example #2
0
<?php

require_once "auth.php";
require_once "../fonctions/divers.php";
if (!est_autorise("acces_configuration")) {
    exit;
}
require __DIR__ . '/liste/plugins.php';
$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
$errorCode = 0;
$errorMessage = "";
try {
    ActionsAdminModules::instance()->action($request);
} catch (TheliaException $e) {
    Tlog::error($e->getMessage());
    $errorCode = $e->getCode();
    $errorMessage = $e->getMessage();
}
// Mise a jour de la base suivant le contenu du repertoire plugins
ActionsAdminModules::instance()->mettre_a_jour();
?>
<!DOCTYPE html>
<html lang="fr">
    <head>
        <?php 
require_once "title.php";
?>
    </head>
<body>
<?php 
ActionsAdminModules::instance()->inclure_module_admin("plugins_top");
Example #3
0
<?php

if (strstr($_SERVER['PHP_SELF'], "/admin/")) {
    header("Location: changerep.php");
    exit;
}
require_once __DIR__ . "/../fonctions/error_reporting.php";
require_once __DIR__ . "/autoload.php";
ActionsLang::instance()->set_mode_backoffice(true);
Tlog::mode_back_office(true);
require_once __DIR__ . "/../fonctions/divers.php";
foreach ($_REQUEST as $key => $value) {
    ${$key} = $value;
}
if (!ini_get("date.timezone")) {
    date_default_timezone_set("Europe/Paris");
    Tlog::error("Timezone not set, set to Europe/Paris for no errors");
}
setlocale(LC_TIME, 'fr_FR.utf8', 'fr_FR');
setlocale(LC_NUMERIC, 'en_US.utf8', 'en_US');
 public function executeCountQuery($query, $alias = 'nb', $default = 0)
 {
     $num = CacheBase::getCache()->get($query);
     if ($num < 0 || $num == "") {
         try {
             $resul = $this->query($query, true);
             $num = $this->get_result($resul, 0, $alias);
         } catch (Exception $e) {
             Tlog::error("error for this query : " . $query);
             Tlog::error($e->getMessage());
             return $default;
         }
         CacheBase::getCache()->set($query, $num);
     }
     return $num;
 }
<?php

require_once __DIR__ . "/auth.php";
if (!est_autorise("acces_configuration")) {
    exit;
}
$request = Symfony\Component\HttpFoundation\Request::createFromGlobals();
$errorCode = 0;
try {
    ActionsAdminMessage::getInstance()->action($request);
} catch (TheliaAdminException $e) {
    Tlog::error($e->getCode());
    $errorCode = $e->getCode();
}
if (!isset($lang)) {
    $lang = ActionsLang::instance()->get_id_langue_courante();
}
$message = new Message();
$message->charger_id($request->query->get("id"));
$messagedesc = new Messagedesc($message->id, $lang);
?>
<!DOCTYPE html>
<html lang="fr">
    <head>
        <?php 
require_once "title.php";
?>
    </head>
<body>
<?php 
ActionsAdminModules::instance()->inclure_module_admin("message_modifier_top");