PanelKlientaBiallNet.php 774 B

1234567891011121314151617181920
  1. <?php
  2. Lib::loadClass('RouteBase');
  3. Lib::loadClass('Request');
  4. Lib::loadClass('Response');
  5. class Route_UrlAction_PanelKlientaBiallNet extends RouteBase {
  6. static $PANEL_URL = "https://biuro.biall-net.pl/panel/pl/index.php?_route=UrlAction_ChangeUser&id_admin={id}";
  7. static $PANEL_DEV_URL = "https://biuro.biall-net.pl/dev-pl/se-projects/panel_biall_net/SE/index.php?_route=UrlAction_ChangeUser&id_admin={id}";
  8. function defaultAction() {
  9. $id = V::get('id', '', $_GET);
  10. if (!$id) throw new Exception("Missing id");
  11. $devPrefix = 'https://biuro.biall-net.pl/dev-pl';
  12. $panelUrl = ($devPrefix === substr(Request::getScriptUri(), 0, strlen($devPrefix))) ? self::$PANEL_DEV_URL : self::$PANEL_URL;
  13. Response::sendRedirect( str_replace('{id}', $id, $panelUrl) );
  14. }
  15. }