本文整理汇总了PHP中CopixUrl类 的典型用法代码示例。如果您正苦于以下问题:PHP CopixUrl类的具体用法?PHP CopixUrl怎么用?PHP CopixUrl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CopixUrl类 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: 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();
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:31, 代码来源:createlockers.actiongroup.php
示例2: smarty_function_copixurl
/**
* Plugin smarty type fonction
* Purpose: generation of a copixed url
*
* Input: dest=module|desc|action
* complete syntax will be:
* desc|action for current module, desc and action
* [action or |action] default desc, action
* [|desc|action] project, desc and action
* [||action] action in the project
* [module||action] action in the default desc for the module
* [|||] the only syntax for the current page
*
* * = any extra params will be used to generate the url
*
*/
function smarty_function_copixurl($params, &$me)
{
if (isset($params['notxml'])) {
$isxml = $params['notxml'] == 'true' ? false : true;
unset($params['notxml']);
} else {
$isxml = true;
}
$assign = '';
if (isset($params['assign'])) {
$assign = $params['assign'];
unset($params['assign']);
}
if (!isset($params['dest']) && !isset($params['appendFrom'])) {
$toReturn = _url(null, array(), $isxml);
}
if (isset($params['appendFrom'])) {
$appendFrom = $params['appendFrom'];
unset($params['appendFrom']);
$toReturn = CopixUrl::appendToUrl($appendFrom, $params, $isxml);
}
if (isset($params['dest'])) {
$dest = $params['dest'];
unset($params['dest']);
$toReturn = _url($dest, $params, $isxml);
}
if (strlen($assign) > 0) {
$me->assign($assign, $toReturn);
return '';
} else {
return $toReturn;
}
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:49, 代码来源:function.copixurl.php
示例3: smarty_modifier_rss_enclosure
/**
* Plugin smarty type modifier
* Purpose: A partir d'un article du RSS, extrait ce qu'il faut afficher en "enclosure"
* Input: Chaine de caractères (tout l'article)
* Output: Chaine de caractères (tags <enclosure> avec le bonc ontenu ou chaine vide si aucun contenu multimédia
* Example: {$text|rss_enclosure}
* @return string
*/
function smarty_modifier_rss_enclosure($string)
{
$txt = '';
//<enclosure url="http://www.scripting.com/mp3s/weatherReportSuite.mp3" length="12216320" type="audio/mpeg" />
if (preg_match_all("/\\[\\[(.*)\\]\\]/sU", $string, $regs, PREG_SET_ORDER)) {
//print_r($regs);
foreach ($regs as $reg) {
//print_r($reg);
list($url, $type) = explode("|", $reg[1]);
$url = rawurldecode($url);
$length = @filesize($url);
$ext = substr($url, strrpos($url, ".") + 1);
$infos = MalleService::getTypeInfos('', $url);
//print_r($infos);
if ($length && $infos['type_mime']) {
$file = $url;
$pos = strrpos($file, '/');
if ($pos === false) {
$name = $file;
$href = $name;
} else {
$name = substr($file, $pos + 1);
$href = substr($file, 0, $pos + 1) . rawurlencode($name);
}
$txt .= '<enclosure url="' . CopixUrl::get() . $href . '" length="' . $length . '" type="' . $infos['type_mime'] . '" />';
}
}
}
return $txt;
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:38, 代码来源:modifier.rss_enclosure.php
示例4: _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 <[email protected] >
* @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;
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:38, 代码来源:petitpoucet.zone.php
示例5: processDefault
public function processDefault()
{
$tpl = new CopixTpl();
$tplModule = new CopixTpl();
//if user is not connected :
if (1) {
// S'il y a un blog prevu a l'accueil
$dispBlog = false;
$getKernelLimitsIdBlog = Kernel::getKernelLimits('id_blog');
if ($getKernelLimitsIdBlog) {
_classInclude('blog|kernelblog');
if ($blog = _ioDao('blog|blog')->getBlogById($getKernelLimitsIdBlog)) {
// On v�rifie qu'il y a au moins un article
$stats = KernelBlog::getStats($blog->id_blog);
if ($stats['nbArticles']['value'] > 0) {
$dispBlog = true;
}
}
}
if ($dispBlog) {
//return CopixActionGroup::process ('blog|frontblog::getListArticle', array ('blog'=>$blog->url_blog));
return new CopixActionReturn(COPIX_AR_REDIRECT, CopixUrl::get('blog||', array('blog' => $blog->url_blog)));
}
if (!CopixConfig::exists('|can_public_rssfeed') || CopixConfig::get('|can_public_rssfeed')) {
CopixHtmlHeader::addOthers('<link rel="alternate" href="' . CopixUrl::get('public||rss', array()) . '" type="application/rss+xml" title="' . htmlentities(CopixI18N::get('public|public.rss.flux.title')) . '" />');
}
CopixHTMLHeader::addCSSLink(_resource("styles/module_fichesecoles.css"));
$tplModule->assign('user', _currentUser());
$result = $tplModule->fetch('welcome|welcome_' . CopixI18N::getLang() . '.tpl');
$tpl->assign('TITLE_PAGE', '' . CopixI18N::get('public|public.welcome.title'));
$tpl->assign('MAIN', $result);
return new CopixActionReturn(COPIX_AR_DISPLAY, $tpl);
}
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:34, 代码来源:default.actiongroup.php
示例6: home
/**
* Accueil des stats
*
* @author Christophe Beyer <[email protected] >
* @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);
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:39, 代码来源:stats.actiongroup.php
示例7: processLogin
public function processLogin()
{
include_once COPIX_UTILS_PATH . '../../CAS-1.2.2/CAS.php';
$_SESSION['chartValid'] = false;
$ppo = new CopixPPO();
$ppo->user = _currentUser();
if ($ppo->user->isConnected()) {
$url_return = CopixUrl::get('kernel||doSelectHome');
/*
* PATCH FOR CHARTE
*/
$this->user->forceReload();
if (!$this->service('charte|CharteService')->checkUserValidation()) {
$this->flash->redirect = $url_return;
return $this->go('charte|charte|valid');
}
return _arRedirect($url_return);
//return new CopixActionReturn (COPIX_AR_REDIRECT, $url_return);
} else {
$conf_Cas_host = CopixConfig::get('default|conf_Cas_host');
$conf_Cas_port = CopixConfig::get('default|conf_Cas_port');
$conf_Cas_path = CopixConfig::get('default|conf_Cas_path');
phpCAS::client(CAS_VERSION_2_0, $conf_Cas_host, (int) $conf_Cas_port, $conf_Cas_path, false);
phpCAS::setNoCasServerValidation();
phpCAS::forceAuthentication();
$ppo->cas_user = phpCAS::getUser();
if ($ppo->cas_user) {
$ppo->iconito_user = Kernel::getUserInfo("LOGIN", $ppo->cas_user);
if ($ppo->iconito_user['login']) {
_currentUser()->login(array('login' => $ppo->iconito_user['login'], 'assistance' => true));
$url_return = CopixUrl::get('kernel||doSelectHome');
// $url_return = CopixUrl::get ('assistance||users');
$this->user->forceReload();
if (!$this->service('charte|CharteService')->checkUserValidation()) {
$this->flash->redirect = $url_return;
return $this->go('charte|charte|valid');
}
return new CopixActionReturn(COPIX_AR_REDIRECT, $url_return);
} else {
$ppo->cas_error = 'no-iconito-user';
return _arPpo($ppo, 'cas.tpl');
}
}
}
$ppo = new CopixPPO();
$ppo->TITLE_PAGE = $pTitle;
phpCAS::setDebug();
$conf_Cas_host = CopixConfig::get('default|conf_Cas_host');
$conf_Cas_port = CopixConfig::get('default|conf_Cas_port');
$conf_Cas_path = CopixConfig::get('default|conf_Cas_path');
phpCAS::client(CAS_VERSION_2_0, $conf_Cas_host, (int) $conf_Cas_port, $conf_Cas_path, false);
phpCAS::setNoCasServerValidation();
phpCAS::forceAuthentication();
if (isset($_REQUEST['logout'])) {
phpCAS::logout();
}
die(phpCAS::getUser());
die('ok');
return _arPpo($ppo, 'handlers.list.tpl');
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:60, 代码来源:cas.actiongroup.php
示例8: process
public function process($pParams, $content)
{
extract($pParams);
if (!isset($name)) {
throw new CopixTemplateTagException("Manque nom");
}
$toReturn = "<div id=\"wiki_toolbar\" style=\"clear:both\">\n";
$toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('**','**','" . _i18n("wiki|wiki.bold") . "');\" title=\"" . _i18n("wiki|wiki.bold") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/bold.png') . "\" /></a>\n";
$toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('//','//','" . _i18n("wiki|wiki.italic") . "');\" title=\"" . _i18n("wiki|wiki.italic") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/italic.png') . "\" /></a>\n";
$toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('__','__','" . _i18n("wiki|wiki.underline") . "');\" title=\"" . _i18n("wiki|wiki.underline") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/underline.png') . "\" /></a>\n";
$toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle(' *','','" . _i18n("wiki|wiki.listitem") . "');\" title=\"" . _i18n("wiki|wiki.listitem") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/list.png') . "\" /></a>\n";
$toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('<del>','</del>','" . _i18n("wiki|wiki.strike") . "');\" title=\"" . _i18n("wiki|wiki.strike") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/strike.png') . "\" /></a>\n";
$toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('\n----\n','','');\" title=\"" . _i18n("wiki|wiki.hr") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/hr.png') . "\" /></a>\n";
$toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:fontStyle('\\'\\'','\\'\\'','" . _i18n("wiki|wiki.code") . "');\" title=\"" . _i18n("wiki|wiki.code") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/code.png') . "\" /></a>\n";
$toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(1);\" title=\"" . _i18n("wiki|wiki.header", 1) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h1.png') . "\" /></a>\n";
$toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(2);\" title=\"" . _i18n("wiki|wiki.header", 2) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h2.png') . "\" /></a>\n";
$toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(3);\" title=\"" . _i18n("wiki|wiki.header", 3) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h3.png') . "\" /></a>\n";
$toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(4);\" title=\"" . _i18n("wiki|wiki.header", 4) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h4.png') . "\" /></a>\n";
$toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:addHeader(5);\" title=\"" . _i18n("wiki|wiki.header", 5) . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/h5.png') . "\" /></a>\n";
$toReturn .= "<a class=\"wiki_toolbar\" onclick=\"javascript:sendForPreview();\" title=\"" . _i18n("wiki|wiki.show.preview") . "\"><img src=\"" . CopixUrl::getResource('/img/modules/wiki/preview.png') . "\" /></a>\n";
$toReturn .= "</div>";
$toReturn .= "\n<textarea class=\"noresizable\" id=\"wiki_area_content\" name=\"{$name}\"\n cols=\"100\" rows=\"30\">{$content}\n</textarea>\n<div id=\"aj_wiki_prev\" style=\"display: none\">\n</div>\n\n ";
$urlofrenderer = _url('generictools|ajax|getwikipreview');
CopixHTMLHeader::addJsCode("\nvar onPreviewMode = false;\nfunction sendForPreview()\n{\n if(!onPreviewMode){\n var borders=\$('wiki_area_content').getStyle('border');\n var width=\$('wiki_area_content').getStyle('width');\n \$('aj_wiki_prev').setStyles({\n 'border': borders,\n 'width' : width\n });\n var aj = new Ajax('" . $urlofrenderer . "',{\n method : 'post',\n update :'aj_wiki_prev',\n data : 'torender='+\$('wiki_area_content').value\n }).request();\n onPreviewMode = true;\n \$('wiki_area_content').setStyle('display','none')\n \$('aj_wiki_prev').setStyle('display','block')\n }else{\n \$('wiki_area_content').setStyle('display','block');\n \$('aj_wiki_prev').setStyle('display','none');\n onPreviewMode = false;\n }\n}\n\nfunction addHeader(n)\n{\n var h=\"\";\n if(n==1) h=\"======\";\n if(n==2) h=\"=====\";\n if(n==3) h=\"====\";\n if(n==4) h=\"===\";\n if(n==5) h=\"==\";\n\n var editor = document.getElementById('wiki_area_content');\n fontStyle(h+\" \",\" \"+h,\"Header\"+n);\n}\n\n/**\n * apply tagOpen/tagClose to selection in textarea, use sampleText instead\n * of selection if there is none copied and adapted from phpBB\n *\n * @author phpBB development team\n * @author MediaWiki development team\n * @author Andreas Gohr <[email protected] >\n * @author Jim Raynor <[email protected] >\n */\nfunction fontStyle(tagOpen, tagClose, sampleText)\n{\n var txtarea = document.getElementById('wiki_area_content');\n // IE\n if(document.selection && !is_gecko) {\n var theSelection = document.selection.createRange().text;\n var replaced = true;\n if(!theSelection){\n replaced = false;\n theSelection=sampleText;\n }\n txtarea.focus();\n\n // This has change\n text = theSelection;\n if(theSelection.charAt(theSelection.length - 1) == \" \"){// exclude ending space char, if any\n theSelection = theSelection.substring(0, theSelection.length - 1);\n r = document.selection.createRange();\n r.text = tagOpen + theSelection + tagClose + \" \";\n } else {\n r = document.selection.createRange();\n r.text = tagOpen + theSelection + tagClose;\n }\n if(!replaced){\n r.moveStart('character',-text.length-tagClose.length);\n r.moveEnd('character',-tagClose.length);\n }\n r.select();\n // Mozilla\n } else if(txtarea.selectionStart || txtarea.selectionStart == '0') {\n var replaced = false;\n var startPos = txtarea.selectionStart;\n var endPos = txtarea.selectionEnd;\n if(endPos - startPos) replaced = true;\n var scrollTop=txtarea.scrollTop;\n var myText = (txtarea.value).substring(startPos, endPos);\n if(!myText) { myText=sampleText;}\n if(myText.charAt(myText.length - 1) == \" \"){ // exclude ending space char, if any\n subst = tagOpen + myText.substring(0, (myText.length - 1)) + tagClose + \" \";\n } else {\n subst = tagOpen + myText + tagClose;\n }\n txtarea.value = txtarea.value.substring(0, startPos) + subst +\n txtarea.value.substring(endPos, txtarea.value.length);\n txtarea.focus();\n\n //set new selection\n //modified by Patrice Ferlet\n // - selection wasn't good for selected text replaced\n txtarea.selectionStart=startPos+tagOpen.length;\n txtarea.selectionEnd=startPos+tagOpen.length+myText.length;\n\n txtarea.scrollTop=scrollTop;\n // All others\n } else {\n var copy_alertText=alertText;\n var re1=new RegExp(\"\\\$1\",\"g\");\n var re2=new RegExp(\"\\\$2\",\"g\");\n copy_alertText=copy_alertText.replace(re1,sampleText);\n copy_alertText=copy_alertText.replace(re2,tagOpen+sampleText+tagClose);\n var text;\n if (sampleText) {\n text=prompt(copy_alertText);\n } else {\n text=\"\";\n }\n if(!text) { text=sampleText;}\n text=tagOpen+text+tagClose;\n //append to the end\n txtarea.value += text;\n\n // in Safari this causes scrolling\n if(!is_safari) {\n txtarea.focus();\n }\n\n }\n // reposition cursor if possible\n if (txtarea.createTextRange) txtarea.caretPos = document.selection.createRange().duplicate();\n}\n ");
return $toReturn;
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:26, 代码来源:wikieditor.templatetag.php
示例9: processLaunch
/**
*
*/
public function processLaunch()
{
//Si aucun test n'est donné, on redirige vers la page de choix
if (($test = _request('tests')) === null) {
return _arRedirect(_url('unittest|'));
}
//Si on a demandé à lancer les tests avec Ajax, on génère le template d'appel pour chaque élément
if (_request('ajax')) {
$ppo = new CopixPpo();
$ppo->TITLE_PAGE = 'Lancements des tests unitaires';
$ppo->arTests = $this->_getTest();
return _arPpo($ppo, 'tests.launch.php');
} else {
//on a pas demandé d'appel type ajax, donc on lance directement les tests demandés.
if (CopixAjax::isAJAXRequest()) {
} else {
//C'est une demande normale, la réponse sera de type HTML
$more = '';
}
}
//On lance enfin la demande de test
$httpClientRequest = new CopixHTTPClientRequest(CopixUrl::appendToUrl(_url() . 'test.php', array('tests' => $test, 'xml' => CopixAjax::isAJAXRequest())));
$httpClient = new CopixHttpClient();
$response = $httpClient->launch($httpClientRequest);
return _arContent($response[0]->getBody(), array('content-type' => 'text/html'));
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:29, 代码来源:unittest.actiongroup.php
示例10: getMenu
public function getMenu()
{
$menu = array();
$menu[] = array('txt' => 'Regroupements', 'url' => CopixUrl::get('regroupements||'));
$menu[] = array('txt' => 'Groupes de villes', 'url' => CopixUrl::get('regroupements|villes|'));
$menu[] = array('txt' => 'Groupes d\'écoles', 'url' => CopixUrl::get('regroupements|ecoles|'));
return $menu;
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:8, 代码来源:regroupements.class.php
示例11: getExemple
/**
* Gets the news list.
*/
function getExemple()
{
$tpl =& new CopixTpl();
$main = '<p>' . CopixI18N::get('exemple.defaultPageMessage') . '</p>' . '<p><a href="' . CopixUrl::get('hello') . '">' . CopixI18N::get('exemple.clickHere') . '</a> ' . CopixI18N::get('exemple.toSeeWelcome') . '</p>';
$tpl->assign('TITLE_PAGE', CopixI18N::get('exemple.title'));
$tpl->assign('MAIN', $main);
return new CopixActionReturn(COPIX_AR_DISPLAY, $tpl);
}
开发者ID:BackupTheBerlios, 项目名称:phpannu-svn, 代码行数:11, 代码来源:exemple.actiongroup.php
示例12: smarty_function_htmlarea
function smarty_function_htmlarea($params, &$smarty)
{
static $_init = false;
extract($params);
//check the initialisation
if (!$_init) {
CopixHtmlHeader::addJsCode('_editor_url = "' . CopixUrl::get() . 'js/htmlarea/";');
//path of the library
if (empty($path)) {
$path = CopixUrl::get() . 'js/htmlarea/';
//default path under CopiX
}
CopixHTMLHeader::addJSLink($path . 'htmlarea.js');
CopixHTMLHeader::addJSLink($path . 'dialog.js');
if (empty($lang)) {
$lang = CopixI18N::getLang();
}
CopixHTMLHeader::addJSLink($path . 'lang/' . $lang . '.js');
CopixHTMLHeader::addCSSLink($path . 'htmlarea.css');
CopixHTMLHeader::addJSLink($path . 'popupwin.js');
CopixHTMLHeader::addJSCode('
HTMLArea.loadPlugin("TableOperations");
HTMLArea.loadPlugin("InsertAnchor");
HTMLArea.loadPlugin("TableToggleBorder");
HTMLArea.loadPlugin("AstonTools");
HTMLArea.loadPlugin("ContextMenu");
');
$_init = true;
}
if (empty($content)) {
$content = '';
}
//name of the textarea.
if (empty($name)) {
$smarty->trigger_error('htmlarea: missing name parameter');
} else {
// CopixHTMLHeader::addOthers ($script);
if (!$width) {
$width = 500;
}
if (!$height) {
$height = 500;
}
$out = '<textarea id="' . $name . '" name="' . $name . '" style="width: ' . $width . 'px; height:' . $height . 'px;" >' . $content . '</textarea>';
$out .= '<script type="text/javascript" defer="1">
var editor' . $name . ' = null;
editor' . $name . ' = new HTMLArea("' . $name . '");
editor' . $name . '.registerPlugin("TableOperations");
editor' . $name . '.registerPlugin("TableToggleBorder");
editor' . $name . '.registerPlugin("InsertAnchor");
editor' . $name . '.registerPlugin("AstonTools");
editor' . $name . '.registerPlugin("ContextMenu");
editor' . $name . '.config.pageStyle = "@import url(\\"' . CopixUrl::get() . 'styles/styles_copix.css\\");";
editor' . $name . '.generate ();
</script>';
}
return $out;
}
开发者ID:BackupTheBerlios, 项目名称:phpannu-svn, 代码行数:58, 代码来源:function.htmlarea.php
示例13: makeVueJourUrl
/**
* Makes URI for list of articles
*
* @param string $date (YYYYmmdd)
*
* @return string
*/
public function makeVueJourUrl($cahierId, $date, $nodeType, $nodeId)
{
if ($nodeType == "USER_ELE") {
$url = CopixUrl::get('cahierdetextes||voirTravaux', array('cahierId' => $cahierId, 'jour' => substr($date, 6, 2), 'mois' => substr($date, 4, 2), 'annee' => substr($date, 0, 4), 'eleve' => $nodeId));
} else {
$url = CopixUrl::get('cahierdetextes||voirTravaux', array('cahierId' => $cahierId, 'jour' => substr($date, 6, 2), 'mois' => substr($date, 4, 2), 'annee' => substr($date, 0, 4)));
}
return $url;
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:16, 代码来源:cahierdetextesservices.class.php
示例14: clear
/**
* Efface le cache de Copix (dossiers et BDD)
*
* @author Christophe Beyer <[email protected] >
* @since 2006/12/05
*/
public function clear()
{
if (!Admin::canAdmin()) {
return CopixActionGroup::process('genericTools|Messages::getError', array('message' => CopixI18N::get('kernel|kernel.error.noRights'), 'back' => CopixUrl::get()));
}
CacheServices::clearCache();
CacheServices::clearConfDB();
return new CopixActionReturn(COPIX_AR_REDIRECT, CopixUrl::get('sysutils||'));
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:15, 代码来源:cache.actiongroup.php
示例15: process
public function process($pParams, $pContent = null)
{
$toReturn = ' ' . $pContent . '<br /><br />';
$toReturn .= ' <a href="' . CopixUrl::get($pParams['yes']) . '">' . _i18n('copix:common.buttons.yes') . '</a>';
$toReturn .= ' <a href="' . CopixUrl::get($pParams['no']) . '">' . _i18n('copix:common.buttons.no') . '</a>';
_tag('mootools');
CopixHTMLHeader::addJsCode("\n window.addEvent('domready', function () {\n var elem = new Element('div');\n elem.setStyles({'z-index':99999,'background-color':'white','border':'1px solid black','width':'200px','height':'100px','top': window.getScrollTop().toInt()+window.getHeight ().toInt()/2-100+'px','left':window.getScrollLeft().toInt()+window.getWidth ().toInt()/2-100+'px','position':'absolute','text-align':'center'});\n elem.setHTML ('{$toReturn}');\n elem.injectInside(document.body);\n\n });\n\n ");
return null;
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:9, 代码来源:confirm.templatetag.php
示例16: process
public function process($pParams)
{
extract($pParams);
if (!isset($name)) {
throw new CopixTemplateTagException('[AutoComplete] Required parameter name');
}
if (!isset($field)) {
$field = $name;
}
if (!isset($id)) {
$id = $name;
}
if (!isset($value)) {
$value = "";
}
if (!isset($onSelect)) {
$onSelect = "";
}
if (!isset($onRequest)) {
$onRequest = '';
}
if (!isset($extra)) {
$extra = '';
}
if (!isset($pParams['datasource'])) {
$pParams['datasource'] = 'dao';
}
$toMaj = '';
$onSelectTemp = '';
if (isset($maj)) {
$onSelectTemp .= "eleme.selected.id = 'selector_autocomplete';";
foreach ($maj as $key => $field) {
$onSelectTemp .= "\n \$\$('#selector_autocomplete .{$key}').each (function (el) {\n \$('{$field}').value = el.innerHTML;\n });\n ";
$toMaj .= $key . ';';
}
}
$onSelect = $onSelectTemp . $onSelect;
$url = 'generictools|ajax|getAutoComplete';
if (isset($pParams['url'])) {
$url = $pParams['url'];
}
$length = isset($length) ? $length : 1;
$pParams['view'] = isset($pParams['view']) ? $pParams['view'] : $field;
$tab = array();
foreach ($pParams as $key => $param) {
$tab[$key] = $param;
}
$tab['nb'] = 10;
$tab['tomaj'] = $toMaj;
$js = new CopixJSWidget();
$js->tag_autocomplete($id, $name, $length, $tab, _url($url), $js->function_(null, 'el', $onRequest), $js->function_(null, 'el,eleme,element', $onSelect));
CopixHTMLHeader::addJSDOMReadyCode($js);
CopixHTMLHeader::addJSLink(_resource('js/taglib/tag_autocomplete.js'));
_eTag("mootools", array('plugin' => "observer;autocompleter"));
$toReturn = '<input type="text" id="' . $name . '" name="' . $name . '" value="' . $value . '" ' . $extra . ' /><span id="autocompleteload_' . $name . '"><img src="' . CopixUrl::getResource('img/tools/load.gif') . '" /></span>';
return $toReturn;
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:57, 代码来源:autocomplete.templatetag.php
示例17: process
/**
* Génération du code HTML
* @return string
*/
public function process($pParams)
{
//Test si le parametre correspondant au type existe
if (isset($pParams['type'])) {
$type = $pParams['type'];
} else {
//Sinon on génère une exception précisant que le type est manquant
throw new CopixTemplateTagException('CopixImage: missing type parameter');
}
//Si une propriété correspond au type saisi
if (CopixI18N::exists('copix:common.buttons.' . $type)) {
//On récupère le libellé de ce type
$alt = _i18n('copix:common.buttons.' . $type);
} else {
//Sinon on génère une erreur
throw new CopixException('You must enter an existing type');
}
//identifiant sur le href
$idimg = '';
$idhref = '';
if (isset($pParams['id'])) {
$idimg = 'id="' . $pParams['id'] . '_img"';
$idhref = 'id="' . $pParams['id'] . '_href"';
}
//Initialisation du type
if (isset($pParams['title'])) {
$title = $pParams['title'];
} else {
$title = $alt;
}
if (isset($pParams['class'])) {
$class = 'class="' . $pParams['class'] . '"';
} else {
$class = '';
}
//Création du chemin ou se trouve l'image
$fileName = str_replace(CopixUrl::getRequestedBaseUrl(), './', _resource("img/tools/" . $type . ".png"));
//Test si le fichier existe
if (file_exists($fileName)) {
$src = _resource("img/tools/" . $type . ".png");
} else {
throw new CopixException('No icon does not correspond to your application');
}
if (isset($pParams['text'])) {
$text = $pParams['text'];
} else {
$text = '';
}
//si une url a été renseignée
if (isset($pParams['href'])) {
$href = $pParams['href'];
return '<a href="' . $href . '" ' . $idhref . ' title="' . $title . '" ' . $class . '><img src="' . $src . '" ' . $idimg . ' alt="' . $alt . '"/>' . $text . '</a>';
} else {
return '<img src="' . $src . '" ' . $idimg . ' alt="' . $alt . '" title="' . $title . '" ' . $class . ' />' . $text;
}
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:60, 代码来源:copixicon.templatetag.php
示例18: _createContent
public function _createContent(&$toReturn)
{
$ppo = new CopixPPO();
$toReturn = "";
$ppo->legals = _i18n('public|public.nav.copyright');
// $ppo->legals .= " | <a href=".CopixUrl::get ('aide||')." title="._i18n('public|public.aide')."><b>"._i18n('public|public.aide')."</b></a>";
$ppo->legals .= " - <a href=\"" . CopixUrl::get('public||aPropos') . "\" title=\"" . _i18n('public|public.apropos') . "\">" . _i18n('public|public.apropos') . "</a>";
$toReturn = $this->_usePPO($ppo, 'legals.tpl');
return true;
}
开发者ID:JVS-IS, 项目名称:ICONITO-EcoleNumerique, 代码行数:10, 代码来源:legals.zone.php
示例19: smarty_function_currenturl
/**
* Plugin smarty type fonction
* Purpose: get the current url.
*
* Input: assign = (optional) name of the template variable we'll assign
* the output to instead of displaying it directly
*
* Examples:
*/
function smarty_function_currenturl($params, &$this)
{
$assign = CopixUrl::getCurrentUrl();
if (isset($params['assign'])) {
$this->assign($params['assign'], $assign);
return '';
} else {
return $assign;
}
}
开发者ID:BackupTheBerlios, 项目名称:phpannu-svn, 代码行数:19, 代码来源:function.currenturl.php
ejarnutowski/laravel-api-key: API Key Authorization for Laravel
阅读:823| 2022-08-13
PacktPublishing/Python-Machine-Learning-Second-Edition: Python Machine Learning
阅读:937| 2022-08-18
win7系统电脑使用过程中有不少朋友表示遇到过win7系统USB驱动器RAM的状况,当出现win7
阅读:841| 2022-11-06
VazkiiMods/AutoRegLib: Automatic registry/loading library for minecraft mods.
阅读:452| 2022-08-17
diehl/Incremental-SVM-Learning-in-MATLAB: This MATLAB package implements the met
阅读:415| 2022-08-17
lit-uriy/qt-material-stylesheet: QtWidgets stylesheet based on Google Material d
阅读:374| 2022-08-17
urbanairship/java-library: Java client library for the Urban Airship API
阅读:962| 2022-08-15
elipapa/markdown-cv: a simple template to write your CV in a readable markdown f
阅读:491| 2022-08-17
tboronczyk/localization-middleware: PSR-15 middleware to assist primarily with l
阅读:501| 2022-08-16
A missing permission check in Jenkins OpenShift Deployer Plugin 1.2.0 and earlie
阅读:687| 2022-07-29
请发表评论