本文整理汇总了PHP中CopixI18N::get方法的典型用法代码示例。如果您正苦于以下问题:PHP CopixI18N::get方法的具体用法?PHP CopixI18N::get怎么用?PHP CopixI18N::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CopixI18N
的用法示例。
在下文中一共展示了CopixI18N::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _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;
}
示例2: checkPrefs
public function checkPrefs($module, $data)
{
define('AVATAR_MAX_BYTES', 100000);
define('AVATAR_MAX_PIXELS', 100);
$error = array();
if ($data['passwd1'] != '' || $data['passwd2'] != '') {
if ($data['passwd1'] != $data['passwd2']) {
$error['passwd2'] = CopixI18N::get('prefs.config.passwd.error.notsame');
$error['passwd1'] = " ";
}
if (strlen($data['passwd1']) < 5) {
$error['passwd1'] = CopixI18N::get('prefs.config.passwd.error.tooshort');
}
}
if (isset($_FILES) && $_FILES['prefs_avatar_upload']['name']) {
if (!in_array($_FILES['prefs_avatar_upload']['type'], array('image/jpeg', 'image/gif', 'image/png'))) {
$error['avatar_upload'] = CopixI18N::get('prefs.config.avatar.error_format');
} elseif ($_FILES['prefs_avatar_upload']['size'] > AVATAR_MAX_BYTES) {
$error['avatar_upload'] = CopixI18N::get('prefs.config.avatar.error_bytes');
} elseif ((list($width, $height, $type, $attr) = getimagesize($_FILES['prefs_avatar_upload']['tmp_name'])) && max($width, $height) > AVATAR_MAX_PIXELS) {
$error['avatar_upload'] = CopixI18N::get('prefs.config.avatar.error_pixels');
} elseif ($_FILES['prefs_avatar_upload']['error'] != 0) {
$error['avatar_upload'] = CopixI18N::get('prefs.config.avatar.error_inconnue');
}
}
$data['alerte_mail_email'] = trim($data['alerte_mail_email']);
if (isset($data['alerte_mail_email']) && $data['alerte_mail_email'] != '') {
// if( !ereg( "@", $data['alerte_mail_email'] ) )
if (!validateEMail($data['alerte_mail_email'])) {
$error['alerte_mail_email'] = CopixI18N::get('prefs.config.mail.bad_email');
}
}
return $error;
}
示例3: go
/**
* 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);
}
示例4: beforeAction
public function beforeAction()
{
_currentUser()->assertCredential('module:*||access|@gestionautonome');
$this->menu = array();
switch (_request('action')) {
case 'createGrade':
case 'validateGradeCreation':
case 'manageGrades':
$current = 'manageGrades';
break;
default:
$current = 'showTree';
}
if (Kernel::isAdmin() || _currentUser()->hasAssistance('can_comptes')) {
if (CopixConfig::exists('kernel|gestionAutonomeEnabled') && CopixConfig::get('kernel|gestionAutonomeEnabled')) {
$this->menu[] = array('txt' => CopixI18N::get('comptes|comptes.menu.getUsers'), 'url' => CopixUrl::get('gestionautonome||showTree'), 'type' => 'users', 'current' => $current == 'showTree' ? 'current' : '');
} else {
$this->menu[] = array('txt' => CopixI18N::get('comptes|comptes.menu.getUsers'), 'url' => CopixUrl::get('comptes||'), 'type' => 'users');
}
$this->menu[] = array('txt' => CopixI18N::get('comptes|comptes.menu.getExt'), 'url' => CopixUrl::get('comptes||getUserExt'), 'type' => 'acl', 'current' => $current == 'getUsersExt' ? 'current' : '');
}
if (Kernel::isAdmin()) {
$this->menu[] = array('txt' => CopixI18N::get('comptes|comptes.menu.getRoles'), 'url' => CopixUrl::get('comptes||getRoles'), 'type' => 'acl', 'current' => $current == 'list' ? 'current' : '');
$this->menu[] = array('txt' => CopixI18N::get('comptes|comptes.menu.manageGrades'), 'url' => CopixUrl::get('gestionautonome||manageGrades'), 'type' => 'agendalist', 'current' => $current == 'manageGrades' ? 'current' : '');
}
$session = _sessionGet('modules|comptes|doLoginCreate|success');
if ($session && is_array($session) && sizeof($session)) {
$this->menu[] = array('txt' => CopixI18N::get('comptes|comptes.strings.showloginresult', sizeof($session)), 'url' => CopixUrl::get('comptes||getLoginResult'), 'size' => 145);
}
$this->addJs('js/iconito/module_gestionautonome.js');
}
示例5: getMagicMail
/**
* Configuration de MagicMail
*
* @author Frederic Mossmann <fmossmann@cap-tic.fr>
* @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);
}
示例6: getUsers
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);
}
示例7: _createContent
public function _createContent(&$toReturn)
{
//Getting the user.
//Create Services, and DAO
$tpl = new CopixTpl();
$tpl->assign('blog', $this->getParam('blog', null));
$tpl->assign('kind', $this->getParam('kind', null));
$tpl->assign('id_blog', $this->getParam('id_blog', ''));
$tpl->assign('errors', $this->getParam('errors', ''));
$tpl->assign('showErrors', $this->getParam('showErrors', ''));
$tpl->assign('logoPath', $this->getParam('logoPath', null));
$tpl->assign('tabBlogFunctions', $this->getParam('tabBlogFunctions', null));
$tpl->assign('can_format_articles', CopixConfig::get('blog|blog.default.can_format_articles'));
$tpl->assign('is_public', array('values' => array(1, 0), 'output' => array(CopixI18N::get('blog|blog.oui'), CopixI18N::get('blog|blog.non'))));
$tpl->assign('has_comments_activated', array('values' => array(1, 0), 'output' => array(CopixI18N::get('blog|blog.oui'), CopixI18N::get('blog|blog.non'))));
$tpl->assign('type_moderation_comments', array('values' => array('POST', 'PRE'), 'output' => array(CopixI18N::get('blog|blog.type_moderation_comments.post'), CopixI18N::get('blog|blog.type_moderation_comments.pre'))));
if (CopixConfig::get('blog|blog.default.can_format_articles')) {
$formats = CopixConfig::get('blog|blog.formats_articles');
$tabFormats = explode(',', $formats);
$values = $output = array();
foreach ($tabFormats as $k) {
$values[] = $k;
$output[] = CopixI18N::get('blog|blog.default_format_articles.' . $k);
}
$tpl->assign('default_format_articles', array('values' => $values, 'output' => $output));
} else {
$tpl->assign('default_format_articles', CopixConfig::get('blog|blog.default.default_format_articles'));
}
$tpl->assign('logo_max_width', CopixConfig::get('blog|blog.default.logo_max_width'));
// retour de la fonction :
$toReturn = $tpl->fetch('blog.edit.tpl');
return true;
}
示例8: getRegistration
/**
* Gets the registration page
*/
function getRegistration()
{
$_template =& new CopixTpl();
$_template->assign('TITLE_PAGE', 'Registration page');
$_template->assign('MAIN', '<h3>' . CopixI18N::get('|views.common.s0006') . '</h3>' . "\n" . $this->processZone('registration'));
return new CopixActionReturn(COPIX_AR_DISPLAY, $_template);
}
示例9: home
/**
* Accueil des stats
*
* @author Christophe Beyer <cbeyer@cap-tic.fr>
* @since 2007/03/19
*/
public function home()
{
if (!Admin::canAdmin()) {
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('sysutils|admin.menu.stats'));
$tpl->assign('MENU', Admin::getMenu('stats'));
$tplStats = new CopixTpl();
$modules = Kernel::getAllModules();
$tab = array();
foreach ($modules as $mod_val) {
$arModulesPath = CopixConfig::instance()->arModulesPath;
foreach ($arModulesPath as $modulePath) {
$class_file = $modulePath . $mod_val . '/' . COPIX_CLASSES_DIR . 'kernel' . $mod_val . '.class.php';
if (!file_exists($class_file)) {
continue;
}
$module_class =& CopixClassesFactory::Create($mod_val . '|Kernel' . $mod_val);
//print_r($module_class);
if (!is_callable(array($module_class, 'getStatsRoot'))) {
continue;
}
//$classeModule = CopixClassesFactory::create("$label|Kernel$label");
$tab[$mod_val]['module_nom'] = Kernel::Code2Name('mod_' . $mod_val);
$tab[$mod_val]['stats'] = $module_class->getStatsRoot();
}
}
//print_r($tab);
$tplStats->assign('tab', $tab);
$tpl->assign('MAIN', $tplStats->fetch('sysutils|stats.modules.tpl'));
return new CopixActionReturn(COPIX_AR_DISPLAY, $tpl);
}
示例10: processSelectPage
public function processSelectPage()
{
$tpl = new CopixTpl();
$tpl->assign('TITLE_PAGE', CopixI18N::get('htmleditor.title.pageSelect'));
$tpl->assignZone('MAIN', 'htmleditor|SelectPage', array('onlyLastVersion' => 1, 'editorName' => CopixRequest::get('editorName', null, true), 'popup' => CopixRequest::get('popup', null, true)));
return new CopixActionReturn(CopixActionReturn::DISPLAY_IN, $tpl, '|blank.tpl');
}
示例11: CopixModuleFileSelector
/**
* instanciation d'un objet plugin.
* instancie également l'objet de configuration associé
* @param string $name nom du plugin
* @param string $conf nom d'un fichier de configuration alternatif. si chaine vide = celui par défaut
* @return CopixPlugin le plugin instancié
*/
function &create($name, $conf = null)
{
require_once COPIX_CORE_PATH . 'CopixPlugin.class.php';
$fic =& new CopixModuleFileSelector($name);
$nom = strtolower($fic->fileName);
$path = $fic->getPath(COPIX_PLUGINS_DIR) . $nom . '/';
$path_plugin = $path . $nom . '.plugin.php';
if (is_null($conf)) {
$path_config = $path . $nom . '.plugin.conf.php';
} else {
$path_config = $path . $conf;
}
if (is_file($path_plugin) && is_file($path_config)) {
require_once $path_config;
require_once $path_plugin;
$classname = 'PluginConfig' . $fic->fileName;
//nom de la classe de configuration.
$config =& new $classname();
//en deux étapes, impossible de mettre la ligne dans les paramètres du constructeur.
$name = 'Plugin' . $fic->fileName;
$toReturn =& new $name($config);
//nouvel objet plugin, on lui passe en paramètre son objet de configuration.
} else {
trigger_error(CopixI18N::get('copix:copix.error.unfounded.plugin', $name), E_USER_ERROR);
$toReturn = null;
}
return $toReturn;
}
示例12: _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;
}
示例13: _createContent
/**
* Affiche le chemin d'accès à une discussion ou un forum, depuis la racine d'un forum
*
* Les paramètres dépendent de la navigation dans le forum (il suffit de passer un paramètre)
*
* @author Christophe Beyer <cbeyer@cap-tic.fr>
* @since 2005/11/08
* @param integer $forum Id du forum
* @param integer $topic Id de la discussion
* @param integer $message Id du message
* @param integer $modifyTopic Id de la discussion (formulaire de modification)
*/
public function _createContent(&$toReturn)
{
$tpl = new CopixTpl();
$forum = $this->getParam('forum') ? $this->getParam('forum') : NULL;
$topic = $this->getParam('topic') ? $this->getParam('topic') : NULL;
$message = $this->getParam('message') ? $this->getParam('message') : NULL;
$modifyTopic = $this->getParam('modifyTopic') ? $this->getParam('modifyTopic') : NULL;
$res = array();
if ($forum) {
$res[] = array("libelle" => CopixI18N::get('forum|forum.poucetIndex'), "lien" => CopixUrl::get('forum||getForum', array("id" => $forum->id)));
} elseif ($topic) {
$res[] = array("libelle" => CopixI18N::get('forum|forum.poucetIndex'), "lien" => CopixUrl::get('forum||getForum', array("id" => $topic->forum)));
$res[] = array("libelle" => $topic->titre, "lien" => CopixUrl::get('forum||getTopic', array("id" => $topic->id)));
} elseif ($message) {
$res[] = array("libelle" => CopixI18N::get('forum|forum.poucetIndex'), "lien" => CopixUrl::get('forum||getForum', array("id" => $message->forum)));
$res[] = array("libelle" => $message->topic_titre, "lien" => CopixUrl::get('forum||getTopic', array("id" => $message->topic)));
} elseif ($modifyTopic) {
//print_r($modifyTopic);
$res[] = array("libelle" => CopixI18N::get('forum|forum.poucetIndex'), "lien" => CopixUrl::get('forum||getForum', array("id" => $modifyTopic->forum)));
$res[] = array("libelle" => $modifyTopic->titre, "lien" => CopixUrl::get('forum||getTopic', array("id" => $modifyTopic->id)));
}
$tpl->assign('petitpoucet', $res);
// retour de la fonction :
$toReturn = $tpl->fetch('petitpoucet.tpl');
return true;
}
示例14: getPrefs
/**
* Renvoie les préférences du module
*
* @author Christophe Beyer <cbeyer@cap-tic.fr>
* @since 2006/05/05
* @param array $data (option) Tableau avec les données (venues de la base)
* @return array Tableau de tableaux avec toutes les préférences
*/
public function getPrefs($data = null)
{
$toReturn = array();
$toReturn['name'] = 'Minimail';
$toReturn['form'] = array(array('type' => 'titre', 'text' => CopixI18N::get('minimail|minimail.config.alerte.title'), 'expl' => CopixI18N::get('minimail|minimail.config.alerte.expl')), array('code' => 'alerte_minimail', 'type' => 'checkbox', 'text' => CopixI18N::get('minimail|minimail.config.alerte.active'), 'value' => $data['alerte_minimail'] ? true : false));
return $toReturn;
}
示例15: processDefault
public function processDefault()
{
_classInclude('sysutils|admin');
if (!Admin::canAdmin()) {
return CopixActionGroup::process('genericTools|Messages::getError', array('message' => CopixI18N::get('kernel|kernel.error.noRights'), 'back' => CopixUrl::get()));
}
echo "Récupération des classeurs de classe sans casier\n";
echo "----------------------------------------------------------------------\n\n";
// Récupération des classeurs de classe sans casier
$sql = 'SELECT DISTINCT module_classeur.id' . ' FROM kernel_mod_enabled, module_classeur' . ' LEFT JOIN module_classeur_dossier ON (module_classeur_dossier.module_classeur_id = module_classeur.id)' . ' WHERE module_classeur.id = kernel_mod_enabled.module_id' . ' AND kernel_mod_enabled.module_type = "MOD_CLASSEUR"' . ' AND kernel_mod_enabled.node_type = "BU_CLASSE"' . ' AND (module_classeur_dossier.id IS NULL' . ' OR module_classeur_dossier.id NOT IN (SELECT id FROM module_classeur_dossier WHERE casier = 1 AND module_classeur_id = module_classeur.id))';
$results = _doQuery($sql);
$dossierDAO = _ioDAO('classeur|classeurdossier');
_classInclude('classeur|classeurService');
echo count($results) . " casiers à créer.\n";
foreach ($results as $result) {
$casier = _record('classeur|classeurdossier');
$casier->classeur_id = $result->id;
$casier->parent_id = 0;
$casier->nom = CopixI18N::get('classeur|classeur.casierNom');
$casier->nb_dossiers = 0;
$casier->nb_fichiers = 0;
$casier->taille = 0;
$casier->cle = classeurService::createKey();
$casier->casier = 1;
$casier->date_creation = date('Y-m-d H:i:s');
$dossierDAO->insert($casier);
echo "Casier du classeur {$result->id} créé avec succès !\n";
}
echo "\n\nFin de la tâche";
return _arNone();
}