示例#1
0
 public function __construct(&$doorGets, $dataInfo = array())
 {
     $this->dataInfo = $dataInfo;
     $this->doorGets = $doorGets;
     $this->installDB = new DoDatabaseInstaller($doorGets);
     parent::__construct($doorGets->myLanguage);
 }
示例#2
0
 public function __construct($lg = 'fr')
 {
     parent::__construct($lg);
     $this->lg = URL . 't/' . $lg . '/';
     $base = $this->lg;
     $this->xmlOut = '<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
     $this->xmlOut .= "<url><loc>{$base}</loc><priority>1.00</priority><changefreq>daily</changefreq></url>";
     $this->Gen();
     $this->xmlOut .= '</urlset>';
     $fileSitemap = BASE . 'sitemap.xml';
     $newXml = new SimpleXMLElement($this->xmlOut);
     $newXml->asXML($fileSitemap);
     $aL = $this->allLanguages;
     foreach ($aL as $k => $v) {
         parent::__construct($k);
         $this->lg = URL . 't/' . $k . '/';
         $base = $this->lg;
         $this->xmlOut = '';
         $this->xmlOut = '<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
         $this->xmlOut .= "<url><loc>{$base}</loc><priority>1.00</priority><changefreq>daily</changefreq></url>";
         $this->Gen();
         $this->xmlOut .= '</urlset>';
         $fileSitemap = BASE . 't/' . $k . '/sitemap.xml';
         $newXml = new SimpleXMLElement($this->xmlOut);
         $newXml->asXML($fileSitemap);
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->getParams();
     $hasOneclickInstaller = $this->isOneclickInstaller();
     if ($hasOneclickInstaller) {
         $this->checkModulesAndExtensions();
         $this->initOneclickInstaller();
     } else {
         $this->init();
     }
 }
 function index()
 {
     $this->load->helper('text');
     $this->load->helper('security');
     //appel formulaire
     $this->load->helper(array('form', 'url'));
     $this->load->library('form_validation');
     //Regle de validation
     //appel de l'object
     if (isset($_POST['idLangue']) && !empty($_POST['idLangue'])) {
         $id = $_POST['idLangue'];
         //echo "id : ".$id."<br>";
         $this->form_validation->set_rules('idLangue', 'Id dle la langue', 'trim');
         $object = $this->doctrine->em->find('langue', $id);
     } else {
         $object = new Langue();
     }
     if (isset($_POST['langue']) && !empty($_POST['langue'])) {
         //echo "texte : ".$_POST['texte']."<br>";
         $this->form_validation->set_rules('langue', 'texte de la langue', 'trim|xss_clean');
         $object->setLangue(utf8_decode($_POST['langue']));
     }
     if ($this->form_validation->run() == FALSE) {
         //echo 'test false';
         $titre = "Langue";
         $this->layout->set_titre($titre);
         $this->layout->th_default();
         if (isset($id)) {
             $object = $this->doctrine->em->find('langue', $id);
             $this->load->view('langue/vEdit', array('titre' => $titre, 'langue' => $object));
         } else {
             $this->load->view('langue/vAdd', array('texte' => $object));
         }
     } else {
         //echo 'test true';
         $this->doctrine->em->persist($object);
         $this->doctrine->em->flush();
         redirect('cLangue', 'refresh');
     }
 }
示例#5
0
 public function createCarouselInstance($name, $title)
 {
     $data['uri'] = $name;
     $data['id_user'] = 0;
     $data['id_groupe'] = 0;
     $data['date_creation'] = time();
     $iCrud = new Langue();
     $id = $iCrud->dbQI($data, '_dg_carousel');
     $groupe_traduction = array();
     $contentCarousel = serialize(array());
     foreach ($this->doorGets->getAllLanguages() as $k => $v) {
         $dataTraduction['titre'] = $title;
         $dataTraduction['uri_module'] = $name;
         $dataTraduction['id_carousel'] = $id;
         $dataTraduction['langue'] = $k;
         $dataTraduction['article_tinymce'] = $contentCarousel;
         $dataTraduction['date_modification'] = time();
         $groupe_traduction[$k] = $iCrud->dbQI($dataTraduction, '_dg_carousel_traduction');
     }
     $data['groupe_traduction'] = @serialize($groupe_traduction);
     $iCrud->dbQU($id, $data, '_dg_carousel');
 }
 /**
  * Load Langue model
  * @param integer $id
  * @return Langue
  * @throws CHttpException
  */
 protected function loadModel($id = null)
 {
     if (null === $id) {
         $model = new Langue();
     } else {
         $model = Langue::model()->findByPk($id);
     }
     if ($model instanceof CModel) {
         $model->titleField = 'name';
         return $model;
     }
     throw new CHttpException(404, 'Item not found');
 }
示例#7
0
 public function __construct()
 {
     parent::__construct();
     $this->getParams();
     $hasOneclickInstaller = $this->isOneclickInstaller();
     if ($hasOneclickInstaller) {
         $this->checkModulesAndExtensions();
         $this->initOneclickInstaller();
     } else {
         $this->init();
     }
     $this->hasRtl = $this->Language === 'iw' || $this->Language === 'ar' ? true : false;
 }
示例#8
0
文件: GenRss.php 项目: neoartdoo/CMS
 public function __construct($init = 0, $lg = "fr")
 {
     parent::__construct($lg);
     $this->loadModuleValid();
     if (!empty($_GET) && empty($init)) {
         foreach ($_GET as $k => $v) {
             if (array_key_exists($k, $this->ModulesInfo)) {
                 $this->simpleModuleToRss($k);
             }
         }
     } else {
         $this->Get = $this->getAllToRss();
     }
 }
示例#9
0
 public function __destruct()
 {
     parent::__destruct();
     $timeend = microtime(true);
     $this->timeExecution = number_format($timeend - $this->timeExecution, 3);
     //echo $this->timeExecution;
 }
<?php

global $edb_model;
$ue = $edb_model->get($_GET['ue_num']);
$langue = new Langue();
$edb_model->process_action();
?>

<header class="page-header">
    <h2>Edition de l'UE <small><b>[<?php 
echo $ue->ue_code;
?>
]</b> <?php 
echo $ue->lang[0]->ue_libelle;
?>
</small></h2>
</header>

<div class="row">

    <form action="<?php 
echo $_SERVER['REQUEST_URI'];
?>
" method="POST">

        <div class="col-xs-8">

            <ul class="nav nav-tabs" role="tablist">
                <?php 
$i = 0;
foreach ($ue->lang as $lang) {
示例#11
0
 public function __destruct()
 {
     parent::__destruct();
 }
示例#12
0
// Hidden
Xform::startRow('hidden');
Xform::addText('_token', 'x', Session::getToken(), 2);
Xform::addText('id', 'ID', $datas->id, 2);
Xform::addText('backUrl', '', $param['backUrl']);
Xform::addText('user_id', 'USER_ID', Auth::user()->id, 1);
Xform::endRow();
// Get Fields
Xform::startRow();
Xform::addText('nom', 'Nom', $datas->nom, 4);
Xform::addText('prenom', 'Prénom', $datas->prenom, 4);
Xform::addDate('naissance', 'Date de naissance', $datas->naissance, 4);
Xform::endRow();
Xform::startRow();
Xform::addSelect('nation_id', Nation::lists('libelle', 'id'), 'Nationalité', $datas->nation_id, 3);
Xform::addSelect('langue_id', Langue::lists('libelle', 'id'), 'Langue', $datas->langue_id, 3);
Xform::addText('Tel1', 'Téléphone', $datas->tel1, 3);
Xform::endRow();
Xform::startRow();
Xform::addSelect('selectNation_id', Nation::lists('libelle', 'id'), 'Pays', $datas->club->region->nation->id, 3);
Xform::addSelect('region_id', Region::listRegionsOneNation($datas->club->region->nation->id), 'Region', $datas->club->region->id, 3);
Xform::addSelect('club_id', Club::listClubsOneRegion($datas->club->region->id), 'Club', $datas->club_id, 4);
Xform::endRow();
Xform::startRow();
Xform::addText('licence', 'N° licence', $datas->licence, 3);
Xform::addSelect('statusplayer_id', Statusplayer::lists('libelle', 'id'), 'Status', $datas->statusplayer_id, 2);
Xform::addText('hcp', 'Hcp (index)', $datas->hcp, 2);
Xform::addSelect('sexe_id', Sexe::lists('libelle', 'id'), 'Cat', $datas->sexe_id, 2);
Xform::endRow();
// Buttons
Xform::addSubmit();
示例#13
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Eloquent::unguard();
     // 1 Statussocial
     DB::table('statussocials')->delete();
     Statussocial::create(array('libelle' => 'Privé'));
     Statussocial::create(array('libelle' => 'Indépendant'));
     Statussocial::create(array('libelle' => 'Société'));
     // 2 Langue
     DB::table('langues')->delete();
     Langue::create(array('libelle' => 'fr'));
     Langue::create(array('libelle' => 'en'));
     Langue::create(array('libelle' => 'nl'));
     // 3 Sexe
     DB::table('sexes')->delete();
     Sexe::create(array('libelle' => 'Messieurs'));
     Sexe::create(array('libelle' => 'Dames'));
     // 4 Genre Compet
     DB::table('genrecompets')->delete();
     Genrecompet::create(array('libelle' => 'Public'));
     Genrecompet::create(array('libelle' => 'Invitations'));
     Genrecompet::create(array('libelle' => 'Membres'));
     // 5 Type Compet
     DB::table('typecompets')->delete();
     Typecompet::create(array('libelle' => '---', 'nbplayers' => 0));
     Typecompet::create(array('libelle' => 'Individuel', 'nbplayers' => 1));
     Typecompet::create(array('libelle' => 'Equipe 2 joueurs', 'nbplayers' => 2));
     Typecompet::create(array('libelle' => 'Equipe 3 joueurs', 'nbplayers' => 3));
     Typecompet::create(array('libelle' => 'Equipe 4 joueurs', 'nbplayers' => 4));
     // 6 Mode Compet
     DB::table('modecompets')->delete();
     Modecompet::create(array('libelle' => 'Stroke-Play', 'abreviation' => 'Stp'));
     Modecompet::create(array('libelle' => 'Stabelford', 'abreviation' => 'Stb'));
     Modecompet::create(array('libelle' => 'Match-Play', 'abreviation' => 'Mp'));
     // 7 Status Compet
     DB::table('statuscompets')->delete();
     Statuscompet::create(array('libelle' => 'Création'));
     Statuscompet::create(array('libelle' => 'Inscriptions ouvertes'));
     Statuscompet::create(array('libelle' => 'Inscriptions fermées'));
     Statuscompet::create(array('libelle' => 'En cours'));
     Statuscompet::create(array('libelle' => 'Cloturée'));
     Statuscompet::create(array('libelle' => 'Annulée'));
     // 8 Formule Compet
     DB::table('formulecompets')->delete();
     Formulecompet::create(array('libelle' => '---', 'nbplayers' => 0, 'nbscores' => 0));
     Formulecompet::create(array('libelle' => 'Single', 'nbplayers' => 1, 'nbscores' => 1));
     Formulecompet::create(array('libelle' => '4 BBB', 'nbplayers' => 2, 'nbscores' => 2));
     Formulecompet::create(array('libelle' => 'Foursome', 'nbplayers' => 2, 'nbscores' => 1));
     Formulecompet::create(array('libelle' => 'Greensome', 'nbplayers' => 2, 'nbscores' => 1));
     Formulecompet::create(array('libelle' => 'Chapman', 'nbplayers' => 2, 'nbscores' => 1));
     Formulecompet::create(array('libelle' => 'Scramble à 2', 'nbplayers' => 2, 'nbscores' => 1));
     Formulecompet::create(array('libelle' => 'Scramble à 3', 'nbplayers' => 3, 'nbscores' => 1));
     Formulecompet::create(array('libelle' => 'Scramble à 4', 'nbplayers' => 4, 'nbscores' => 1));
     Formulecompet::create(array('libelle' => 'Pro-am à 2', 'nbplayers' => 2, 'nbscores' => 2));
     Formulecompet::create(array('libelle' => 'Pro-am à 3', 'nbplayers' => 3, 'nbscores' => 3));
     Formulecompet::create(array('libelle' => 'Pro-am à 4', 'nbplayers' => 4, 'nbscores' => 4));
     // 9 Status Tour
     DB::table('statustours')->delete();
     Statustour::create(array('libelle' => 'Création'));
     Statustour::create(array('libelle' => 'Départs'));
     Statustour::create(array('libelle' => 'En cours'));
     Statustour::create(array('libelle' => 'Cloturée'));
     Statustour::create(array('libelle' => 'Annulée'));
     // 10 Type Domaine
     DB::table('typedomaines')->delete();
     Typedomaine::create(array('libelle' => 'Public'));
     Typedomaine::create(array('libelle' => 'Privé'));
     Typedomaine::create(array('libelle' => 'System'));
     // 11 Tees
     DB::table('tees')->delete();
     Tee::create(array('libelle' => '---', 'color' => 'white'));
     Tee::create(array('libelle' => 'Noir', 'color' => 'Black'));
     Tee::create(array('libelle' => 'Blanc', 'color' => 'AntiqueWhite'));
     Tee::create(array('libelle' => 'Jaune', 'color' => 'yellow'));
     Tee::create(array('libelle' => 'Gris', 'color' => 'DarkGrey'));
     Tee::create(array('libelle' => 'Bleu', 'color' => 'blue'));
     Tee::create(array('libelle' => 'Rouge', 'color' => 'red'));
     Tee::create(array('libelle' => 'Or', 'color' => 'Gold'));
     Tee::create(array('libelle' => 'Orange', 'color' => 'DarkOrange'));
     Tee::create(array('libelle' => 'Vert', 'color' => 'Green'));
     // 12 Status Players
     DB::table('statusplayers')->delete();
     Statusplayer::create(array('libelle' => 'Amateur'));
     Statusplayer::create(array('libelle' => 'Pro'));
     // 13 Status Entree
     DB::table('statusentrees')->delete();
     Statusentree::create(array('libelle' => 'Inscrit'));
 }
示例#14
0
 public function __construct($resetToken = true)
 {
     parent::__construct('fr');
     if (isset($_SESSION['doorgets_user']) && isset($_SESSION['doorgets_user']['login']) && isset($_SESSION['doorgets_user']['token'])) {
         extract($_SESSION['doorgets_user']);
         $userExist = $this->dbQS($login, '_users', 'login');
         if (!empty($userExist) && $token === $userExist['token']) {
             $userExistInfo = $this->dbQS($userExist['id'], '_users_info', 'id_user');
             if (!empty($userExistInfo)) {
                 parent::__construct($userExistInfo['langue']);
                 $userExistInfoGroupe = $this->dbQS($userExistInfo['network'], '_users_groupes');
                 if (!empty($userExistInfoGroupe)) {
                     // Load all data about user
                     $this->isConnected['profile_type'] = $userExistInfo['profile_type'];
                     $this->isConnected['id'] = $userExist['id'];
                     $this->isConnected['groupe'] = $userExistInfo['network'];
                     $this->isConnected['login'] = $userExist['login'];
                     $this->isConnected['timezone'] = $userExistInfo['horaire'];
                     $this->isConnected['pseudo'] = $userExistInfo['pseudo'];
                     $this->isConnected['langue'] = $userExistInfo['langue'];
                     $this->isConnected['last_name'] = $userExistInfo['last_name'];
                     $this->isConnected['first_name'] = $userExistInfo['first_name'];
                     $this->isConnected['description'] = $userExistInfo['description'];
                     $this->isConnected['website'] = $userExistInfo['website'];
                     $this->isConnected['id_facebook'] = $userExistInfo['id_facebook'];
                     $this->isConnected['id_twitter'] = $userExistInfo['id_twitter'];
                     $this->isConnected['id_youtube'] = $userExistInfo['id_youtube'];
                     $this->isConnected['id_google'] = $userExistInfo['id_google'];
                     $this->isConnected['id_pinterest'] = $userExistInfo['id_pinterest'];
                     $this->isConnected['id_linkedin'] = $userExistInfo['id_linkedin'];
                     $this->isConnected['id_myspace'] = $userExistInfo['id_myspace'];
                     $this->isConnected['country'] = $userExistInfo['country'];
                     $this->isConnected['city'] = $userExistInfo['city'];
                     $this->isConnected['zipcode'] = $userExistInfo['zipcode'];
                     $this->isConnected['adresse'] = $userExistInfo['adresse'];
                     $this->isConnected['tel_fix'] = $userExistInfo['tel_fix'];
                     $this->isConnected['tel_mobil'] = $userExistInfo['tel_mobil'];
                     $this->isConnected['tel_fax'] = $userExistInfo['tel_fax'];
                     $this->isConnected['avatar'] = $userExistInfo['avatar'];
                     $this->isConnected['gender'] = $userExistInfo['gender'];
                     $this->isConnected['birthday'] = $userExistInfo['birthday'];
                     $this->isConnected['notification_mail'] = $userExistInfo['notification_mail'];
                     $this->isConnected['notification_newsletter'] = $userExistInfo['notification_newsletter'];
                     $this->isConnected['liste_widget'] = $this->_toArray($userExistInfoGroupe['liste_widget']);
                     $this->isConnected['liste_module'] = $this->_toArray($userExistInfoGroupe['liste_module']);
                     $this->isConnected['liste_module_interne'] = $this->_toArray($userExistInfoGroupe['liste_module_interne']);
                     $this->isConnected['liste_enfant'] = $this->_toArray($userExistInfoGroupe['liste_enfant']);
                     $this->isConnected['liste_module_limit'] = $this->_toArrayKeys($userExistInfoGroupe['liste_module_limit']);
                     $this->isConnected['liste_module_list'] = $this->_toArray($userExistInfoGroupe['liste_module_list']);
                     $this->isConnected['liste_module_show'] = $this->_toArray($userExistInfoGroupe['liste_module_show']);
                     $this->isConnected['liste_module_add'] = $this->_toArray($userExistInfoGroupe['liste_module_add']);
                     $this->isConnected['liste_module_edit'] = $this->_toArray($userExistInfoGroupe['liste_module_edit']);
                     $this->isConnected['liste_module_delete'] = $this->_toArray($userExistInfoGroupe['liste_module_delete']);
                     $this->isConnected['liste_module_admin'] = $this->_toArray($userExistInfoGroupe['liste_module_admin']);
                     $this->isConnected['liste_module_modo'] = $this->_toArray($userExistInfoGroupe['liste_module_modo']);
                     $this->isConnected['liste_module_interne_modo'] = $this->_toArray($userExistInfoGroupe['liste_module_interne_modo']);
                     $this->isConnected['liste_enfant_modo'] = $this->_toArray($userExistInfoGroupe['liste_enfant_modo']);
                     $this->isConnected['liste_enfant'] = $this->_toArray($userExistInfoGroupe['liste_enfant']);
                     $this->isConnected['attributes'] = @unserialize($userExistInfoGroupe['attributes']);
                     $this->isConnected['editor_group'] = array('-- ' . $this->__('Aucun') . ' --');
                     $this->isConnected['editor_html'] = $userExistInfo['editor_html'];
                     if (!empty($userExistInfoGroupe['editor_ckeditor'])) {
                         $this->isConnected['editor_group']['editor_ckeditor'] = 'editor_ckeditor';
                     }
                     if (!empty($userExistInfoGroupe['editor_tinymce'])) {
                         $this->isConnected['editor_group']['editor_tinymce'] = 'editor_tinymce';
                     }
                     // Users tracking
                     $this->_trackMe($userExist['id']);
                     if (array_key_exists('langue_temp', $_SESSION['doorgets_user'])) {
                         $this->isConnected['langue'] = $_SESSION['doorgets_user']['langue_temp'];
                     }
                     // reset token
                     // if ($resetToken) {
                     //     $_token = $_SESSION['doorgets_user']['token'] = md5(uniqid(mt_rand(), true));
                     //     $this->dbQU($userExist['id'],array('token'=>$_token),'_users');
                     // }
                 }
             }
         }
     }
     return null;
 }
示例#15
0
 public function __construct(&$doorGets, $dataInfo = array())
 {
     $this->dataInfo = $dataInfo;
     $this->doorGets = $doorGets;
     parent::__construct($doorGets->myLanguage);
 }
示例#16
0
<?php

global $edb_model;
$langue = new Langue();
$langs = $langue->getAll();
$edb_model->process_action();
?>

<header class="page-header">
    <h2>Ajouter une spécialité</h2>
</header>

<div class="row">

    <form action="<?php 
echo $_SERVER['REQUEST_URI'];
?>
" method="POST">

       <div class="col-xs-12">

           <ul class="nav nav-tabs" role="tablist">
               <?php 
$i = 0;
foreach ($langs as $lang) {
    ?>

                   <li class="<?php 
    echo $i == 0 ? 'active' : '';
    ?>
" role="presentation">
示例#17
0
 public function birthday($label = '', $name = '', $date = 0, $lg = 'fr')
 {
     $out = '';
     $isStart = false;
     if (empty($date) || !is_numeric($date)) {
         $date = time() - 60 * 60 * 24 * 365 * 100;
         $isStart = true;
     }
     $langue = new Langue($lg);
     if ($isStart) {
         $jour = 0;
         $mois = 0;
         $annee = 0;
     } else {
         $jour = date("j", $date);
         $mois = date("n", $date);
         $annee = date("Y", $date);
     }
     $iJour = array('--');
     for ($i = 1; $i <= 31; $i++) {
         $z = '';
         if ($i < 10) {
             $z = '0';
         }
         $iJour[$i] = $z . $i;
     }
     $iMois = array('--');
     for ($i = 1; $i <= 12; $i++) {
         $z = '';
         if ($i < 10) {
             $z = '0';
         }
         $iMois[$i] = $z . $i;
     }
     $years = date("Y", time());
     $yearsTo = $years - 90;
     $iAnnee = array('--');
     for ($i = $years; $i >= $yearsTo; $i--) {
         $iAnnee[$i] = $i;
     }
     $iHeure = array();
     for ($i = 0; $i <= 23; $i++) {
         $z = '';
         if ($i < 10) {
             $z = '0';
         }
         $iHeure[$i] = $z . $i;
     }
     $iMinute = array();
     for ($i = 0; $i <= 59; $i++) {
         $z = '';
         if ($i < 10) {
             $z = '0';
         }
         $iMinute[$i] = $z . $i;
     }
     $out .= '<label>' . $label . '</label><br />';
     if ($lg == 'fr') {
         $out .= $this->select(' ' . $langue->l('Jour') . ' : ', $name . '_jour', $iJour, $jour);
         $out .= $this->select(' ' . $langue->l('Mois') . ' : ' . '', $name . '_mois', $iMois, $mois);
         $out .= $this->select(' ' . $langue->l('Année') . ' : ' . '', $name . '_annee', $iAnnee, $annee);
     } else {
         $out .= $this->select(' ' . $langue->l('Mois') . ' : ' . '', $name . '_mois', $iMois, $mois);
         $out .= $this->select(' ' . $langue->l('Jour') . ' : ' . '', $name . '_jour', $iJour, $jour);
         $out .= $this->select(' ' . $langue->l('Année') . ' : ' . '', $name . '_annee', $iAnnee, $annee);
     }
     return $out;
 }
示例#18
0
 public function __construct($lg = 'fr')
 {
     parent::__construct($lg);
     $this->genHTML();
 }
示例#19
0
文件: dgUser.php 项目: neoartdoo/CMS
 public function __construct($id)
 {
     parent::__construct();
     $isUser = $this->dbQS($id, '_users_info', 'id_user');
     if (!empty($isUser)) {
         $isUser['count_notification'] = 0;
         $isUser['count_track'] = 0;
         $isUser['last_connexion'] = 0;
         $isUser['total_contribution'] = 0;
         $isUser['network_name'] = '-';
         $nameGroupe = $this->dbQS($isUser['network'], '_users_groupes');
         if (!empty($nameGroupe)) {
             $isUser['network_name'] = $nameGroupe['title'];
         }
         $isUser['date_creation'] = GetDate::in($isUser['date_creation']);
         $isUserNotification = $this->dbQ("SELECT count(*) as counter FROM _users_notification WHERE id_user = "******"SELECT date  FROM _users_notification WHERE id_user = "******" ORDER BY date DESC LIMIT 1");
         if (!empty($isUserLastConnexion)) {
             $isUser['last_connexion'] = GetDate::in($isUserLastConnexion[0]['date']);
         }
         $isUserTrack = $this->dbQ("SELECT count(*) as counter FROM _users_track WHERE id_user = "******"SELECT count(*) as counter FROM _m_" . $nameModule . " WHERE id_user = "******" ");
                             $countContents = (int) $isCounterContents[0]['counter'];
                             $realCount = $realCount + $countContents;
                         }
                         $outListeTypeModule[$nameModule]['count'] = $countContents;
                     }
                 }
                 $isUser['total_contribution'] = $realCount;
                 $isUser['liste_module'] = $outListeTypeModule;
             }
         }
         /*
                     $out = '';
             
                         $blockInfos = new BlockTable();
                         $blockInfos->setClassCass('doorgets-listing');
                         
                         $blockInfos->addTitle($this->getWords("Date d'inscription"),'date_inscription',' td-title center');
                         $blockInfos->addTitle($this->getWords("Dérnnière connexion"),'date_connexion',' td-title center');
                         $blockInfos->addTitle($this->getWords("Nbre de contibution"),'nb_contribution',' td-title center');
                         $blockInfos->addTitle($this->getWords("Nbre d'action"),'nb_action',' td-title center');
                         $blockInfos->addTitle($this->getWords("Nbre de page afficher"),'nb_page',' td-title center');
                         
                         $blockInfos->addContent('date_inscription',$isUser['date_creation'],'center');
                         $blockInfos->addContent('date_connexion',$isUser['last_connexion'],'center' );
                         $blockInfos->addContent('nb_contribution',$isUser['total_contribution'],'center' );
                         $blockInfos->addContent('nb_action',$isUser['count_track'],'center' );
                         $blockInfos->addContent('nb_page',$isUser['count_notification'],'center' );
                         
                         if (!empty($isUser['liste_module'])) {
                             
                             $blockModule = new BlockTable();
                             $blockModule->setClassCass('doorgets-listing');
                             $blockModule->addTitle($this->getWords("Module"),'module','first-title td-title left');
                             $blockModule->addTitle($this->getWords("Type"),'titre','td-title center');
                             $blockModule->addTitle($this->getWords("Nbre de contribution"),'nb_contribution','td-title center');
                             
                             foreach($isUser['liste_module'] as $k=>$v) {
                                 
                                 $blockModule->addContent('module',$k );
                                 $blockModule->addContent('titre',$v['type'],'center' );
                                 $blockModule->addContent('nb_contribution',$v['count'],'center' );
                             }
                         }
                         
                         $fTpl = GenView::getAdmin('doorgets','users/info.dguser.tpl.php');
                         ob_start();
                         include $fTpl;
                         $out = ob_get_clean();
                    
         $this->user = $out;
         */
     }
     return $isUser;
 }
示例#20
0
 public function __destruct()
 {
     parent::__destruct();
     $timeend = microtime(true);
     $this->timeExecution = number_format($timeend - $this->timeExecution, 3);
     // echo '<div class="container" style="z-index:99999;margin:30px auto;text-align:right;">';
     // echo $this->timeExecution;
     // echo '</div>';
 }
 public function getLangue()
 {
     $this->__load();
     return parent::getLangue();
 }
示例#22
0
文件: AuthUser.php 项目: doorgets/cms
 public function __construct($resetToken = true, $verifPayment = true)
 {
     parent::__construct('fr');
     if (isset($_SESSION['doorgets_user']) && isset($_SESSION['doorgets_user']['login']) && isset($_SESSION['doorgets_user']['token'])) {
         extract($_SESSION['doorgets_user']);
         $userExist = $this->dbQS($login, '_users', 'login');
         if (!empty($userExist) && $token === $userExist['token']) {
             $userExistInfo = $this->dbQS($userExist['id'], '_users_info', 'id_user');
             if (!empty($userExistInfo)) {
                 parent::__construct($userExistInfo['langue']);
                 $userExistInfoGroupe = $this->dbQS($userExistInfo['network'], '_users_groupes');
                 if (!empty($userExistInfoGroupe)) {
                     // Load all data about user
                     $this->isConnected['profile_type'] = $userExistInfo['profile_type'];
                     $this->isConnected['id'] = $userExist['id'];
                     $this->isConnected['groupe'] = $userExistInfo['network'];
                     $this->isConnected['login'] = $userExist['login'];
                     $this->isConnected['timezone'] = $userExistInfo['horaire'];
                     $this->isConnected['pseudo'] = $userExistInfo['pseudo'];
                     $this->isConnected['langue'] = $userExistInfo['langue'];
                     $this->isConnected['last_name'] = $userExistInfo['last_name'];
                     $this->isConnected['first_name'] = $userExistInfo['first_name'];
                     $this->isConnected['description'] = $userExistInfo['description'];
                     $this->isConnected['website'] = $userExistInfo['website'];
                     $this->isConnected['id_facebook'] = $userExistInfo['id_facebook'];
                     $this->isConnected['id_twitter'] = $userExistInfo['id_twitter'];
                     $this->isConnected['id_youtube'] = $userExistInfo['id_youtube'];
                     $this->isConnected['id_google'] = $userExistInfo['id_google'];
                     $this->isConnected['id_pinterest'] = $userExistInfo['id_pinterest'];
                     $this->isConnected['id_linkedin'] = $userExistInfo['id_linkedin'];
                     $this->isConnected['id_myspace'] = $userExistInfo['id_myspace'];
                     $this->isConnected['company'] = $userExistInfo['company'];
                     $this->isConnected['country'] = $userExistInfo['country'];
                     $this->isConnected['city'] = $userExistInfo['city'];
                     $this->isConnected['zipcode'] = $userExistInfo['zipcode'];
                     $this->isConnected['adresse'] = $userExistInfo['adresse'];
                     $this->isConnected['tel_fix'] = $userExistInfo['tel_fix'];
                     $this->isConnected['tel_mobil'] = $userExistInfo['tel_mobil'];
                     $this->isConnected['tel_fax'] = $userExistInfo['tel_fax'];
                     $this->isConnected['region'] = $userExistInfo['region'];
                     $this->isConnected['avatar'] = $userExistInfo['avatar'];
                     $this->isConnected['gender'] = $userExistInfo['gender'];
                     $this->isConnected['birthday'] = $userExistInfo['birthday'];
                     $this->isConnected['notification_mail'] = $userExistInfo['notification_mail'];
                     $this->isConnected['notification_newsletter'] = $userExistInfo['notification_newsletter'];
                     $this->isConnected['liste_widget'] = $this->_toArray($userExistInfoGroupe['liste_widget']);
                     $this->isConnected['liste_module'] = $this->_toArray($userExistInfoGroupe['liste_module']);
                     $this->isConnected['liste_module_interne'] = $this->_toArray($userExistInfoGroupe['liste_module_interne']);
                     $this->isConnected['liste_enfant'] = $this->_toArray($userExistInfoGroupe['liste_enfant']);
                     $this->isConnected['liste_module_limit'] = $this->_toArrayKeys($userExistInfoGroupe['liste_module_limit']);
                     $this->isConnected['liste_module_list'] = $this->_toArray($userExistInfoGroupe['liste_module_list']);
                     $this->isConnected['liste_module_show'] = $this->_toArray($userExistInfoGroupe['liste_module_show']);
                     $this->isConnected['liste_module_add'] = $this->_toArray($userExistInfoGroupe['liste_module_add']);
                     $this->isConnected['liste_module_edit'] = $this->_toArray($userExistInfoGroupe['liste_module_edit']);
                     $this->isConnected['liste_module_delete'] = $this->_toArray($userExistInfoGroupe['liste_module_delete']);
                     $this->isConnected['liste_module_admin'] = $this->_toArray($userExistInfoGroupe['liste_module_admin']);
                     $this->isConnected['liste_module_modo'] = $this->_toArray($userExistInfoGroupe['liste_module_modo']);
                     $this->isConnected['liste_module_interne_modo'] = $this->_toArray($userExistInfoGroupe['liste_module_interne_modo']);
                     $this->isConnected['liste_enfant_modo'] = $this->_toArray($userExistInfoGroupe['liste_enfant_modo']);
                     $this->isConnected['liste_enfant'] = $this->_toArray($userExistInfoGroupe['liste_enfant']);
                     $this->isConnected['attributes'] = unserialize(base64_decode($userExistInfoGroupe['attributes']));
                     $this->isConnected['editor_group'] = array('-- ' . $this->__('Aucun') . ' --');
                     $this->isConnected['editor_html'] = $userExistInfo['editor_html'];
                     $this->isConnected['fileman'] = $userExistInfoGroupe['fileman'];
                     // $this->isConnected['payment']                       = ($userExistInfoGroupe['payment'] == '1')?true:false;
                     // $this->isConnected['payment_currency']              = $userExistInfoGroupe['payment_currency'];
                     // $this->isConnected['payment_amount_month']          = $userExistInfoGroupe['payment_amount_month'];
                     // $this->isConnected['payment_group_expired']         = $userExistInfoGroupe['payment_group_expired'];
                     // $this->isConnected['payment_tranche']               = $userExistInfoGroupe['payment_tranche'];
                     // $this->isConnected['payment_group_upgrade']         = $userExistInfoGroupe['payment_group_upgrade'];
                     if (!empty($userExistInfoGroupe['editor_ckeditor'])) {
                         $this->isConnected['editor_group']['editor_ckeditor'] = 'editor_ckeditor';
                     }
                     if (!empty($userExistInfoGroupe['editor_tinymce'])) {
                         $this->isConnected['editor_group']['editor_tinymce'] = 'editor_tinymce';
                     }
                     if (array_key_exists('langue_temp', $_SESSION['doorgets_user'])) {
                         $this->isConnected['langue'] = $_SESSION['doorgets_user']['langue_temp'];
                     }
                     if (empty($userExistInfoGroupe['saas_options'])) {
                         $this->isConnected['saas_options'] = array('saas_add' => false, 'saas_delete' => false, 'saas_limit' => 0, 'saas_date_end' => 0);
                     } else {
                         $this->isConnected['saas_options'] = unserialize(base64_decode($userExistInfoGroupe['saas_options']));
                     }
                     $sesssionId = session_id();
                     $surveryData = array('pseudo' => $this->isConnected['pseudo'], 'id_user' => $this->isConnected['id'], 'id_groupe' => $this->isConnected['groupe']);
                     $this->dbQU($sesssionId, $surveryData, '_dg_survey_response', 'id_session', '');
                     // echo '<pre>';
                     // var_dump($this->isConnected['liste_module_interne']);
                     // exit;
                     // reset token
                     // if ($resetToken) {
                     //     $_token = $_SESSION['doorgets_user']['token'] = md5(uniqid(mt_rand(), true));
                     //     $this->dbQU($userExist['id'],array('token'=>$_token),'_users');
                     // }
                 }
             }
         }
     }
     return null;
 }