<?php $hook = function ($module_name, $options, &$outcome) { if (file_exists(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'flow.js')) { pmxHeader::add_script(rtrim(PMX_HOME_URL, '/ ') . '/modules/' . $module_name . '/js/flow.js'); } else { pmxHeader::add_script('http://api.webfan.de/api-d/4/js-api/library.js'); } };
public static function status($code = 200) { if ((int) $code == 200) { return header('HTTP/1.1 200 Ok'); } if ((int) $code == 201) { return header('HTTP/1.1 201 Created'); } if ((int) $code == 304) { return header('HTTP/1.1 304 Not Modified'); } if ((int) $code == 400) { return header("HTTP/1.1 400 Bad Request"); } if ((int) $code == 401) { return header('HTTP/1.1 401 Unauthorized'); } if ((int) $code == 403) { return header("HTTP/1.1 403 Forbidden"); } if ((int) $code == 404) { return header("HTTP/1.1 404 Not Found"); } if ((int) $code == 409) { return header('HTTP/1.1 409 Conflict'); } if ((int) $code == 455) { return header('HTTP/1.1 455 Blocked Due To Misbehavior'); } if ((int) $code == 500) { return header("HTTP/1.1 500 Internal Server Error"); } if ((int) $code == 501) { return header('HTTP/1.1 501 Not Implemented'); } if (defined('mxMainFileLoaded') && version_compare(PMX_VERSION, '2.1.2', '>=') === TRUE) { \pmxHeader::Status($code); } trigger_error('status code ' . intval($code) . ' not implemented in \'' . get_class($this) . '\' ' . __METHOD__ . ' ' . __LINE__, E_USER_ERROR); }