/** * go * * Appel automatique, avec détection du noeud à afficher. * @author Frédéric Mossmann * @since 10.03.2009 * */ public function go() { if (!Kernel::is_connected()) { return CopixActionGroup::process('genericTools|Messages::getError', array('message' => CopixI18N::get('kernel|kernel.error.nologin'), 'back' => CopixUrl::get('auth|default|login'))); } CopixHtmlHeader::addJSLink(CopixUrl::get() . 'js/iconito/module_concerto.js'); if (!_request("id") || !ereg('^[0-9]+$', _request("id"))) { return new CopixActionReturn(COPIX_AR_REDIRECT, CopixUrl::get('kernel||getNodes')); } $sql = 'SELECT login,password FROM kernel_bu_auth WHERE node_type=\'responsable\' AND node_id=' . _currentUser()->getExtra('id') . ' AND id=\'' . addslashes(_request("id")) . '\' AND service=\'concerto\''; $concerto = _doQuery($sql); if (!$concerto) { return new CopixActionReturn(COPIX_AR_REDIRECT, CopixUrl::get('kernel||getNodes')); } $tpl = new CopixTpl(); $tpl->assign('TITLE_PAGE', CopixI18N::get('concerto|concerto.title')); // $tpl->assign ('MENU', '<a href="'.CopixUrl::get ('groupe||getListPublic').'">'.CopixI18N::get ('groupe|groupe.annuaire').'</a> :: <a href="'.CopixUrl::get ('groupe||getListMy').'">'.CopixI18N::get ('groupe|groupe.my').'</a>'); $tplListe = new CopixTpl(); $tplListe->assign('login', $concerto[0]->login); $tplListe->assign('password', $concerto[0]->password); $result = $tplListe->fetch("concerto-form.tpl"); $tpl->assign("MAIN", $result); $tpl->assign('BODY_ON_LOAD', 'concerto_redirect();'); return new CopixActionReturn(COPIX_AR_DISPLAY, $tpl); }
/** * Affiche les infos d'une classe (enseignant et �l�ves) * * @author Christophe Beyer <*****@*****.**> * @since 2006/01/18 * @param integer $rClasse Recordset de la classe */ public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $annuaireService =& CopixClassesFactory::Create('annuaire|AnnuaireService'); $rClasse = $this->getParam('rClasse') ? $this->getParam('rClasse') : NULL; if ($rClasse) { $classe = $rClasse['id']; $enseignants = $annuaireService->getEnseignantInClasse($classe); $eleves = $annuaireService->getElevesInClasse($classe); $rClasse["eleves"] = $eleves; $rClasse["enseignants"] = $enseignants; $matrix =& enic::get('matrixCache'); $matrix->display(); $droit = $matrix->classe($classe)->_right->USER_ENS->voir; if (!$droit) { $rClasse["enseignants"] = 'NONE'; } $canWrite = $matrix->classe($classe)->_right->USER_ENS->communiquer; $tpl->assign('canWriteUSER_ENS', $canWrite); $droit = $matrix->classe($classe)->_right->USER_ELE->voir; if (!$droit) { $rClasse["eleves"] = 'NONE'; } $canWrite = $matrix->classe($classe)->_right->USER_ELE->communiquer; $tpl->assign('canWriteUSER_ELE', $canWrite); $tpl->assign('classe', $rClasse); $toReturn = $tpl->fetch('infosclasse.tpl'); } return true; }
/** * Création du contenu de la page */ public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $tpl->assign('arModulesPath', CopixConfig::instance()->arModulesPath); $tpl->assign('arModules', $this->_getModuleOrderByDescription()); $toReturn = $tpl->fetch('modules.list.tpl'); }
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; }
/** * Visualisation de l'aide * * @param string $toReturn * @return string */ public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $displayAide = true; $daoAide = _ioDao('simplehelp'); $sp = _daoSp()->addCondition('page_sh', '=', $this->getParam('page_sh', null, null))->addCondition('key_sh', '=', $this->getParam('key_sh', null, null)); $arAide = $daoAide->findBy($sp); if (count($arAide) > 0) { $aide = $arAide[0]; } else { $displayAide = false; $aide = null; } // cette variable est crée pour différencier si l'aide doit être afficher dans un popup classique ou un popuinformation $popup = false; if ($this->getParam('popup', null, true) === "true") { $popup = true; } $tpl->assign('aide', $aide); $tpl->assign('displayAide', $displayAide); $tpl->assign('popup', $popup); // $tpl->assign ('nofloat', $this->getParam ('nofloat', false)); $toReturn = $tpl->fetch('showaide.tpl'); return true; }
public function getUsers() { $tpl = new CopixTpl(); $tplUsers = new CopixTpl(); $me_info = Kernel::getUserInfo("ME", 0); $animateurs_dao =& CopixDAOFactory::create("kernel|kernel_animateurs"); $animateur = $animateurs_dao->get($me_info['type'], $me_info['id']); $tplUsers->assign('animateur', $animateur); $ien_dao =& CopixDAOFactory::create("kernel|kernel_ien"); $ien = $ien_dao->get($me_info['type'], $me_info['id']); $tplUsers->assign('ien', $ien); $assistance_service =& CopixClassesFactory::Create('assistance|assistance'); $users = $assistance_service->getAssistanceUsers(); $tplUsers->assign('users', $users); $result = $tplUsers->fetch("users-list.tpl"); $tpl->assign('TITLE_PAGE', CopixI18N::get('assistance.moduleDescription') . " » " . CopixI18N::get('assistance.title.users')); $tpl->assign('MAIN', $result); // echo "<pre>"; print_r($_SESSION); die("</pre>"); /* $menu=array(); $menu[] = array( 'txt' => CopixI18N::get ('comptes.menu.return_getnode'), 'url' => CopixUrl::get ('comptes||getNode') ); $tpl->assign ('MENU', $menu ); */ return new CopixActionReturn(COPIX_AR_DISPLAY, $tpl); }
/** * Configuration de MagicMail * * @author Frederic Mossmann <*****@*****.**> * @since 2006/08/09 */ public function getMagicMail() { $id = _request("id"); if (Kernel::getLevel("MOD_MAGICMAIL", $id) < PROFILE_CCV_ADMIN) { return CopixActionGroup::process('genericTools|Messages::getError', array('message' => CopixI18N::get('kernel|kernel.error.noRights'), 'back' => CopixUrl::get('||'))); } $tpl = new CopixTpl(); $tpl->assign('TITLE_PAGE', CopixI18N::get('magicmail.message.title')); $dao = CopixDAOFactory::create("magicmail|magicmail"); $magic_result = $dao->get($id); $tplForm = new CopixTpl(); $tplForm->assign('id', $id); $tplForm->assign('infos', $magic_result); // $tplForm->assign ('magicmail_mail', CopixConfig::get ('magicmail|magicmail_mail')); if (_request("return")) { $tplForm->assign('return', _request("return")); } CopixHTMLHeader::addCSSLink(_resource("styles/module_prefs.css")); $tplForm->assign('msg', array('type' => 'ok', 'image_url' => _resource('img/prefs/smiley_black.png'), 'image_alt' => 'Ok !', 'value' => CopixI18N::get('prefs|prefs.msg.prefsrecorded'))); $result = $tplForm->fetch("login_form.tpl"); $tpl->assign("MAIN", $result); $menu = array(); $tpl->assign('MENU', $menu); return new CopixActionReturn(COPIX_AR_DISPLAY, $tpl); }
public function test() { $tpl = new CopixTpl(); $tpl->assign('TITLE_PAGE', "Logs"); $dao = CopixDAOFactory::create("logs|logs"); $data = $dao->lastLogin('admin'); $tpl->assign('MAIN', '<pre>' . print_r($data, true) . '</pre>'); return new CopixActionReturn(COPIX_AR_DISPLAY, $tpl); }
public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $tpl->assign('user', $this->getParam('user')); $tpl->assign('mode', $this->getParam('mode')); $tpl->assign('errors', $this->getParam('errors')); $toReturn = $tpl->fetch('zonegetuserextform.tpl'); return true; }
public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $tpl->assign('content', $this->service('mailextService')->getConf()); $tpl->assign('urlmail', $this->url('mailext|mailext|getMsg')); $toReturn = $tpl->fetch('mailext|showmsg.tpl'); $this->addCss('styles/module_mailext.css'); return true; }
public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $tpl->assign('childs', $this->getParam('childs')); $tpl->assign('type', $this->getParam('type')); $tpl->assign('id', $this->getParam('id')); $toReturn = $tpl->fetch('userlist.tpl'); return true; }
/** * Ecran par défaut */ public function processDefault() { $tpl = new CopixTpl(); $tpl->assign('TITLE_BAR', CopixI18N::get('params.title')); $choiceModule = CopixRequest::get('choiceModule', false, true); $editParam = CopixRequest::get('editParam', false, true); $tpl->assign('TITLE_PAGE', CopixI18N::get('params.titlePage.admin')); $tpl->assignZone('MAIN', 'ShowParams', array('choiceModule' => $choiceModule, 'editParam' => $editParam)); return _arDisplay($tpl); }
public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $tpl->assign('users', $this->getParam('users')); $tpl->assign('type', $this->getParam('type')); $tpl->assign('id', $this->getParam('id')); $tpl->assign('reset', $this->getParam('reset')); $toReturn = $tpl->fetch('getloginform.tpl'); return true; }
public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $auth_list = $this->getParam('list', NULL); $id = $this->getParam('id', NULL); $tpl->assign('auth_list', $auth_list); $tpl->assign('id', $id); $toReturn = $tpl->fetch('ssoauthlist_zone.tpl'); return true; }
public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $blog = $this->getParam('blog', ''); $dao = _dao('blog|blogarticle'); $tpl->assign('listArchive', $dao->getAllArchivesFromBlog($blog->id_blog)); $tpl->assign('blog', $blog); $toReturn = $tpl->fetch('listarchive.tpl'); return true; }
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; }
function getSelectPage() { $tpl = new CopixTpl(); $tpl->assign('TITLE_PAGE', CopixI18N::get('htmleditor.title.pageSelect')); if (isset($this->vars['popup'])) { $tpl->assign('MAIN', CopixZone::process('htmleditor|SelectPage', array('onlyLastVersion' => 1, 'editorName' => $this->vars['editorName'], 'popup' => $this->vars['popup']))); } else { $tpl->assign('MAIN', CopixZone::process('htmleditor|SelectPage', array('onlyLastVersion' => 1, 'editorName' => $this->vars['editorName']))); } return new CopixActionReturn(COPIX_AR_DISPLAY_IN, $tpl, '|blank.tpl'); }
public function _createContent(&$toReturn) { $serviceAuth = new AgendaAuth(); $tpl = new CopixTpl(); $toEdit = $this->getParam('toEdit'); //var_dump($toEdit); ////cas où on est passé par le prepareEdit //si un évènement est répété, la case doit être cochée if ($toEdit->everyday_event == 1 || $toEdit->everyweek_event == 1 || $toEdit->everymonth_event == 1 || $toEdit->everyyear_event == 1) { $toEdit->repeat = 1; } //on met à jour la balise select if ($toEdit->everyday_event == 1) { $toEdit->repeat_event = "everyday_event"; } if ($toEdit->everyweek_event == 1) { $toEdit->repeat_event = "everyweek_event"; } if ($toEdit->everymonth_event == 1) { $toEdit->repeat_event = "everymonth_event"; } if ($toEdit->everyyear_event == 1) { $toEdit->repeat_event = "everyyear_event"; } if (isset($toEdit->endrepeat_event)) { $toEdit->endrepeat_event = $toEdit->endrepeat_event; } //gestion des erreurs if ($this->getParam('e') == 1) { $tpl->assign('showError', $this->getParam('e')); } //vérification des droits d'écriture sur les agendas $listeFiltre = $this->getParam('arTitleAgendasAffiches'); //on vérifie les droits de lecture des utilisateurs foreach ((array) $listeFiltre as $key => $title_agenda) { //on vérifie si l'utilisateur a les droits de lecture sur la liste des agendas if ($serviceAuth->getCapability($key) < $serviceAuth->getWriteAgenda()) { unset($listeFiltre[$key]); } } //print_r($listeFiltre); $id_agenda = null; foreach ($listeFiltre as $idAgenda => $title) { if ($toEdit->id_agenda == $idAgenda) { $id_agenda = $idAgenda; } } $tpl->assign('arTitleAgendasAffiches', $listeFiltre); $tpl->assign('arError', $this->getParam('errors')); $tpl->assign('toEdit', $toEdit); $tpl->assign('wikibuttons_desc', CopixZone::process('kernel|wikibuttons', array('field' => 'desc_event', 'object' => array('type' => 'MOD_AGENDA', 'id' => $id_agenda)))); $toReturn = $tpl->fetch('editevent.agenda.tpl'); return true; }
public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $tpl->assign("prefs", $this->getParam('prefs')); $msg = $this->getParam('msg'); if ($msg && $msg == 'save') { $tpl->assign('msg', array('type' => 'ok', 'image_url' => _resource('img/prefs/smiley_black.png'), 'image_alt' => CopixI18N::get('prefs.msg.prefsrecorded_alt'), 'value' => CopixI18N::get('prefs.msg.prefsrecorded'))); } $toReturn = $tpl->fetch("getprefs.tpl"); return true; }
/** * @author Christophe Beyer <*****@*****.**> * @since 2006/03/23 */ public function _createContent(&$toReturn) { $blog = $this->getParam('blog', null); $tpl = new CopixTpl(); $arArticle = _ioDAO('blog|blogarticle')->findPublic(array('categories' => true, 'nb' => intval(CopixConfig::get('public|rss.nbArticles')))); $rss = array('title' => CopixI18N::get('public|public.rss.flux.title'), 'link' => CopixUrl::get(), 'description' => CopixI18N::get('public|public.rss.flux.description'), 'language' => 'fr-fr', 'copyright' => "Iconito", 'generator' => "Iconito", 'logo' => 0); $tpl->assign('rss', $rss); $tpl->assign('blog', $blog); $tpl->assign('listArticle', $arArticle); $toReturn = $tpl->fetch('rss.tpl'); return true; }
/** * Zone qui affiche un lien permettant d'ouvrir l'annuaire avec les utilisateurs * * @author Christophe Beyer <*****@*****.**> * @since 2006/01/23 * @param string $field Nom du champ où vont figurer les logins * @param string $profil (option) Profil qu'on veut afficher par defaut * @param string $right (option) Droit à vérifier */ public function _createContent(&$toReturn) { $annuaireService =& CopixClassesFactory::Create('annuaire|AnnuaireService'); $field = $this->getParam('field') ? $this->getParam('field') : NULL; $profil = $this->getParam('profil'); $tpl = new CopixTpl(); $tpl->assign('field', $field); $tpl->assign('profil', $profil); $tpl->assign('right', $this->getParam('right')); $toReturn = $tpl->fetch('linkpopup.tpl'); return true; }
/** * Les droits dans une procedure. On considere que la verif des droits a ete faite avant * * @author Christophe Beyer <*****@*****.**> * @since 2009/03/06 * @param object $rFiche Recordset de la procedure */ public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $rFiche = $this->getParam('rFiche'); $errors = $this->getParam('errors'); $tpl->assign('rFiche', $rFiche); $tpl->assign('errors', $errors); $tpl->assign('linkpopup_responsables', CopixZone::process('annuaire|linkpopup', array('field' => 'responsables', 'profil' => 'USER_VIL'))); $tpl->assign('linkpopup_lecteurs', CopixZone::process('annuaire|linkpopup', array('field' => 'lecteurs', 'profil' => 'USER_VIL'))); $toReturn = $tpl->fetch('fiche-actions-droits-zone.tpl'); return true; }
public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $tpl->assign('title', isset($this->_params['title']) ? $this->_params['title'] : CopixI18N::get('messages.titlePage.confirm')); if (isset($this->_params['message'])) { $tpl->assign('message', $this->_params['message']); } $tpl->assign('confirm', $this->_params['confirm']); $tpl->assign('cancel', $this->_params['cancel']); $toReturn = $tpl->fetch('generictools|messages.confirm.tpl'); return true; }
/** * Affiche une liste déroulante vide * * @author Christophe Beyer <*****@*****.**> * @since 2006/01/19 * @param integer $value Valeur actuelle de la combo * @param string $fieldName Nom du champ de type SELECT qui en résulte * @param string $attribs Attributs HTML de la liste (STYLE, ONCHANGE...) */ public function _createContent(&$toReturn) { $value = $this->getParam('value') ? $this->getParam('value') : 0; $fieldName = $this->getParam('fieldName') ? $this->getParam('fieldName') : NULL; $attribs = $this->getParam('attribs') ? $this->getParam('attribs') : NULL; $tpl = new CopixTpl(); $tpl->assign('value', $value); $tpl->assign('fieldName', $fieldName); $tpl->assign('attribs', $attribs); $toReturn = $tpl->fetch('comboempty.tpl'); return true; }
public function _createContent(&$toReturn) { $tpl = new CopixTpl(); //$service = & CopixClassesFactory::Create ('Album'); $nbPages = intval($this->getParam('nbPages')); $page = intval($this->getParam('page')); $url = $this->getParam('url'); $separator_type = $this->getParam('separator', '?'); // Nb de pages � afficher de chaque c�t� de la page courante $autour = $this->getParam('autour', 3); // Nb de pages � chaque bout de la r�gle $extremite = $this->getParam('extremite', 1); if ($nbPages < 2) { return true; } $autourFrom = $page - $autour < 1 ? 1 : $page - $autour; $autourTo = $page + $autour > $nbPages ? $nbPages : $page + $autour; //print_r2($autourFrom); //print_r2($autourTo); $sep1 = $sep2 = '...'; $pages1 = $pages2 = $pages3 = array(); $pages1 = range(1, 0 + $extremite); $pages2 = range($autourFrom, $autourTo); $pages3 = range($nbPages - $extremite + 1, $nbPages); if ($autourFrom <= $extremite + 1) { // Les premiers ... sautent $sep1 = ''; } if ($autourTo >= $nbPages - $extremite) { // Les deuxi�mes ... sautent $sep2 = ''; } if (!$sep1) { // On fusionne les premiers tableaux $pages2 = array_unique(array_merge($pages1, $pages2)); $pages1 = array(); } if (!$sep2) { // On fusionne les derniers tableaux $pages2 = array_unique(array_merge($pages2, $pages3)); $pages3 = array(); } $pages = range(1, $nbPages); $tpl->assign('nbPages', $nbPages); $tpl->assign('page', $page); //$tpl->assign('pages', $pages); $tpl->assign('pages1', $pages1); $tpl->assign('pages2', $pages2); $tpl->assign('pages3', $pages3); $tpl->assign('url', $url); $tpl->assign('sep1', $sep1); $tpl->assign('sep2', $sep2); $tpl->assign('separator', $separator_type); // retour de la fonction : $toReturn = $tpl->fetch('reglettepages.tpl'); return true; }
/** * Affichage des dernieres pages d'un blog au format Javascript * * @author Christophe Beyer <*****@*****.**> * @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; }
public function _createContent(&$toReturn) { $moduleName = CopixZone::getParam('moduleName'); $arDependency = CopixModule::getDependenciesForDelete($moduleName); $tpl = new CopixTpl(); $tpl->assign('arDependency', $arDependency); $tpl->assign('arModuleToDelete', $arDependency); CopixSession::set('arModuleToDelete', $arDependency, 'copix'); $tpl->assign('id', uniqid()); $tpl->assign('arModuleToDelete', $arDependency); $toReturn = $tpl->fetch('delete.script.tpl'); return true; }
/** * Création du contenu * @param string $toReturn le contenu */ public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $profil = $this->getParam('profil'); $nbitems = $this->getParam('nbitems'); $niveau = CopixLog::getLog($profil, $nbitems); $tpl->assign('logs', $niveau); $tpl->assign('profil', $profil); $tpl->assign('nbitems', $nbitems); //$tpl->assign ('page', $page); $toReturn = $tpl->fetch('logs.list.php'); return true; }
public function _createContent(&$toReturn) { $tpl = new CopixTpl(); $serviceDate = new DateService(); if ($this->getParam('e') == 1) { $tpl->assign('showError', $this->getParam('e')); } $tpl->assign('listAgendas', $this->getParam('listAgendas')); $tpl->assign('arError', $this->getParam('errors')); $tpl->assign('toEdit', $this->getParam('toEdit')); $toReturn = $tpl->fetch('editlecon.agenda.tpl'); return true; }
public function _createContent(&$toReturn) { //load TPL $tpl = new CopixTpl(); //get the id for current zone (force int) $idZone = $this->getParam('idZone') * 1; $catalog = $this->getParam('catalog'); $enseignants = array(); $oEns = array(); //check the matrix right for current classe : if ($this->matrix->ecole($idZone)->_right->enseignant->voir) { $annuaireService =& CopixClassesFactory::Create('annuaire|AnnuaireService'); //get the children's node $childNodeDatas = Kernel::getNodeChilds('BU_ECOLE', $idZone, false, array('skip_user' => true)); //if the child is a CLASSE get the enseignant foreach ($childNodeDatas as $child) { if ($child['type'] == 'BU_CLASSE') { $enseignants[] = $annuaireService->getEnseignantInClasse($child['id']); } } /* * delete the multiple ereg */ $uniqueEnsId = array(); foreach ($enseignants as $enseignant) { foreach ($enseignant as $ens) { //check if the ens is already ereg if (in_array($ens['id'], $uniqueEnsId)) { continue; } else { $oEns[] = $ens; $uniqueEnsId[] = $ens['id']; } } } /* * get the school's picture */ $pic = $this->model->query('SELECT photo FROM module_fiches_ecoles WHERE id = ' . $idZone)->toString(); $tpl->assign('ens', $oEns); $tpl->assign('pic', $pic); $tpl->assign('idZone', $idZone); $tpl->assign('catalog', $catalog); //return the html content $toReturn = $tpl->fetch('zone.dashboard.ecole.tpl'); return true; } //if the uses have no right : display a default tpl $toReturn = $tpl->fetch('zone.dashboard.noRight.tpl'); return true; }