<?php

namespace DataViewRouter;

class Fop_mail_host_box_draft_recipient_draft {
  
  

  
  

    // --- Statische Methoden ---
  
  public static function renderTabTableURL($id, $params = [] ) { 
    
    
    // --- BLOCK: main ---
    
		$params['id'] = $id;
		return self::renderTabTableURL2($params);
	
    
  }

  public static function getidsURL($col, $params = [] , $id) { 
    
    
    // --- BLOCK: main ---
    
		$params['id'] = $id;$params['col'] = $col;
		return self::getidsURL2($params);
	
    
  }

  public static function permissionsURL($id, $params = [] ) { 
    
    
    // --- BLOCK: main ---
    
		$params['id'] = $id;
		return self::permissionsURL2($params);
	
    
  }

  public static function openURL($fop_table, $fop_id, $fop_from, $id, $params = [] ) { 
    
    
    // --- BLOCK: main ---
    
		$params['fop_table'] = $fop_table;$params['fop_id'] = $fop_id;$params['fop_from'] = $fop_from;$params['id'] = $id;
		return self::openURL2($params);
	
    
  }

  public static function stepURL($tbl, $id, $step, $params = [] ) { 
    
    
    // --- BLOCK: main ---
    
		$params['tbl'] = $tbl;$params['id'] = $id;$params['step'] = $step;
		return self::stepURL2($params);
	
    
  }

  public static function getfilter_fop_mail_host_box_draft_recipient_draft_draftItemsByStringURL($fstr, $params = [] , $id) { 
    
    
    // --- BLOCK: main ---
    
		$params['id'] = $id;$params['fstr'] = $fstr;
		return self::getfilter_fop_mail_host_box_draft_recipient_draft_draftItemsByStringURL2($params);
	
    
  }

  public static function renderTabTableURL2($params) { 
    
    
    // --- BLOCK: main ---
    
		// Default-URL - kann durch rewrite-Regeln abgeändert werden
		
		if (!isset($url)) {
			$url = 'DataView/Fop_mail_host_box_draft_recipient_draft/renderTabTable';
			$isFirst = true;
		}
		foreach ($params AS $k => $v) {
			if (!is_null($v)) {
				$url .= ($isFirst ? '?' : '&') . urlencode($k) . '=' . \FOP\Util::urlencode($v);
				$isFirst = false;
			}
		}
		if (\FOP\Configuration::getFOPUtilEnableRewrite() == 'true' || \FOP\Configuration::getFOPUtilEnableRewrite() == 1) {
			return \FOP\Util::getCurrentBaseurl() . $url;
		} else {
			return \FOP\Util::getCurrentBaseurl() . 'fop-router.php?q=' . urlencode($url);
		}
	
    
  }

  public static function getidsURL2($params) { 
    
    
    // --- BLOCK: main ---
    
		// Default-URL - kann durch rewrite-Regeln abgeändert werden
		
		if (!isset($url)) {
			$url = 'DataView/Fop_mail_host_box_draft_recipient_draft/getids';
			$isFirst = true;
		}
		foreach ($params AS $k => $v) {
			if (!is_null($v)) {
				$url .= ($isFirst ? '?' : '&') . urlencode($k) . '=' . \FOP\Util::urlencode($v);
				$isFirst = false;
			}
		}
		if (\FOP\Configuration::getFOPUtilEnableRewrite() == 'true' || \FOP\Configuration::getFOPUtilEnableRewrite() == 1) {
			return \FOP\Util::getCurrentBaseurl() . $url;
		} else {
			return \FOP\Util::getCurrentBaseurl() . 'fop-router.php?q=' . urlencode($url);
		}
	
    
  }

  public static function permissionsURL2($params) { 
    
    
    // --- BLOCK: main ---
    
		// Default-URL - kann durch rewrite-Regeln abgeändert werden
		
		if (!isset($url)) {
			$url = 'DataView/Fop_mail_host_box_draft_recipient_draft/permissions';
			$isFirst = true;
		}
		foreach ($params AS $k => $v) {
			if (!is_null($v)) {
				$url .= ($isFirst ? '?' : '&') . urlencode($k) . '=' . \FOP\Util::urlencode($v);
				$isFirst = false;
			}
		}
		if (\FOP\Configuration::getFOPUtilEnableRewrite() == 'true' || \FOP\Configuration::getFOPUtilEnableRewrite() == 1) {
			return \FOP\Util::getCurrentBaseurl() . $url;
		} else {
			return \FOP\Util::getCurrentBaseurl() . 'fop-router.php?q=' . urlencode($url);
		}
	
    
  }

  public static function openURL2($params) { 
    
    
    // --- BLOCK: main ---
    
		// Default-URL - kann durch rewrite-Regeln abgeändert werden
		
		if (!isset($url)) {
			$url = 'DataView/Fop_mail_host_box_draft_recipient_draft/open';
			$isFirst = true;
		}
		foreach ($params AS $k => $v) {
			if (!is_null($v)) {
				$url .= ($isFirst ? '?' : '&') . urlencode($k) . '=' . \FOP\Util::urlencode($v);
				$isFirst = false;
			}
		}
		if (\FOP\Configuration::getFOPUtilEnableRewrite() == 'true' || \FOP\Configuration::getFOPUtilEnableRewrite() == 1) {
			return \FOP\Util::getCurrentBaseurl() . $url;
		} else {
			return \FOP\Util::getCurrentBaseurl() . 'fop-router.php?q=' . urlencode($url);
		}
	
    
  }

  public static function stepURL2($params) { 
    
    
    // --- BLOCK: main ---
    
		// Default-URL - kann durch rewrite-Regeln abgeändert werden
		
		if (!isset($url)) {
			$url = 'DataView/Fop_mail_host_box_draft_recipient_draft/step';
			$isFirst = true;
		}
		foreach ($params AS $k => $v) {
			if (!is_null($v)) {
				$url .= ($isFirst ? '?' : '&') . urlencode($k) . '=' . \FOP\Util::urlencode($v);
				$isFirst = false;
			}
		}
		if (\FOP\Configuration::getFOPUtilEnableRewrite() == 'true' || \FOP\Configuration::getFOPUtilEnableRewrite() == 1) {
			return \FOP\Util::getCurrentBaseurl() . $url;
		} else {
			return \FOP\Util::getCurrentBaseurl() . 'fop-router.php?q=' . urlencode($url);
		}
	
    
  }

  public static function route($q) { 
    
    
    // --- BLOCK: main ---
    
	if (($q == 'renderTabTable') && isset($_GET['id'])  ) {
		try {
			$result = \DataView\Fop_mail_host_box_draft_recipient_draft::renderTabTableAction($_GET['id']);
		} catch(\FOP\AccessDeniedException $e){
			\EasyEditor\Errors::render($e->getMessage() ?: 'accessdenied');
			die();
		}
		if (isset($result)) {
			header('Content-Type: application/json'); 
			die(json_encode($result));
		} else {
			die('');
		}
	}if (($q == 'getids') && isset($_GET['col'])   && isset($_GET['id'])  ) {
		try {
			$result = \DataView\Fop_mail_host_box_draft_recipient_draft::getidsAction($_GET['col'], $_GET['id']);
		} catch(\FOP\AccessDeniedException $e){
			\EasyEditor\Errors::render($e->getMessage() ?: 'accessdenied');
			die();
		}
		if (isset($result)) {
			header('Content-Type: application/json'); 
			die(json_encode($result));
		} else {
			die('');
		}
	}if (($q == 'permissions') && isset($_GET['id'])  ) {
		try {
			$result = \DataView\Fop_mail_host_box_draft_recipient_draft::permissionsAction($_GET['id']);
		} catch(\FOP\AccessDeniedException $e){
			\EasyEditor\Errors::render($e->getMessage() ?: 'accessdenied');
			die();
		}
		if (isset($result)) {
			header('Content-Type: application/json'); 
			die(json_encode($result));
		} else {
			die('');
		}
	}if (($q == 'getfilter_fop_mail_host_box_draft_recipient_draft_draftItemsByString') && isset($_GET['fstr'])   && isset($_GET['id'])  ) {
		try {
			$result = \DataView\Fop_mail_host_box_draft_recipient_draft::getfilter_fop_mail_host_box_draft_recipient_draft_draftItemsByStringAction($_GET['fstr'], $_GET['id']);
		} catch(\FOP\AccessDeniedException $e){
			\EasyEditor\Errors::render($e->getMessage() ?: 'accessdenied');
			die();
		}
		if (isset($result)) {
			header('Content-Type: application/json'); 
			die(json_encode($result));
		} else {
			die('');
		}
	}if (($q == 'open') && isset($_GET['fop_table'])   && isset($_GET['fop_id'])   && isset($_GET['fop_from'])   && isset($_GET['id'])  ) {
		try {
			$result = \DataView\Fop_mail_host_box_draft_recipient_draft::openAction($_GET['fop_table'], $_GET['fop_id'], $_GET['fop_from'], $_GET['id']);
		} catch(\FOP\AccessDeniedException $e){
			\EasyEditor\Errors::render($e->getMessage() ?: 'accessdenied');
			die();
		}
		if (isset($result)) {
			header('Content-Type: application/json'); 
			die(json_encode($result));
		} else {
			die('');
		}
	}if (($q == 'step') && isset($_GET['tbl'])   && isset($_GET['id'])   && isset($_GET['step'])  ) {
		try {
			$result = \DataView\Fop_mail_host_box_draft_recipient_draft::stepAction($_GET['tbl'], $_GET['id'], $_GET['step']);
		} catch(\FOP\AccessDeniedException $e){
			\EasyEditor\Errors::render($e->getMessage() ?: 'accessdenied');
			die();
		}
		if (isset($result)) {
			header('Content-Type: application/json'); 
			die(json_encode($result));
		} else {
			die('');
		}
	}

	header('HTTP/1.0 404 Not found');
	\EasyEditor\Errors::render('Die angeforderte Funktion wurde nicht gefunden.');
	die();
    
  }

  public static function getfilter_fop_mail_host_box_draft_recipient_draft_draftItemsByStringURL2($params) { 
    
    
    // --- BLOCK: main ---
    
		// Default-URL - kann durch rewrite-Regeln abgeändert werden
		
		if (!isset($url)) {
			$url = 'DataView/Fop_mail_host_box_draft_recipient_draft/getfilter_fop_mail_host_box_draft_recipient_draft_draftItemsByString';
			$isFirst = true;
		}
		foreach ($params AS $k => $v) {
			if (!is_null($v)) {
				$url .= ($isFirst ? '?' : '&') . urlencode($k) . '=' . \FOP\Util::urlencode($v);
				$isFirst = false;
			}
		}
		if (\FOP\Configuration::getFOPUtilEnableRewrite() == 'true' || \FOP\Configuration::getFOPUtilEnableRewrite() == 1) {
			return \FOP\Util::getCurrentBaseurl() . $url;
		} else {
			return \FOP\Util::getCurrentBaseurl() . 'fop-router.php?q=' . urlencode($url);
		}
	
    
  }

  public static function renderTabTableAccess($id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    return true;
    
  }

  public static function getidsAccess($col, $id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    return true;
    
  }

  public static function permissionsAccess($id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    return true;
    
  }

  public static function openAccess($fop_table, $fop_id, $fop_from, $id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    return true;
    
  }

  public static function stepAccess($tbl, $id, $step) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    return true;
    
  }

  public static function getfilter_fop_mail_host_box_draft_recipient_draft_draftItemsByStringAccess($fstr, $id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    return true;
    
  }


  
  

  
  
}



