/** * Redirige vers une URL, et termine le script * @param string url l'URL de destination */ function redirige($url) { ActionsModules::instance()->appel_module("redirige", $url); if (!Tlog::instance()->afficher_redirections($url)) { header("Location: " . $url); } exit; }
/** * * * * @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(); }
<?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");
</div> </div><!-- fin div id=wrapper --> <hr> <?php ActionsAdminModules::instance()->inclure_module_admin("pied_top"); ?> <footer class="modal-footer"> <div class="container"> <p>© Thelia 2012 - <a href="http://www.openstudio.fr/" target="_blank">Édité par OpenStudio</a> - <a href="http://forum.thelia.net/" target="_blank">Forum Thelia</a> - <a href="http://contrib.thelia.net/" target="_blank">Contributions Thelia</a> <span class="pull-right">interface par <a target="_blank" href="http://www.steaw-webdesign.com/">Steaw-Webdesign</a></span> </p> </div> </footer> </div> <!-- fin div class=bg-image --> <?php ActionsAdminModules::instance()->inclure_module_admin("post"); // Le parametre est passé par reference: utiliser un variable intermédiaire $tmp = ""; Tlog::ecrire($tmp); echo $tmp;
// Vérif panier if ($panier && !$_SESSION["navig"]->panier->nbart) { redirige(urlfond()); } $parseur = new Parseur(); // fonctions à éxecuter avant les inclusions ActionsModules::instance()->appel_module("inclusion"); // inclusion $parseur->inclusion($res); // inclusions des plugins ActionsModules::instance()->appel_module("action"); $res = $parseur->analyse($res); ActionsModules::instance()->appel_module("analyse"); Filtres::exec($res); $res = $parseur->post($res); // inclusions des plugins filtres ActionsModules::instance()->appel_module("post"); Tlog::ecrire($res); // Résultat envoyé au navigateur $res = preg_replace("/(^[\r\n]*|[\r\n]+)[\\s\t]*[\r\n]+/", "\n", $res); if ($sortie) { echo $res; } // fonctions à éxecuter apres l'affichage du template ActionsModules::instance()->appel_module("apres"); // Reset de la commande if ($reset) { $_SESSION["navig"]->commande = new Commande(); $_SESSION["navig"]->panier = new Panier(); $_SESSION['navig']->promo = new Promo(); }
<?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');
function __construct() { parent::init(); }
/*************************************************************************************/ if (strstr($_SERVER['PHP_SELF'], "/admin/")) { header("Location: changerep.php"); exit; } define('THELIA_MAGIC_QUOTE_ENABLED', get_magic_quotes_gpc()); require_once __DIR__ . "/../fonctions/error_reporting.php"; require_once __DIR__ . "/autoload.php"; require_once __DIR__ . "/../lib/TheliaPurifier.php"; function _sanitize_param($value, $config = null) { if (is_array($value)) { foreach ($value as $key => $item) { $value[$key] = _sanitize_param($item, $config); } return $value; } else { if (THELIA_MAGIC_QUOTE_ENABLED) { $value = stripcslashes($value); } return TheliaPurifier::instance()->purifier($value); } } ActionsLang::instance()->set_mode_backoffice(true); Tlog::mode_back_office(true); require_once __DIR__ . "/../fonctions/divers.php"; // Put sanitize_admin value to 0 into variable table if you don't want to sanitize (escaping) $_REQUEST parameters TheliaPurifier::instance()->set_admin_mode(); foreach ($_REQUEST as $key => $value) { ${$key} = Variable::lire('sanitize_admin', 1) ? _sanitize_param($value) : $value; }
// загружаем функции include_once "../../../inc/login.php"; // загружаем функции include_once "../../../inc/lbfunc.php"; // загружаем функции //include_once("../../../class/smstower.class.php"); include_once "../../../autorun/sms.php"; // запускаем сторонние скрипты //$sms=new SMSTowers; //$sms->GetLoginPassSMSTowerFromBase(); $sms = new SmsAgent(); $sms->Login(); $blibase = _GET('blibase'); $sms->sender = GetSMSSender($blibase, $sms->sender); //echo "$sms->sender\n"; $lg = new Tlog(); $lg->Save(2, "Стартовал групповую отправку СМС"); $sql = "select * from smslist where status<>'send'"; $result = $sqlcn->ExecuteSQL($sql) or die("Не могу выбрать!" . mysqli_error($sqlcn->idsqlconnection)); while ($row = mysqli_fetch_array($result)) { $id = $row["id"]; $mobile = $row["mobile"]; $smstxt = $row["smstxt"]; $res = $sms->sendSMS($mobile, $smstxt); if (is_array($res) == true) { //var_dump($res); $idmess = $res[0]["id"]; $res = 'ok'; } if ($res == "ok") { $res = $sms->getStatus($idmess);
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");
private function getMemcache() { if (self::$LEVEL != self::MEMCACHE_CACHE) { return null; } if ($this->memcache === false) { $this->memcache = new Memcache(); if (!$this->memcache->connect('localhost')) { Tlog::fatal("Echec de connexion au serveur memcache. Arrêt."); die("Echec de connexion au serveur memcache. Arrêt."); } } return $this->memcache; }