Ejemplo n.º 1
0
 private static function _setURIChunks()
 {
     if (!isset(self::$uri)) {
         $str = substr(SITE_URL, strlen(SITE_SERVER_URL) + 1);
         self::$uri = array();
         if ($str) {
             self::$uri = explode('/', $str);
         }
         if (self::$uri) {
             $_REQUEST = array_merge($_REQUEST, self::$uri);
         }
     }
 }
Ejemplo n.º 2
0
	/**
	 * Redirect with an error the user
	 *
	 * @param string $url The url where to redirect
	 * @param int $number The HTTP error number
	 */
	public function error($url = null, $number = 404) {
		$this->redirect(request::uri($url? $url : '/'.$number), $number);
	}
Ejemplo n.º 3
0
<h1>Une erreur est survenue</h1>
<br />
<p>
	Peut-être que vous essayez d'accéder à une page qui n'existe plus.<br /><br />
	Recommencez depuis <a href="<?php 
echo request::uri('/');
?>
">la page d'accueil</a>.<br /><br />
</p>
Ejemplo n.º 4
0
	public function getLoginForm(array $prm = array()) {
		if (!$this->form) {
			$this->form = $this->table->getRow()->getForm(array(
				$this->cfg->getInArray('fields', 'login'),
				$this->cfg->getInArray('fields', 'pass')
			), array_merge($this->cfg->formOptions, $prm, array(
				'action'=>request::uri($this->getPage('login'))
			)), false);
			$this->form->get($this->cfg->getInArray('fields', 'login'))->getValid()->delRule('dbUnique');
			if ($this->cfg->stayConnected) {
				$this->form->add('checkbox', array(
					'name'=>'stayConnected',
					'label'=>false,
					'uniqValue'=>true,
					'valid'=>array('required'=>false),
					'list'=>array(
						1=>utils::htmlOut($this->cfg->labelStayConnected)
					)
				));
			}
		}

		return $this->form;
	}
Ejemplo n.º 5
0
<?php

$cfg = array('nyroBrowser' => array('active' => true, 'config' => 'default', 'url' => request::uri('nyroBrowser'), 'width' => 770, 'height' => 480, 'title' => 'Browser'), 'tinyBrowser' => array('active' => false, 'url' => str_replace('tinybrowser', 'tinybrowser/tinybrowser.php', request::uri('js/tiny_mce/plugins/tinybrowser')), 'subdir' => null, 'width' => 770, 'height' => 480, 'title' => 'Browser'), 'tinyMce' => array('script_url' => request::uri('js/tiny_mce/tiny_mce_gzip.php' . (DEV ? null : '?diskcache=true')), 'height' => 340, 'theme' => 'advanced', 'language' => request::get('lang'), 'plugins' => 'safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template', 'theme_advanced_buttons1' => 'save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect', 'theme_advanced_buttons2' => 'cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor', 'theme_advanced_buttons3' => 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen', 'theme_advanced_buttons4' => 'insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak', 'theme_advanced_toolbar_location' => 'top', 'theme_advanced_toolbar_align' => 'left', 'theme_advanced_statusbar_location' => 'bottom', 'theme_advanced_resizing' => true, 'content_css' => 'css/content.css', 'template_external_list_url' => 'lists/template_list.js', 'external_link_list_url' => 'lists/link_list.js', 'external_image_list_url' => 'lists/image_list.js', 'media_external_list_url' => 'lists/media_list.js', 'plugins' => 'lists,safari,pagebreak,style,advimage,advlink,inlinepopups,media,searchreplace,contextmenu,paste,fullscreen,nonbreaking,xhtmlxtras', 'theme_advanced_buttons1' => 'bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,cut,copy,paste,pastetext,pasteword,|,formatselect', 'theme_advanced_buttons2' => 'search,replace,|,bullist,numlist,indent,outdent,|,undo,redo,|,link,unlink,anchor,image,media,|,fullscreen,code', 'theme_advanced_buttons3' => '', 'theme_advanced_buttons4' => '', 'theme_advanced_toolbar_location' => 'top', 'theme_advanced_toolbar_align' => 'left', 'theme_advanced_statusbar_location' => 'bottom', 'theme_advanced_resizing' => true, 'content_css' => '', 'template_external_list_url' => '', 'external_link_list_url' => '', 'external_image_list_url' => '', 'media_external_list_url' => '', 'relative_urls' => false));
Ejemplo n.º 6
0
<?php

$cfg = array('fileUploadedPrm' => array(), 'helper' => null, 'helperPrm' => array(), 'htmlTagName' => 'input', 'xulTagName' => 'textbox', 'htmlWrap' => 'p', 'autoDeleteOnGet' => true, 'deleteLabel' => 'delete', 'showPreview' => true, 'showDelete' => true, 'uploadify' => array('uploader' => request::uri(array('lang' => null, 'module' => 'css', 'action' => 'uploadify', 'param' => 'uploader.swf', 'out' => false)), 'multi' => true, 'auto' => true, 'fileDesc' => 'Images', 'buttonText' => 'Browse...', 'fileExt' => '*.jpg;*.gif;*.png', 'wmode' => 'transparent', 'cancelImg' => request::uri(array('lang' => null, 'module' => 'css', 'action' => 'uploadify', 'param' => 'cancel.png', 'out' => false)), 'scriptData' => array(session::getInstance()->getSessIdForce() => session_id())), 'plupload' => array('showCancelAll' => false, 'addFormVars' => false, 'runtimes' => 'html5,gears,flash,silverlight,html4', 'hideDelay' => 750, 'texts' => array('browse' => 'Browse...', 'waiting' => 'Waiting', 'error' => 'Error', 'cancel' => 'Cancelled', 'complete' => 'Complete', 'cancelAll' => 'Cancel all'), 'filters' => array(array('title' => 'Images', 'extensions' => 'jpg,jpeg,gif,png')), 'flash_swf_url' => request::uri(array('lang' => null, 'module' => 'css', 'action' => 'plupload', 'param' => 'plupload.flash.swf', 'out' => false)), 'silverlight_xap_url' => request::uri(array('lang' => null, 'module' => 'css', 'action' => 'plupload', 'param' => 'plupload.silverlight.xap', 'out' => false))), 'html' => array('type' => 'file', 'class' => 'file'));
Ejemplo n.º 7
0
<?php

$cfg = array('apiKey' => REQUIRED, 'url' => request::uri('///'), 'userAgent' => 'nyroFwk/' . NYROVERSION . ' akismet/1.1', 'apiPort' => 80, 'apiServer' => 'rest.akismet.com', 'apiVersion' => '1.1', 'comment' => array('comment_type' => 'comment', 'comment_author' => '', 'comment_author_email' => '', 'comment_author_url' => '', 'comment_content' => '', 'user_ip' => request::getIp(), 'referrer' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null), 'ignoreServerVars' => array('HTTP_COOKIE', 'HTTP_USER_AGENT', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED_HOST', 'HTTP_MAX_FORWARDS', 'HTTP_X_FORWARDED_SERVER', 'REDIRECT_STATUS', 'SERVER_PORT', 'PATH', 'DOCUMENT_ROOT', 'SERVER_ADMIN', 'QUERY_STRING', 'PHP_SELF', 'REMOTE_ADDR'));
Ejemplo n.º 8
0
 protected function execAdminLogout(array $prm = array())
 {
     security::getInstance()->logout();
     response::getInstance()->redirect(request::uri('/'));
 }
Ejemplo n.º 9
0
	/**
	 * Get a configured page
	 *
	 * @param string $type Pagename (login, logged, logout, forbidden)
	 * @param bool $uri Indiciate if the url should be parsed with request::uri to be used directly
	 * @return string The page url
	 */
	public function getPage($type='login', $uri=false) {
		$page = $this->cfg->getInArray('pages', $type);
		return $uri? request::uri($page) : $page;
	}