本文整理汇总了PHP中Manager::getURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Manager::getURL方法的具体用法?PHP Manager::getURL怎么用?PHP Manager::getURL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Manager
的用法示例。
在下文中一共展示了Manager::getURL方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: authenticate
public function authenticate()
{
if ($this->data->datasource == '') {
$this->data->datasource = 'fnapolo';
//$this->renderPrompt('error', 'Inform database name.');
}
Manager::setConf('fnbr20.db', $this->data->datasource);
Manager::getSession()->fnbr20db = $this->data->datasource;
$auth = Manager::getAuth();
$this->data->result = $auth->authenticate($this->data->user, $this->data->challenge, $this->data->response);
if ($this->data->result) {
$user = Manager::getLogin()->getUser();
$this->data->idLanguage = $user->getConfigData('fnbr20IdLanguage');
if ($this->data->idLanguage == '') {
$this->data->idLanguage = 1;
$user->setConfigData('fnbr20IdLanguage', $this->data->idLanguage);
}
if ($this->data->ifLanguage == '') {
$this->data->ifLanguage = 'en';
//$this->renderPrompt('error', 'Inform language.');
}
Manager::getSession()->idLanguage = $this->data->idLanguage;
Manager::getSession()->lang = $this->data->ifLanguage;
Manager::getSession()->fnbr20Level = $user->getUserLevel();
$this->redirect(Manager::getURL('fnbr20/main'));
} else {
$this->renderPrompt('error', 'Login or password not valid.');
}
}
示例2: getHrefAction
private static function getHrefAction($href)
{
$app = Manager::getApp();
$re = '#^(\\/?)' . $app . '\\/#';
if (preg_match($re, $href)) {
$href = preg_replace($re, '', $href);
}
return Manager::getURL($href);
}
示例3: ajaxMultiplo
public function ajaxMultiplo()
{
$pessoa = new models\Pessoa();
$this->data->multiplo1 = Manager::getURL('ajax/ajaxMultiplo1');
$this->data->multiplo2 = Manager::getURL('ajax/ajaxMultiplo2');
$this->data->multiplo3 = Manager::getURL('ajax/ajaxMultiplo3');
$this->data->multiplo4 = Manager::getURL('ajax/ajaxMultiplo4');
$this->render();
}
示例4: authenticate
public function authenticate()
{
$auth = Manager::getAuth();
$this->data->result = $auth->authenticate($this->data->user, $this->data->challenge, $this->data->response);
if ($this->data->result) {
mdump("++++++++++++");
$this->redirect(Manager::getURL('dlivro/main'));
} else {
$this->renderPrompt('error', 'Login ou senha inválidos. Tente novamente.');
}
}
示例5: preProcess
public function preProcess()
{
$frontController = $this->frontController;
// exemplo de alteração da configuração dependendo do controller sendo executado
$context = $frontController->getContext();
$controller = $context->getController();
if ($controller == 'controls') {
Manager::setConf('session.check', false);
}
// é necessário validar a sessão?
if (Manager::getConf('login.check') || Manager::getConf('session.check')) {
$timeout = Manager::getSession()->checkTimeout(Manager::getConf('session.exception'));
}
if ($timeout) {
$frontController->canCallHandler(false);
$url = Manager::getURL(Manager::getApp() . '/main');
$frontController->setResult(new MRedirect(NULL, $url));
}
}
示例6: checkAccess
public function checkAccess($transaction, $access, $deny = false)
{
//mdump($transaction);
//mdump('--------------------');
//mdump($access);
$module = Manager::getModule();
$ok = false;
if (!is_numeric($access)) {
$access = $this->access[$access];
}
if ($this->auth->isLogged()) {
$login = $this->auth->getLogin();
// MLogin object
$transaction = strtoupper($transaction);
// Transaction name
$isAdmin = $login->isAdmin();
// Is administrator?
$rights = (int) $login->getRights($transaction);
// user rights
$rightsInAll = (int) $login->getRights('ALL');
// user rights in all transactions
$ok = ($rights & $access) == $access || ($rightsInAll & $access) == $access || $isAdmin;
if (!$ok && $deny) {
$msg = _M('Acesso Negado') . "<br><br>\n" . "<center><big><i><font color=red>" . _M('Transação: ') . "{$transaction}</font></i></big></center><br><br>\n" . _M('Informe um login válido para acessar esta página.') . "<br>";
//$go = Manager::getCurrentURL();
//$error = MPrompt::error($msg, $go, $caption, '');
//Manager::prompt($error, $deny);
throw new ESecurityException($msg);
}
} else {
if ($deny) {
$currentUrl = urlencode(Manager::getCurrentURL());
$module = Manager::getConf('login.module');
$url = Manager::getURL("{$module}/main.login", array('return_to' => $currentUrl));
Manager::getPage()->redirect($url);
}
}
return $ok;
}
示例7: generateAjax
public function generateAjax()
{
if (count($this->ajax)) {
foreach ($this->ajax as $ajax) {
$url = Manager::getURL($ajax->url);
if ($ajax->type == 'text') {
$ajaxCmd = "manager.doAjaxText(\"{$url}\",\"{$ajax->load}\", \"{$this->id}\");";
} else {
$this->page->addDojoRequire('dojo.data.ItemFileReadStore');
if ($ajax->event == "onSelectionChange") {
$ajax->event = "change";
$ajax->load = "function(result){manager.byId(result.data.ajaxReturn.control).reset();manager.byId(result.data.ajaxReturn.control).set(\"store\",new dojo.data.ItemFileReadStore({data:result.data.ajaxReturn}));manager.page.clearBusy();}";
}
$ajaxCmd = "manager.doAjax(\"{$url}\",{$ajax->load}, \"{$this->id}\");";
}
$this->addEvent($ajax->event, $ajaxCmd, $ajax->preventDefault, $ajax->dijit);
}
}
}
示例8: setHREF
public static function setHREF($id, $href)
{
$href = Manager::getURL($href);
return "manager.byId(\"{$id}\").set(\"href\",\"{$href}\");";
}
示例9: formBackgroundExecute
public function formBackgroundExecute()
{
$this->data->background = Manager::getURL('diversos/background');
$this->render();
}
示例10: getURL
public function getURL($action = '', $oid = '', $args = array())
{
return Manager::getURL(($this->module ? $this->module . "/" : '') . "{$this->getController()->getName()}/{$action}/{$oid}", $args);
}