本文整理汇总了PHP中_arPPO函数的典型用法代码示例。如果您正苦于以下问题:PHP _arPPO函数的具体用法?PHP _arPPO怎么用?PHP _arPPO使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_arPPO函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processDefault
public function processDefault()
{
$this->matrix =& enic::get('matrix');
$ppo = new CopixPPO();
$ppo->matrix = $this->matrix->display();
return _arPPO($ppo, 'matrix.tpl');
}
示例2: processAdmin
public function processAdmin()
{
$mailConf = $this->service('mailExtService')->getConf();
//test if error occured
if (isset($this->flash->error) && $this->flash->error || isset($this->flash->validMailConf)) {
$modifId = $this->flash->mailConfId;
if ($modifId == 'new') {
//build new item from error array
$newItem = $this->flash->formData;
$newItem['error'] = $this->flash->errorMsg;
array_unshift($mailConf, $newItem);
} else {
foreach ($mailConf as $k => $mail) {
if ($modifId != $mail['id']) {
continue;
}
if (isset($this->flash->error)) {
$mailConf[$k] = $this->flash->formData;
$mailConf[$k]['error'] = $this->flash->errorMsg;
} else {
$mailConf[$k]['valid'] = $this->flash->validMailConf;
}
break;
}
}
}
$ppo = new CopixPPO();
$ppo->mailConf = $mailConf;
if (isset($this->flash->validMailConf)) {
$ppo->validMailConf = $this->flash->validMailConf;
}
$this->addCss('styles/module_mailext.css');
return _arPPO($ppo, 'admin.tpl');
}
示例3: processDefault
public function processDefault()
{
$ppo = new CopixPPO();
$ppo->items = $this->service->getItems();
$ppo->source = $this->service->getSource();
$ppo->summary = $this->service->getSummary();
$ppo->title = $this->service->getTitle();
return _arPPO($ppo, 'default.tpl');
}
示例4: processWelcome
/**
* Page d'accueil du framework
*/
public function processWelcome()
{
$ppo = new CopixPPO();
$ppo->TITLE_PAGE = _i18n('default.welcome2Copix3');
try {
CopixDB::getConnection();
$ppo->dbOK = true;
} catch (Exception $e) {
$ppo->dbOK = false;
}
return _arPPO($ppo, 'welcome.php');
}
示例5: processCreate
/**
* Création du mail avec vérification des paramètres
*/
public function processCreate()
{
$ppo = new CopixPPO();
$ppo->TITLE_PAGE = _i18n('email.create');
$ppo->infomail = _class("emailservices")->getInfoMail();
if (($ppo->mail = CopixSession::get('admin|email|donnees')) == null) {
CopixSession::set('admin|email|donnees', _class("emailservices")->newMail());
$ppo->mail = CopixSession::get('admin|email|donnees');
}
$ppo->sending = _request('sending', 'false');
$ppo->errors = _request('error');
return _arPPO($ppo, 'email.tpl');
}
示例6: processDefault
/**
* Affiche la liste des thèmes disponibles
*/
public function processDefault()
{
$ppo = new CopixPPO();
$ppo->TITLE_PAGE = _i18n('themes.titlePage.selectTheme');
$arThemes = CopixTpl::getThemesList();
$arThemesInfos = array();
$ppo->arThemes = array();
foreach ($arThemes as $theme) {
$ppo->arThemes[] = CopixTpl::getThemeInformations($theme);
}
$ppo->selectedTheme = CopixConfig::get('defaultThemeId');
return _arPPO($ppo, 'theme.list.tpl');
}
示例7: processDefault
public function processDefault()
{
$ppo = new CopixPPO();
if (!$this->service->loadxml()) {
return $this->error('rssetagere.notfound', true, '||');
}
$ppo->title = $this->service->getTitle();
$ppo->desc = $this->service->getDescription();
$ppo->items = $this->service->getItems();
$ppo->isEns = $this->user->type == 'USER_ENS';
$ppo->listUrl = $this->helpers->config('rssetagere|list_url');
return _arPPO($ppo, 'default.tpl');
}
示例8: fiche
/**
* Affichage de la fiche d'une ecole
*
* @author Christophe Beyer <cbeyer@cap-tic.fr>
* @since 2008/09/03
* @param integer $id Id de l'ecole
* @param integer $popup 1 pour afficher la fiche en popup Fancybox
*/
public function fiche()
{
$id = $this->getRequest('id', null);
$iPopup = CopixRequest::getInt('popup');
$ecoleDAO = CopixDAOFactory::create('kernel|kernel_bu_ecole');
$ficheDAO = CopixDAOFactory::create("fiches_ecoles");
$criticErrors = array();
if (!($rEcole = $ecoleDAO->get($id))) {
$criticErrors[] = CopixI18N::get('fichesecoles.error.param');
} elseif (!FichesEcolesService::canMakeInFicheEcole($id, 'VIEW')) {
$criticErrors[] = CopixI18N::get('kernel|kernel.error.noRights');
}
if ($criticErrors) {
return CopixActionGroup::process('genericTools|Messages::getError', array('message' => implode('<br/>', $criticErrors), 'back' => CopixUrl::get('annuaire||')));
}
$rFiche = $ficheDAO->get($id);
$tpl = new CopixTpl();
CopixHtmlHeader::addJSLink(CopixUrl::get() . 'js/iconito/module_fichesecoles.js');
$fiche = CopixZone::process('fiche', array('rEcole' => $rEcole, 'rFiche' => $rFiche));
$main = $fiche;
$title = $rEcole->nom;
if ($rEcole->type) {
$title .= ' (' . $rEcole->type . ')';
}
$tpl->assign('TITLE_PAGE', $title);
// Get vocabulary catalog to use
$nodeVocabularyCatalogDAO = _ioDAO('kernel|kernel_i18n_node_vocabularycatalog');
$vocabularyCatalog = $nodeVocabularyCatalogDAO->getCatalogForNode('BU_ECOLE', $rEcole->numero);
if (strtolower($rEcole->type) == 'crèche') {
$tpl->assign('TITLE_CONTEXT', CopixI18N::get('kernel|kernel.codes.mod_fichesecoles_creche'));
} else {
$tpl->assign('TITLE_CONTEXT', CopixCustomI18N::get('kernel|kernel.codes.mod_fiche%%structure%%', array('catalog' => $vocabularyCatalog->id_vc)));
}
$menu = array();
$menu[] = array('url' => CopixUrl::get('public||getListBlogs'), 'txt' => CopixCustomI18N::get('public|public.blog.annuaire.%%structures%%', array('catalog' => $vocabularyCatalog->id_vc)));
if (Kernel::is_connected()) {
$menu[] = array('url' => CopixUrl::get('annuaire||getAnnuaireEcole', array('ecole' => $rEcole->numero)), 'txt' => CopixCustomI18N::get('annuaire|annuaire.back%%structure%%', array('catalog' => $vocabularyCatalog->id_vc)));
}
if (CopixConfig::exists('|can_annuaire_menu') && !CopixConfig::get('|can_annuaire_menu')) {
$menu = array();
}
$tpl->assign('MENU', $menu);
$tpl->assign("MAIN", $main);
if ($iPopup) {
$ppo = new CopixPPO();
$ppo->fiche = $fiche;
$ppo->TITLE = $title;
return _arPPO($ppo, array('template' => 'fiche_popup.tpl', 'mainTemplate' => 'main|main_fancy.php'));
}
return new CopixActionReturn(COPIX_AR_DISPLAY, $tpl);
}
示例9: processDefault
/**
* Action par défaut
*
* @return CopixPPO
*/
public function processDefault()
{
$ppo = new CopixPPO();
$ppo->home_url = CopixConfig::get('default|homePage');
if (strpos($ppo->home_url, 'http://') !== 0) {
$ppo->home_url = _url() . $ppo->home_url;
}
$ppo->search_url = CopixConfig::get('404|search_url');
$ppo->sitemap_url = CopixConfig::get('404|sitemap_url');
// Mise en place des en-têtes 404
header("HTTP/1.0 404 Not Found");
header("Status: 404 Not found");
return _arPPO($ppo, 'default.tpl');
}
示例10: processShow
/**
* Page d'affichage des logs
*/
public function processShow()
{
$ppo = new CopixPPO();
$profil = _request('profile');
$nbitems = _request('nbitems', 20);
$ppo->TITLE_PAGE = _i18n('logs.show');
$ppo->profil = $profil;
$ppo->nbitems = $nbitems;
$page = _request('page', null) !== null ? _request('page', null) : 1;
CopixSession::set('log|numpage', $page);
foreach (CopixConfig::instance()->copixlog_getRegistered() as $profil) {
$ppo->profils[$profil] = $profil;
}
return _arPPO($ppo, array('template' => 'logs.show.php'));
}
示例11: processDefault
public function processDefault()
{
$ppo = new CopixPPO();
// Le KNE est activé sur une classe, il nous faut son école
$classId = (int) $this->request('id_classe');
$parent = Kernel::getNodeParents('BU_CLASSE', $classId);
if ($parent[0] && $parent[0]['type'] == 'BU_ECOLE') {
$schoolId = (int) $parent[0]['id'];
} else {
$schoolId = null;
}
$KneRessources = $this->service('KneService')->getRessources($schoolId);
$ppo->ressources = $KneRessources;
return _arPPO($ppo, 'default.tpl');
}
示例12: processDefault
/**
* Ecran d'accueil des opérations d'administration
*
*/
public function processDefault()
{
//Inclusion de la classe checker pour tester les pré-requis
_classInclude('InstallChecker');
$checker = new InstallChecker();
$ppo = new CopixPPO();
$ppo->TITLE_PAGE = _i18n('install.title.admin');
$tips = $this->_getTips();
$ppo->tips = $tips->tips;
$ppo->warning = $tips->warning;
$ppo->homePageUrl = CopixConfig::get('|homePage');
$ppo->pdomysqlEnabled = $checker->typeDbInstalled('pdo_mysql');
if (!$ppo->pdomysqlEnabled) {
$ppo->tips[] = _i18n('install.tips.pdomysql');
}
$ppo->phpunitEnabled = @(include_once 'PHPUnit/Framework.php');
if (!$ppo->phpunitEnabled) {
$ppo->tips[] = _i18n('install.tips.unittest');
}
$ppo->databaseEnabled = $checker->isValidDefaultDatabase();
if (!$ppo->databaseEnabled) {
$ppo->tips[] = _i18n('install.tips.database');
}
if (!_currentUser()->testCredential('basic:admin')) {
$ppo->tips = array();
}
// recherche des liens
$ppo->links = array();
foreach (CopixModule::getList() as $moduleName) {
$moduleInformations = CopixModule::getInformations($moduleName);
// si on a au moins un lien
if (count($moduleInformations->admin_links) > 0) {
$groupid = !is_null($moduleInformations->admin_links_group->id) ? $moduleInformations->admin_links_group->id : uniqid();
foreach ($moduleInformations->admin_links as $linkInformations) {
if ($linkInformations['credentials'] == null || CopixAuth::getCurrentUser()->testCredential($linkInformations['credentials'])) {
$ppo->links[$groupid]['modules'][][$linkInformations['url']] = $linkInformations['caption'];
$ppo->links[$groupid]['caption'] = $moduleInformations->description;
$ppo->links[$groupid]['groupcaption'] = $moduleInformations->admin_links_group->caption;
$ppo->links[$groupid]['icon'] = !is_null($moduleInformations->admin_links_group->icon) ? $moduleInformations->admin_links_group->icon : $moduleInformations->icon;
}
}
}
}
return _arPPO($ppo, 'admin.tpl');
}
示例13: processEdit
/**
* Page de modification d'un utilisateur
*/
public function processEdit()
{
//création du tableau d'erreur
$errors = array();
if (CopixRequest::get('loginNotAvailable', '0') == 1) {
$errors[] = _i18n('auth.error.loginNotAvailable');
}
if (CopixRequest::get('loginEmpty', '0') == 1) {
$errors[] = _i18n('auth.error.loginEmpty');
}
if (CopixRequest::get('passwordDoNotMatch', '0') == 1) {
$errors[] = _i18n('auth.error.passwordDoNotMatch');
}
if (CopixRequest::get('passwordEmpty', '0') == 1) {
$errors[] = _i18n('auth.error.passwordEmpty');
}
if (CopixRequest::get('emailEmpty', '0') == 1) {
$errors[] = _i18n('auth.error.emailEmpty');
}
if (CopixRequest::get('emailIsBad', '0') == 1) {
$errors[] = _i18n('auth.error.emailIsBad');
}
if (CopixRequest::get('confirmCodeBad', '0') == 1) {
$errors[] = _i18n('auth.error.confirmCodeBad');
}
//Affichage de la page
$ppo = new CopixPPO();
$ppo->TITLE_PAGE = _i18n('auth.newUser');
$ppo->errors = $errors;
$ppo->createInProcess = "true";
$ppo->createUser = Copixconfig::get('auth|createUser');
$ppo->typeConfirm = Copixconfig::get('auth|typeConfirm');
// Cherche les valeurs du formulaire si l'ont est en mode réédition
if (($idForm = CopixRequest::get('idForm', '0')) != 0) {
$user = CopixSession::get('auth|createForm', $idForm);
if ($user !== null) {
CopixSession::destroyNamespace($idForm);
$ppo->user = $user;
}
}
return _arPPO($ppo, 'user.edit.php');
}
示例14: processDefault
/**
* Affiche les informations sur le serveur de base de données
*/
public function processDefault()
{
$ppo = new CopixPPO();
$ppo->TITLE_PAGE = '';
// profil de connexion utilisé actuellement
$profile = CopixDb::getConnection()->getProfile();
$parts = $profile->getConnectionStringParts();
$section = _i18n('copix.section.dbProfile', array($profile->getName()));
$sections[$section][_i18n('copix.dbProfile.connexionString')] = $profile->getConnectionString();
$sections[$section][_i18n('copix.dbProfile.driverName')] = $profile->getDriverName();
$sections[$section][_i18n('copix.dbProfile.databaseType')] = $profile->getDatabase();
$sections[$section][_i18n('copix.dbProfile.user')] = $profile->getUser();
$sections[$section][_i18n('copix.dbProfile.database')] = $parts['dbname'];
$sections[$section][_i18n('copix.dbProfile.serverName')] = isset($parts['host']) ? $parts['host'] : 'localhost';
$sections[$section][_i18n('copix.dbProfile.options')] = $profile->getOptions();
if ($profile->getDatabase() == 'mysql') {
_class('mysqlserverinfos')->fillInformations($sections);
}
$ppo->sections = $sections;
return _arPPO($ppo, 'infos.tpl');
}
示例15: processAdmin
public function processAdmin()
{
//check if the user is admin :
if (!Kernel::isAdmin()) {
return $this->error('charte.noRight', true, '||');
}
$ppo = new CopixPPO();
$ppo->errors = isset($this->flash->errors) ? $this->flash->errors : null;
$ppo->success = isset($this->flash->success) ? $this->flash->success : null;
$ppo->chartes = $this->service('CharteService')->getChartesTypes();
$ppo->radio = array(1 => 'oui', 0 => 'non');
$ppo->idClasseur = $ppo->idMalle = null;
$modsAvailable = Kernel::getModAvailable($this->user->type);
$malleAvailable = Kernel::filterModuleList($modsAvailable, 'MOD_MALLE');
// Malle activée
if (!empty($malleAvailable)) {
$modsEnabled = Kernel::getModEnabled($this->user->type, $this->user->idEn);
$mal = Kernel::filterModuleList($modsEnabled, 'MOD_MALLE');
// Si la malle est bien initialisée
if (!empty($mal)) {
$ppo->idMalle = $mal[0]->module_id;
} else {
return $this->error('charte.admin.noMalle', true, 'malle||');
}
} else {
$classeurAvailable = Kernel::filterModuleList($modsAvailable, 'MOD_CLASSEUR');
// Classeur activé
if (!empty($classeurAvailable)) {
Kernel::createMissingModules($this->user->type, $this->user->idEn);
$modsEnabled = Kernel::getModEnabled($this->user->type, $this->user->idEn);
$classeur = Kernel::filterModuleList($modsEnabled, 'MOD_CLASSEUR');
if (!empty($classeur)) {
$ppo->idClasseur = $classeur[0]->module_id;
}
}
}
CopixHTMLHeader::addCSSLink(_resource("styles/module_charte.css"));
return _arPPO($ppo, 'charte.admin.tpl');
}