当前位置: 首页>>代码示例>>PHP>>正文


PHP _dao函数代码示例

本文整理汇总了PHP中_dao函数的典型用法代码示例。如果您正苦于以下问题:PHP _dao函数的具体用法?PHP _dao怎么用?PHP _dao使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_dao函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _createContent

 public function _createContent(&$toReturn)
 {
     $ppo = new CopixPPO();
     $ppo->conf = new CopixPPO();
     $ppo->conf->directorGlobalAffectation = CopixConfig::get('gestionautonome|directorGlobalAffectation');
     // Récupérations des filtres en session
     $ppo->selected = $this->getParam('selected', null);
     $ppo->withLabel = $this->getParam('with_label', true);
     $ppo->withEmpty = $this->getParam('with_empty', true);
     $ppo->labelEmpty = $this->getParam('label_empty', null);
     $ppo->name = $this->getParam('name', null);
     if (!is_null($cityGroupId = $this->getParam('city_group_id', null))) {
         $cityDAO = _dao('kernel|kernel_bu_ville');
         if (_currentUser()->testCredential('module:cities_group|' . $cityGroupId . '|city|create@gestionautonome') || _currentUser()->isDirector && $ppo->conf->directorGlobalAffectation) {
             $cities = $cityDAO->getByIdGrville($cityGroupId);
         } else {
             $groups = _currentUser()->getGroups();
             $cities = $cityDAO->findByCitiesGroupIdAndUserGroups($cityGroupId, $groups['gestionautonome|iconitogrouphandler']);
         }
         $ppo->citiesIds = array();
         $ppo->citiesNames = array();
         foreach ($cities as $city) {
             $ppo->citiesIds[] = $city->id_vi;
             $ppo->citiesNames[] = $city->nom;
         }
     }
     $toReturn = $this->_usePPO($ppo, '_filter_city.tpl');
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:28,代码来源:filtercity.zone.php

示例2: _createContent

 public function _createContent(&$toReturn)
 {
     $tpl = new CopixTpl();
     $module_type = $this->getParam('module_type');
     $module_id = $this->getParam('module_id');
     $action = $this->getParam('action');
     $date_debut = $this->getParam('date_debut', null);
     $date_fin = $this->getParam('date_fin', null);
     $dao = _dao('stats|logs');
     $stats = $dao->getStatsModuleAction(array('module_type' => $module_type, 'module_id' => $module_id, 'action' => $action, 'date_debut' => $date_debut, 'date_fin' => $date_fin));
     //print_r($stats);
     foreach ($stats as $k => $s) {
         // Détection du nom Copix du module
         list(, $module) = explode("_", strtolower($module_type));
         $class = CopixClassesFactory::create("{$module}|Stats{$module}");
         $obj = $class->getObjet($action, $s->objet_a);
         //print_r($obj);
         $stats[$k]->objet_name = isset($obj->name) ? $obj->name : '';
     }
     $tpl->assign('name', CopixI18N::get('stats.action.' . $module_type . '-' . $action));
     $tpl->assign('stats', $stats);
     //$tpl->assign ('canWriteOnline' , BlogAuth::canMakeInBlog('ADMIN_ARTICLE_MAKE_ONLINE',create_blog_object($id_blog)));
     // retour de la fonction :
     $toReturn = $tpl->fetch('module.action.tpl');
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:26,代码来源:moduleaction.zone.php

示例3: _createContent

 public function _createContent(&$toReturn)
 {
     $tpl = new CopixTpl();
     $motcle = $this->getParam('motcle');
     $clos = $this->getParam('clos');
     $type = $this->getParam('type');
     $ecole = $this->getParam('ecole');
     $rTelep = $this->getParam('rTelep');
     $admin = $this->getParam('admin');
     $mondroit = $this->getParam('mondroit');
     $daoType =& _dao('teleprocedures|type');
     $tpl->assign('arTypes', $daoType->findForTeleprocedure($rTelep->id));
     //print_r($rTelep);
     $canViewComboEcoles = TeleproceduresService::canMakeInTelep('VIEW_COMBO_ECOLES', $mondroit);
     if ($canViewComboEcoles) {
         $tpl->assign('comboEcolesLinesSup', array(0 => array('value' => '', 'libelle' => '---'), 1 => array('value' => '', 'libelle' => CopixI18N::get('annuaire|annuaire.comboAllEcoles'))));
     }
     $tpl->assign('rTelep', $rTelep);
     $tpl->assign('admin', $admin);
     $tpl->assign('motcle', $motcle);
     $tpl->assign('clos', $clos);
     $tpl->assign('type', $type);
     $tpl->assign('ecole', $ecole);
     $tpl->assign('canViewComboEcoles', $canViewComboEcoles);
     $toReturn = $tpl->fetch('filtre-zone.tpl');
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:27,代码来源:filtre.zone.php

示例4: _createContent

 public function _createContent(&$toReturn)
 {
     $tpl = new CopixTpl();
     $blog = $this->getParam('blog', '');
     $cat = $this->getParam('cat', null);
     $critere = $this->getParam('critere', null);
     //on récupère l'ensemble des articles du blog
     $dao = _dao('blog|blogarticle');
     if ($cat == null) {
         $date = $this->getParam('date', null);
         $arData = $dao->getAllArticlesFromBlog($blog->id_blog, $date);
     } else {
         $arData = $dao->getAllArticlesFromBlogByCat($blog->id_blog, $cat->id_bacg);
         $tpl->assign('cat', $cat);
     }
     //on filtre si on a fait une recherche sur les articles
     if ($critere != null) {
         $arData = $dao->getAllArticlesFromBlogByCritere($blog->id_blog, $critere);
     }
     //var_dump($arData);
     //on construit un tableau associatif entre l'identifiant de l'article et le nombre de commentaires
     foreach ($arData as $article) {
         //var_dump($article);
         $daoArticleComment =& CopixDAOFactory::getInstanceOf('blog|blogarticlecomment');
         $record = _record('blog|blogarticlecomment');
         $criteres = _daoSp();
         $criteres->addCondition('id_bact', '=', $article->id_bact);
         $criteres->addCondition('is_online', '=', 1);
         $resultat = $daoArticleComment->findBy($criteres);
         $arNbCommentByArticle[$article->id_bact] = count($resultat);
     }
     if (count($arData) > 0) {
         //encodage des URL des catégories pour caractères spéciaux
         foreach ($arData as $key => $data) {
             //Modification suite à apparition d'un warning due à l'absence de catégories , vboniface 06.11.2006
             $arData[$key]->key = $key;
             if (isset($arData[$key]->categories)) {
                 foreach ($arData[$key]->categories as $keyCat => $categorie) {
                     $arData[$key]->categories[$keyCat]->url_bacg = urlencode($categorie->url_bacg);
                 }
             }
         }
         if (count($arData) <= intval(CopixConfig::get('blog|nbMaxArticles'))) {
             $tpl->assign('pager', "");
             $tpl->assign('listArticle', $arData);
             $tpl->assign('arNbCommentByArticle', $arNbCommentByArticle);
         } else {
             $params = array('perPage' => intval(CopixConfig::get('blog|nbMaxArticles')), 'delta' => 5, 'recordSet' => $arData, 'template' => '|pager.tpl');
             $Pager = CopixPager::Load($params);
             $tpl->assign('pager', $Pager->GetMultipage());
             $tpl->assign('listArticle', $Pager->data);
             $tpl->assign('arNbCommentByArticle', $arNbCommentByArticle);
         }
         //rajout suite à bug mantis 54 vboniface 06.11.2006
         $tpl->assign('blog', $blog);
     }
     // retour de la fonction :
     $toReturn = $tpl->fetch('listarticle.tpl');
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:60,代码来源:listarticle.zone.php

示例5: _createContent

 public function _createContent(&$toReturn)
 {
     //Getting the user.
     //Create Services, and DAO
     $tpl = new CopixTpl();
     $id_blog = $this->getParam('id_blog', '');
     $tpl->assign('blog', $this->getParam('blog', null));
     $tpl->assign('id_blog', $id_blog);
     $tpl->assign('kind', $this->getParam('kind', ''));
     $tpl->assign('tabBlogFunctions', $this->getParam('tabBlogFunctions', null));
     $tpl->assign('can_format_articles', CopixConfig::get('blog|blog.default.can_format_articles'));
     $tpl->assign('RESULT', $this->getParam('RESULT', ''));
     $parent = Kernel::getModParentInfo("MOD_BLOG", $id_blog);
     if ($parent) {
         $mods = Kernel::getModEnabled($parent['type'], $parent['id'], '', 0, 1);
         // _dump($mods);
         $mods = Kernel::filterModuleList($mods, 'MOD_MAGICMAIL');
         if (count($mods)) {
             $magicmail_infos = _dao('module_magicmail')->get($mods[0]->module_id);
             $tpl->assign('magicmail_infos', $magicmail_infos);
             // _dump($magicmail_infos);
             /*
                'id' => '32',
                'login' => 'cepapeti',
                'domain' => 'magicmail.iconito.fr',
             */
         }
     }
     // retour de la fonction :
     $toReturn = $tpl->fetch('blog.show.tpl');
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:32,代码来源:showblog.zone.php

示例6: lastLogin

 /**
  * Renvoie les infos de la dernière connexion d'un login
  *
  * @author Frédéric Mossmann <fmossmann@cap-tic.fr>
  * @since 2006/05/10
  * @param string $login Login de l'utilisateur
  * @return mixed Objet DAO
  */
 public function lastLogin($login)
 {
     $dao = _dao("logs|logs");
     $criteres = _daoSp();
     $criteres->addCondition('logs_type', '=', 'LOG');
     $criteres->addCondition('logs_mod_name', '=', 'auth');
     $criteres->addCondition('logs_mod_action', '=', 'in');
     $criteres->addCondition('logs_message', '=', 'Login ok: ' . $login);
     $criteres->orderBy(array('logs_date', 'DESC'));
     $lastlog = $dao->findBy($criteres);
     $criteres = _daoSp();
     $criteres->addCondition('logs_type', '=', 'LOG');
     $criteres->addCondition('logs_mod_name', '=', 'auth');
     $criteres->addCondition('logs_mod_action', '=', 'in');
     $criteres->addCondition('logs_message', ' LIKE ', 'Login failed: ' . $login . '/%');
     $criteres->orderBy(array('logs_date', 'DESC'));
     $lastfailed = $dao->findBy($criteres);
     $return = false;
     if (sizeof($lastlog) > 0) {
         $return['nb'] = sizeof($lastlog);
         $return['last'] = $lastlog[0];
         if (sizeof($lastfailed) > 0) {
             $return['failed'] = $lastfailed[0];
         }
     }
     return $return;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:35,代码来源:logs.dao.php

示例7: _createContent

 public function _createContent(&$toReturn)
 {
     $tpl = new CopixTpl();
     $pAlbumId = $this->getParam('album_id');
     $pDossierId = $this->getParam('dossier_id');
     // $album_dao = _dao("album");
     $dossier_dao = _dao("dossier");
     $photo_dao = _dao("photo");
     if ($pDossierId > 0) {
         $dossier = $dossier_dao->get($pDossierId);
     } else {
         $dossier->dossier_id = 0;
         $dossier->dossier_album = $this->getParam('album_id');
         $dossier->dossier_parent = -1;
         $dossier->dossier_nom = CopixI18N::get('album|album.message.topfolder');
         $dossier->dossier_comment = "";
         $dossier->album_id = $pAlbumId;
     }
     if ($dossier->dossier_album != $pAlbumId) {
         return false;
     }
     $pictures = $photo_dao->findAllByAlbumAndFolder($pAlbumId, $pDossierId);
     $tpl->assign('album_id', $pAlbumId);
     $tpl->assign('dossier_id', $pDossierId);
     $tpl->assign('dossier', $dossier);
     $tpl->assign('pictures', $pictures);
     $tpl->assign('picture_thumbsize', '_s64');
     $dossiers_tree = Album::getFoldersTree($pAlbumId);
     $dossiers_commands = Album::tree2commands($dossiers_tree);
     $tpl->assign('commands_move', $dossiers_commands);
     $toReturn = $tpl->fetch('editphotos.tpl');
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:33,代码来源:editphotos.zone.php

示例8: _createContent

 /**
  * Commentaires d'une procedure
  *
  * @author Christophe Beyer <cbeyer@cap-tic.fr>
  * @since 2008/01/30
  * @param object $rFiche Recordset de la procedure
  */
 public function _createContent(&$toReturn)
 {
     $tpl = new CopixTpl();
     $rFiche = $this->getParam('rFiche');
     $mondroit = $this->getParam('mondroit');
     $daoinfo =& _dao('infosupp');
     $sql = 'SELECT * FROM module_teleprocedure_infosupp WHERE idinter=' . $rFiche->idinter . '';
     $canCheckVisible = TeleproceduresService::canMakeInTelep('CHECK_VISIBLE', $mondroit);
     $canAddComment = TeleproceduresService::canMakeInTelep('ADD_COMMENT', $mondroit);
     if (!$canCheckVisible) {
         $sql .= " AND info_message!='' AND info_message IS NOT NULL";
     }
     $sql .= " ORDER BY dateinfo ASC, idinfo ASC";
     $results = _doQuery($sql);
     // Pour chaque message on cherche les infos de son auteur
     $list = array();
     foreach ($results as $r) {
         $userInfo = Kernel::getUserInfo("ID", $r->iduser);
         //var_dump($userInfo);
         $avatar = Prefs::get('prefs', 'avatar', $r->iduser);
         $userInfo['avatar'] = $avatar ? CopixConfig::get('prefs|avatar_path') . $avatar : '';
         $r->user = $userInfo;
         $list[] = $r;
     }
     //print_r($rFiche);
     $tpl->assign('info_message_edition', CopixZone::process('kernel|edition', array('field' => 'info_message', 'format' => $rFiche->type_format, 'content' => '', 'width' => 350, 'height' => 135, 'options' => array('toolbarSet' => 'IconitoBasic', 'enterMode' => 'br', 'toolbarStartupExpanded' => 'false'))));
     $tpl->assign('info_commentaire_edition', CopixZone::process('kernel|edition', array('field' => 'info_commentaire', 'format' => $rFiche->type_format, 'content' => '', 'width' => 350, 'height' => 135, 'options' => array('toolbarSet' => 'IconitoBasic', 'enterMode' => 'br', 'toolbarStartupExpanded' => 'false'))));
     $tpl->assign('canCheckVisible', $canCheckVisible);
     $tpl->assign('canAddComment', $canAddComment);
     $tpl->assign('list', $list);
     $tpl->assign('rFiche', $rFiche);
     $toReturn = $tpl->fetch('fiche-comms-zone.tpl');
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:41,代码来源:fichecomms.zone.php

示例9: _createContent

 public function _createContent(&$toReturn)
 {
     $ppo = new CopixPPO();
     $ppo->conf = new CopixPPO();
     $ppo->conf->directorGlobalAffectation = CopixConfig::get('gestionautonome|directorGlobalAffectation');
     // Récupérations des filtres en session
     $ppo->selected = $this->getParam('selected', null);
     $ppo->withLabel = $this->getParam('with_label', true);
     $ppo->withEmpty = $this->getParam('with_empty', true);
     $ppo->name = $this->getParam('name', null);
     if (!is_null($cityId = $this->getParam('city_id', null))) {
         // Récupération des écoles de la ville sélectionnée pour liste déroulante
         $schoolDAO = _dao('kernel|kernel_bu_ecole');
         if (_currentUser()->testCredential('module:city|' . $cityId . '|school|create@gestionautonome') || _currentUser()->isDirector && $ppo->conf->directorGlobalAffectation) {
             $schools = $schoolDAO->getByCity($cityId);
         } else {
             $groups = _currentUser()->getGroups();
             $schools = $schoolDAO->findByCityIdAndUserGroups($cityId, $groups['gestionautonome|iconitogrouphandler']);
         }
         $ppo->schoolsIds = array();
         $ppo->schoolsNames = array();
         foreach ($schools as $school) {
             $ppo->schoolsIds[] = $school->numero;
             $ppo->schoolsNames[] = $school->nom;
         }
     }
     $toReturn = $this->_usePPO($ppo, '_filter_school.tpl');
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:28,代码来源:filterschool.zone.php

示例10: getStats

 /**
  * Statistiques d'un agenda
  *
  * Renvoie des éléments chiffrés relatifs à un agenda : nombre d'évènements...
  *
  * @author Christophe Beyer <cbeyer@cap-tic.fr>
  * @since 2006/08/24
  * @param integer $id_agenda Id de l'agenda
  * @return array Tableau dont les clefs représentent les libellés des stats et les valeurs les stats chiffrées. Clefs utilisées : ["nbEvenements"]
  */
 public function getStats($id_agenda)
 {
     $res = array();
     $dao = _dao("agenda|agenda");
     $infos = $dao->getNbsEvenementsInAgenda($id_agenda);
     $res['nbEvenements'] = array('name' => CopixI18N::get('agenda|agenda.stats.nbEvenements', array($infos[0]->nbEvenements)));
     return $res;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:18,代码来源:kernelagenda.class.php

示例11: getStats

 public function getStats($id_liste)
 {
     $res = array();
     $daoListe = _dao("liste|liste_listes");
     $infos = $daoListe->getNbMessagesInListe($id_liste);
     $res['nbMessages'] = array('name' => CopixI18N::get('liste|liste.stats.nbMessages', array($infos[0]->nb)));
     return $res;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:8,代码来源:kernelliste.class.php

示例12: _createContent

 public function _createContent(&$toReturn)
 {
     $tpl = new CopixTpl();
     $blog = $this->getParam('blog', '');
     $dao = _dao('blog|blogfluxrss');
     $tpl->assign('listFluxRss', $dao->getAllFluxRssFromBlog($blog->id_blog));
     $toReturn = $tpl->fetch('listfluxrss.tpl');
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:9,代码来源:listfluxrss.zone.php

示例13: testFoo

 public function testFoo()
 {
     $dao1 = _ioDAO('copix:copixmodule');
     $dao2 = _ioDAO('copix:copixmodule');
     $dao3 = _dao('copix:copixmodule');
     $this->assertSame($dao1, $dao2);
     $this->assertNotSame($dao1, $dao3);
     _daoInclude('copix:copixmodule');
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:9,代码来源:copixtest_copixdaofactorytest.class.php

示例14: _createContent

 /**
  * Affichage des dernieres pages d'un blog au format Javascript
  *
  * @author Christophe Beyer <cbeyer@cap-tic.fr>
  * @since 2009/01/23
  * @param mixed $blog Recordset du blog
  * @param integer $nb (option) Nombre de pages a afficher. Si null, prend nbJsArticles dans la conf. Par defaut : null
  * @param integer $page (option) Id d'une page precise a afficher
  * @param boolean $content (option) Indique si on affiche le corps des pages. Par defaut : false
  * @param integer $colonnes Nb de colonnes. Par defaut : 1
  * @param boolean $hr (option) Si on veut afficher un HR entre les pages. Par defaut : false
  * @param boolean $showtitle (option) Si on veut afficher le titre des articles. Par defaut : true
  * @param integer $truncate (option) Limit de cesure du texte. Par defaut : 0 (pas de cesure)
  */
 public function _createContent(&$toReturn)
 {
     $blog = $this->getParam('blog', null);
     $nb = $this->getParam('nb', null);
     $nb = intval($nb);
     $colonnes = $this->getParam('colonnes');
     $colonnes = intval($colonnes);
     if (!$colonnes) {
         $colonnes = 1;
     }
     $content = $this->getParam('content', false);
     $hr = $this->getParam('hr', false);
     $page = $this->getParam('page', null);
     $page = intval($page);
     $showtitle = $this->getParam('showtitle', true);
     $truncate = $this->getParam('truncate', 0);
     $tpl = new CopixTpl();
     $listPage = array();
     if ($page) {
         // Page precise
         if (($rPage = _dao('blog|blogpage')->get($page)) && $rPage->id_blog == $blog->id_blog) {
             $listPage[] = $rPage;
         }
     } else {
         // Les dernieres pages
         if (!$nb || $nb < 0 || $nb > 20) {
             $nb = CopixConfig::get('blog|nbJsArticles');
         }
         //on récupère l'ensemble des articles du blog
         $dao = _dao('blog|blogpage');
         $arData = $dao->getAllPagesFromBlog($blog->id_blog);
         if (count($arData) <= $nb) {
             $listPage = $arData;
         } else {
             $params = array('perPage' => $nb, 'delta' => 1, 'recordSet' => $arData, 'template' => '|pager.tpl');
             $Pager = CopixPager::Load($params);
             $tpl->assign('pager', $Pager->GetMultipage());
             $listPage = $Pager->data;
         }
     }
     $tpl->assign('listPage', $listPage);
     $nbPages = count($listPage);
     // Nb elements par colonnes
     $parCols = ceil($nbPages / $colonnes);
     $tpl->assign('blog', $blog);
     $tpl->assign('content', $content);
     $tpl->assign('hr', $hr);
     $tpl->assign('parCols', $parCols);
     $tpl->assign('widthColonne', round(100 / $colonnes, 1) . '%');
     $tpl->assign('showtitle', $showtitle);
     $tpl->assign('truncate', $truncate);
     $txt = $tpl->fetch('listpagejs.tpl');
     $txt = trim(str_replace("\r\n", "", $txt));
     $txt = trim(str_replace("\n", "", $txt));
     $toReturn = "var blogJsPages='" . addslashes($txt) . "';";
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:71,代码来源:listpagejs.zone.php

示例15: _createContent

 public function _createContent(&$toReturn)
 {
     $tpl = new CopixTpl();
     $blog = $this->getParam('blog', '');
     $dao = _dao('blog|bloglink');
     $tpl->assign('listLink', $dao->getAllLinksFromBlog($blog->id_blog));
     $toReturn = $tpl->fetch('listlink.tpl');
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:9,代码来源:listlink.zone.php


注:本文中的_dao函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。