function inserttr()
 {
     new eDB("./langfiles/");
     new eDB_Insert("translation_" . PWEL_COMPONENT_ROUTE::$variables["lang"], array("id" => "*", "keyword" => $_POST["keyword"], "translation" => $_POST["translation"]));
     $url = new PWEL_URL();
     $url->redirect("/" . PWEL_COMPONENT_ROUTE::$variables["lang"] . "/start/addtr");
 }
 function delete()
 {
     $url = new PWEL_URL();
     $vars = $url->locateUrlVariables();
     $select = new Sql_Select(new PWEL_SQL());
     $select->from("rpgmarket_coins")->where(array("ID" => (int) $vars[2]))->query();
     $delete = new Sql_Delete($select);
     $delete->delete();
 }
 /**
  * Get all informations and save them in class
  */
 public function getinfo()
 {
     if (empty(self::$currentVariables)) {
         $url = new PWEL_URL();
         self::$currentVariables = $url->locateUrlVariables();
     }
     self::$currentController = PWEL_ROUTING::$ControllerInfo;
     self::$currentDisplayedFile = PWEL_CONTROLLER::$displayedFile;
     self::$currentComponents = PWEL_COMPONENTS::$components;
     self::$currentRegisteredObjects = PWEL::$registeredObjects;
     self::$currentConfig = PWEL::$config;
 }
 /**
  * Checks if the controllers are avaible else send to error controller
  * @return null
  */
 public function routeCurrentDir()
 {
     if (PWEL_ROUTING::$routed == true) {
         return true;
     }
     $url = new PWEL_URL();
     $this->url_variables = $url->locateUrlVariables();
     if (empty($this->url_variables)) {
         $check = $this->checkIncludeControllerClass(self::$start_controller);
         if ($check) {
         } else {
             $check = $this->checkIncludeControllerClass(self::$error_controller);
             if (!$check) {
                 return;
             }
         }
         $this->displayController(new $check(), "startController");
         self::$controllerNotFound = false;
     } else {
         self::$controllerNotFound = false;
         $check = $this->checkIncludeControllerClass($this->url_variables[0]);
         if ($check) {
         } else {
             $check = $this->checkIncludeControllerClass(self::$error_controller);
             self::$controllerNotFound = true;
             if (!$check) {
                 return;
             }
         }
         $this->displayController(new $check());
     }
     /**
      * Routing executed
      */
     PWEL_ROUTING::$routed = true;
 }
 function redirect()
 {
     $uri = new PWEL_URL();
     $uri->redirect("myForm/index");
 }
 /**
  * Checks if the custom params can be accessed
  */
 private function checkValues()
 {
     $red = new PWEL_URL();
     $vars = self::$variables;
     $link = '';
     if (empty($this->setRoutes['class'])) {
         unset($vars['class']);
     }
     if (empty($this->setRoutes['method'])) {
         unset($vars['method']);
     }
     if (empty($this->setRoutes['param'])) {
         unset($vars['param']);
     }
     if (is_array($vars)) {
         foreach ($vars as $key => $value) {
             if ($vars[$key] != $this->setRoutes[$key]) {
                 foreach (self::$variables as $innerkey => $var) {
                     if (!empty($var)) {
                         if ($key == $innerkey) {
                             $link .= "{$this->setRoutes[$key]}/";
                         } else {
                             $link .= "{$var}/";
                         }
                     }
                 }
                 if (isset(self::$acceptRange[PWEL_ROUTING::$namespace]) && !is_array(self::$acceptRange[PWEL_ROUTING::$namespace])) {
                     return;
                 }
                 if (isset(self::$acceptRange[PWEL_ROUTING::$namespace]) && !in_array($vars[$key], self::$acceptRange[PWEL_ROUTING::$namespace])) {
                     $red->redirect($link);
                 }
             }
         }
     }
 }
 /**
  * Returns a validated link
  * from PWEL_URL
  * 
  * @var string $file
  * @return string
  */
 public function validateLink($file)
 {
     $uri = new PWEL_URL();
     return $uri->validateLink($file);
 }