Exemple #1
0
 public static function redirectUrl($params)
 {
     $string = 'alias=';
     switch ($params['type']) {
         case self::TYPE_INDEX:
             $string .= rad_config::getParam('defaultAlias');
             break;
         case self::TYPE_ARTICLE:
             $string .= 'articles&a=' . (int) $params['item_id'];
             break;
         case self::TYPE_CATALOG:
             $string .= 'catalog&cat=' . (int) $params['item_id'];
             break;
         case self::TYPE_NEWS:
             $string .= 'news&nid=' . (int) $params['item_id'];
             break;
         case self::TYPE_PAGE:
             $string .= 'page&pgid=' . (int) $params['item_id'];
             break;
         case self::TYPE_PRODUCT:
             $string .= 'product&p=' . (int) $params['item_id'];
             break;
     }
     rad_input::redirect(rad_input::makeURL($string));
 }
 /**
  * Alias for rad_input::redirect($url)
  * Needs to redirect to other pages
  *
  * @param string $url
  * @param string $message
  * @param Boolean $isJS - is JavaScript redirect, or in header?
  *
  * @return Boolean
  */
 public function redirect($url = null, $message = null, $isJS = true)
 {
     return rad_input::redirect($url, $message, $isJS);
 }