/home/wowzahos/domains/app.wowzahosting.com/public_html/modules/Orderbutton/templates/client/mod_orderbutton_product_configuration.html.twig
{% if not product %}
{% set product = request.product ? guest.product_get({"id":request.product}) : null %}
{% endif %}
<div class="accordion-item">
<h3 class="accordion-header">
<button class="accordion-button {% if not product %}collapsed{%endif%}" type="button" data-bs-toggle="collapse" data-bs-target="#order" aria-expanded="true" aria-controls="order">
<svg class="svg-icon me-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04 19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5 7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64 6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14 10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5 16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37 17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86 13.12,6.62L12.75,4H11.25Z" /></svg>
{{ 'Product Configuration'|trans }}
</button>
</h3>
{% if product %}
<div id="order" class="accordion-collapse collapse {% if product %}show{%endif%}" data-bs-parent="#orderManager">
<div class="accordion-body">
<div class="accordion-inner">
<form method="post" action="{{ 'cart/add_item'|api_url(role: 'guest') }}" style="background:none;" class="form-{{ product.form_id ? guest.formbuilder_get( {"id":product.form_id}).style.type : 0 }}"
{{ fb_api_form({message: 'Product Added to Shopping Cart'|trans, redirect: ('order'|url(query: { 'checkout' : 1 }) ~ (request.show_custom_form_values ? '&show_custom_form_values=1' : ''))}) }}>
{% set product_details %}
<div class="well">
<h3>{{ product.title }}</h3>
{% if product.description %}
{{ product.description|markdown_to_html }}
{% endif %}
<hr>
<h4 class="mt-4 mb-1"><strong>{{ 'Billing'|trans }}</strong></h4>
<div class="row">
<div class="col-12 col-md-4 col-xl-3">
{% if product.pricing.type == 'recurrent' %}
<span>{{ 'Billing Cycle'|trans }}</span>
{% else %}
<span>{{ 'One-time payment'|trans }}</span>
{% endif %}
</div>
<div class="col">
{% set cart_currency = guest.cart_get_currency %}
{% if product.pricing.type == 'recurrent' %}
{% set periods = guest.system_periods %}
<select class="form-select" name="period" id="period-selector">
Arguments
"An exception has been thrown during the rendering of a template ("Product not found") in "mod_orderbutton_product_configuration.html.twig" at line 2."
/home/wowzahos/domains/app.wowzahosting.com/public_html/modules/Product/Api/Guest.php
* @throws \FOSSBilling\Exception
*/
public function get($data)
{
if (!isset($data['id']) && !isset($data['slug'])) {
throw new \FOSSBilling\Exception('Product ID or slug is missing');
}
$id = $data['id'] ?? null;
$slug = $data['slug'] ?? null;
$service = $this->getService();
if ($id) {
$model = $service->findOneActiveById((int) $id);
} else {
$model = $service->findOneActiveBySlug($slug);
}
if (!$model instanceof \Model_Product) {
throw new \FOSSBilling\Exception('Product not found');
}
return $service->toApiArray($model);
}
/**
* Get paginated list of product categories.
*
* @return array
*/
public function category_get_list($data)
{
$data['status'] = 'enabled';
$service = $this->getService();
[$sql, $params] = $service->getProductCategorySearchQuery($data);
$pager = $this->getDi()['pager']->getPaginatedResultSet($sql, $params, PaginationOptions::fromArray($data));
foreach ($pager['list'] as $key => $item) {
$category = $this->getDi()['db']->getExistingModelById('ProductCategory', $item['id'], 'Product category not found');
Arguments
/home/wowzahos/domains/app.wowzahosting.com/public_html/library/Api/Handler.php
$api->setDi($this->di);
$api->setMod($bb_mod);
$api->setIdentity($this->identity);
$api->setIp($this->getDi()['request']->getClientIp());
if ($bb_mod->hasService()) {
$api->setService($this->getDi()['mod_service']($mod));
}
if (!method_exists($api, $method_name) || !is_callable([$api, $method_name])) {
$reflector = new ReflectionClass($api);
if (!$reflector->hasMethod('__call')) {
throw new FOSSBilling\Exception(':type API call :method does not exist in module :module', [':type' => ucfirst((string) $this->type), ':method' => $method_name, ':module' => $mod], 740);
}
}
$data = is_array($arguments) ? $arguments : [];
$this->validateRequiredParams($api, $method_name, $data);
return $api->{$method_name}($arguments);
}
/**
* Validate required parameters for an API method using attributes.
*
* @param Api_Abstract $api The API instance
* @param string $method_name The method name
* @param array $data The data array passed to the method
*
* @throws FOSSBilling\InformationException If required parameters are missing
*/
public function validateRequiredParams(Api_Abstract $api, string $method_name, array $data): void
{
try {
$reflection = new ReflectionMethod($api, $method_name);
} catch (ReflectionException) {
// Method doesn't exist, skip validation
return;
}
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Extension/CoreExtension.php
if ($isDefinedTest) {
return false;
}
if ($propertyNotAllowedError) {
throw $propertyNotAllowedError;
}
throw $e;
}
}
if ($isDefinedTest) {
return true;
}
// Some objects throw exceptions when they have __call, and the method we try
// to call is not supported. If ignoreStrictCheck is true, we should return null.
try {
$ret = $object->$method(...$arguments);
} catch (\BadMethodCallException $e) {
if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) {
return;
}
throw $e;
}
return $ret;
}
/**
* Returns the values from a single column in the input array.
*
* <pre>
* {% set items = [{ 'fruit' : 'apple'}, {'fruit' : 'orange' }] %}
*
* {% set fruits = items|column('fruit') %}
*
* {# fruits now contains ['apple', 'orange'] #}
* </pre>
/home/wowzahos/domains/app.wowzahosting.com/public_html/data/2a/2a4d6a1b72c986258e5fd695d3269407.php
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 1
if ((($tmp = !($context["product"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 2
yield " ";
$context["product"] = (((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["request"] ?? null), "product", [], "any", false, false, false, 2)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? (CoreExtension::getAttribute($this->env, $this->source, ($context["guest"] ?? null), "product_get", [["id" => CoreExtension::getAttribute($this->env, $this->source, ($context["request"] ?? null), "product", [], "any", false, false, false, 2)]], "method", false, false, false, 2)) : (null));
}
// line 4
yield "<div class=\"accordion-item\">
<h3 class=\"accordion-header\">
<button class=\"accordion-button ";
// line 6
if ((($tmp = !($context["product"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
yield "collapsed";
}
yield "\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#order\" aria-expanded=\"true\" aria-controls=\"order\">
<svg class=\"svg-icon me-2\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04 19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5 7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64 6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14 10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5 16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37 17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86 13.12,6.62L12.75,4H11.25Z\" /></svg>
";
// line 8
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->trans("Product Configuration"), "html", null, true);
yield "
</button>
</h3>
";
// line 11
if ((($tmp = ($context["product"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Template.php
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function yield(array $context, array $blocks = []): iterable
{
$context += $this->env->getGlobals();
$blocks = array_merge($this->blocks, $blocks);
try {
$this->ensureSecurityChecked();
yield from $this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Template.php
{
return $this;
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*/
public function getBlocks(): array
{
return $this->blocks;
}
public function display(array $context, array $blocks = []): void
{
foreach ($this->yield($context, $blocks) as $data) {
echo $data;
}
}
public function render(array $context): string
{
if (!$this->useYield) {
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(static function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Template.php
}
public function display(array $context, array $blocks = []): void
{
foreach ($this->yield($context, $blocks) as $data) {
echo $data;
}
}
public function render(array $context): string
{
if (!$this->useYield) {
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(static function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/TemplateWrapper.php
/**
* @return iterable<scalar|\Stringable|null>
*/
public function stream(array $context = []): iterable
{
yield from $this->template->yield($context);
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function streamBlock(string $name, array $context = []): iterable
{
yield from $this->template->yieldBlock($name, $context);
}
public function render(array $context = []): string
{
return $this->template->render($context);
}
/**
* @return void
*/
public function display(array $context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
$this->template->display($context, \func_get_args()[1] ?? []);
}
public function hasBlock(string $name, array $context = []): bool
{
return $this->template->hasBlock($name, $context);
}
/**
* @return string[] An array of defined template block names
*/
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Extension/CoreExtension.php
if ($isSandboxed = $sandboxed && $env->hasExtension(SandboxExtension::class)) {
$sandbox = $env->getExtension(SandboxExtension::class);
if (!$alreadySandboxed = $sandbox->isSandboxed()) {
$sandbox->enableSandbox();
}
}
try {
$loaded = null;
try {
$loaded = $env->resolveTemplate($template);
} catch (LoaderError $e) {
if (!$ignoreMissing) {
throw $e;
}
return '';
}
return $loaded->render($variables);
} finally {
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
}
}
/**
* Returns a template content without rendering it.
*
* @param string $name The template name
* @param bool $ignoreMissing Whether to ignore missing templates or not
*
* @internal
*/
public static function source(Environment $env, $name, $ignoreMissing = false): string
{
$loader = $env->getLoader();
try {
return $loader->getSourceContext($name)->getCode();
/home/wowzahos/domains/app.wowzahosting.com/public_html/data/8c/8cfd16516aa2286ecca8de4f2ceba4ac.php
// line 1
$context["loader_nr"] = ((CoreExtension::getAttribute($this->env, $this->source, ($context["request"] ?? null), "loader", [], "any", true, true, false, 1)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["request"] ?? null), "loader", [], "any", false, false, false, 1), "8")) : ("8"));
// line 2
$context["loader_url"] = (("img/assets/loaders/loader" . ($context["loader_nr"] ?? null)) . ".gif");
// line 3
yield "
<div class=\"row\">
<div class=\"col-md-12\">
<div class=\"card border-0\" id=\"orderbutton\" style=\"margin-bottom: 0\">
<div class=\"card-body p-1\">
<div id=\"orderManager\" class=\"accordion\">
";
// line 10
yield Twig\Extension\CoreExtension::include($this->env, $context, "mod_orderbutton_choose_product.html.twig");
yield "
";
// line 12
yield Twig\Extension\CoreExtension::include($this->env, $context, "mod_orderbutton_product_configuration.html.twig");
yield "
";
// line 14
if ((($tmp = !($context["client"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 15
yield " ";
yield Twig\Extension\CoreExtension::include($this->env, $context, "mod_orderbutton_client.html.twig");
yield "
";
}
// line 17
yield "
";
// line 18
yield Twig\Extension\CoreExtension::include($this->env, $context, "mod_orderbutton_checkout.html.twig");
yield "
<div class=\"accordion-item\">
<h3 class=\"accordion-header\">
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Template.php
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function yield(array $context, array $blocks = []): iterable
{
$context += $this->env->getGlobals();
$blocks = array_merge($this->blocks, $blocks);
try {
$this->ensureSecurityChecked();
yield from $this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Template.php
{
return $this;
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*/
public function getBlocks(): array
{
return $this->blocks;
}
public function display(array $context, array $blocks = []): void
{
foreach ($this->yield($context, $blocks) as $data) {
echo $data;
}
}
public function render(array $context): string
{
if (!$this->useYield) {
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(static function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Template.php
}
public function display(array $context, array $blocks = []): void
{
foreach ($this->yield($context, $blocks) as $data) {
echo $data;
}
}
public function render(array $context): string
{
if (!$this->useYield) {
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(static function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/TemplateWrapper.php
/**
* @return iterable<scalar|\Stringable|null>
*/
public function stream(array $context = []): iterable
{
yield from $this->template->yield($context);
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function streamBlock(string $name, array $context = []): iterable
{
yield from $this->template->yieldBlock($name, $context);
}
public function render(array $context = []): string
{
return $this->template->render($context);
}
/**
* @return void
*/
public function display(array $context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
$this->template->display($context, \func_get_args()[1] ?? []);
}
public function hasBlock(string $name, array $context = []): bool
{
return $this->template->hasBlock($name, $context);
}
/**
* @return string[] An array of defined template block names
*/
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Extension/CoreExtension.php
if ($isSandboxed = $sandboxed && $env->hasExtension(SandboxExtension::class)) {
$sandbox = $env->getExtension(SandboxExtension::class);
if (!$alreadySandboxed = $sandbox->isSandboxed()) {
$sandbox->enableSandbox();
}
}
try {
$loaded = null;
try {
$loaded = $env->resolveTemplate($template);
} catch (LoaderError $e) {
if (!$ignoreMissing) {
throw $e;
}
return '';
}
return $loaded->render($variables);
} finally {
if ($isSandboxed && !$alreadySandboxed) {
$sandbox->disableSandbox();
}
}
}
/**
* Returns a template content without rendering it.
*
* @param string $name The template name
* @param bool $ignoreMissing Whether to ignore missing templates or not
*
* @internal
*/
public static function source(Environment $env, $name, $ignoreMissing = false): string
{
$loader = $env->getLoader();
try {
return $loader->getSourceContext($name)->getCode();
/home/wowzahos/domains/app.wowzahosting.com/public_html/data/04/04f3af5ff6b97e4181c3a6e190eb11b8.php
<div class=\"col-md-12\">
<div class=\"card mb-4\">
<div class=\"card-header py-3 py-3\">
<div class=\"d-flex justify-content-between align-items-center\">
<div class=\"w-100\">
<h1 class=\"mb-1\">";
// line 23
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->trans("Products"), "html", null, true);
yield "</h1>
";
// line 24
yield Twig\Extension\CoreExtension::include($this->env, $context, "mod_orderbutton_currency.html.twig");
yield "
</div>
</div>
</div>
<div class=\"card-body overflow-hidden\">
";
// line 29
yield Twig\Extension\CoreExtension::include($this->env, $context, "mod_orderbutton_content.html.twig");
yield "
</div>
</div>
</div>
</div>
";
yield from [];
}
// line 36
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_sidebar2(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 37
yield " ";
yield Twig\Extension\CoreExtension::include($this->env, $context, "partial_currency.html.twig");
yield "
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Template.php
if ($useBlocks && isset($blocks[$name])) {
$template = $blocks[$name][0];
$block = $blocks[$name][1];
} elseif (isset($this->blocks[$name])) {
$template = $this->blocks[$name][0];
$block = $this->blocks[$name][1];
} else {
$template = null;
$block = null;
}
// avoid RCEs when sandbox is enabled
if (null !== $template && !$template instanceof self) {
throw new \LogicException('A block must be a method on a \Twig\Template instance.');
}
if (null !== $template) {
try {
$template->ensureSecurityChecked();
yield from $template->$block($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
$e->guess();
throw $e;
}
} elseif ($parent = $this->getParent($context)) {
yield from $parent->unwrap()->yieldBlock($name, $context, array_merge($this->blocks, $blocks), false, $templateContext ?? $this);
/home/wowzahos/domains/app.wowzahosting.com/public_html/data/7e/7ec8e662c149720f5e3982cbc8132790.php
// line 178
yield " <div class=\"content-block\" role=\"main\">
";
// line 179
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["settings"] ?? null), "show_breadcrumb", [], "any", false, false, false, 179)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 180
yield " ";
yield from $this->unwrap()->yieldBlock('breadcrumbs', $context, $blocks);
// line 191
yield " ";
}
// line 192
yield "
";
// line 193
yield $this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->renderWidgets($this->env, "client.theme.content.before");
yield "
";
// line 194
yield from $this->unwrap()->yieldBlock('content', $context, $blocks);
// line 195
yield " ";
yield $this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->renderWidgets($this->env, "client.theme.content.after");
yield "
";
// line 197
yield Twig\Extension\CoreExtension::include($this->env, $context, "partial_message.html.twig");
yield "
";
// line 199
yield from $this->unwrap()->yieldBlock('content_after', $context, $blocks);
// line 200
yield " </div>
</section>
<div id=\"push\"></div>
</div>
";
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Template.php
if ($useBlocks && isset($blocks[$name])) {
$template = $blocks[$name][0];
$block = $blocks[$name][1];
} elseif (isset($this->blocks[$name])) {
$template = $this->blocks[$name][0];
$block = $this->blocks[$name][1];
} else {
$template = null;
$block = null;
}
// avoid RCEs when sandbox is enabled
if (null !== $template && !$template instanceof self) {
throw new \LogicException('A block must be a method on a \Twig\Template instance.');
}
if (null !== $template) {
try {
$template->ensureSecurityChecked();
yield from $template->$block($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
$e->guess();
throw $e;
}
} elseif ($parent = $this->getParent($context)) {
yield from $parent->unwrap()->yieldBlock($name, $context, array_merge($this->blocks, $blocks), false, $templateContext ?? $this);
/home/wowzahos/domains/app.wowzahosting.com/public_html/data/7e/7ec8e662c149720f5e3982cbc8132790.php
yield from $this->unwrap()->yieldBlock('head', $context, $blocks);
// line 39
yield " ";
yield from $this->unwrap()->yieldBlock('js', $context, $blocks);
// line 40
yield "</head>
<body class=\"";
// line 42
yield from $this->unwrap()->yieldBlock('body_class', $context, $blocks);
yield "\">
";
// line 44
yield $this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->renderWidgets($this->env, "client.theme.body.start");
yield "
";
// line 46
yield from $this->unwrap()->yieldBlock('body', $context, $blocks);
// line 259
yield "
";
// line 260
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["settings"] ?? null), "inject_javascript", [], "any", false, false, false, 260)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 261
yield " ";
yield CoreExtension::getAttribute($this->env, $this->source, ($context["settings"] ?? null), "inject_javascript", [], "any", false, false, false, 261);
yield "
";
}
// line 263
yield " ";
yield Twig\Extension\CoreExtension::include($this->env, $context, "partial_pending_messages.html.twig", [], true, true);
yield "
";
// line 264
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["guest"] ?? null), "extension_is_on", [["mod" => "cookieconsent"]], "method", false, false, false, 264)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 265
yield " ";
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Template.php
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function yield(array $context, array $blocks = []): iterable
{
$context += $this->env->getGlobals();
$blocks = array_merge($this->blocks, $blocks);
try {
$this->ensureSecurityChecked();
yield from $this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
/home/wowzahos/domains/app.wowzahosting.com/public_html/data/04/04f3af5ff6b97e4181c3a6e190eb11b8.php
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return $this->load((((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["request"] ?? null), "ajax", [], "any", false, false, false, 1)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("layout_blank.html.twig") : ("layout_default.html.twig")), 1);
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 2
$context["active_menu"] = "order";
// line 7
$context["loader_nr"] = ((CoreExtension::getAttribute($this->env, $this->source, ($context["request"] ?? null), "loader", [], "any", true, true, false, 7)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["request"] ?? null), "loader", [], "any", false, false, false, 7), "8")) : ("8"));
// line 8
$context["loader_url"] = (("img/assets/loaders/loader" . ($context["loader_nr"] ?? null)) . ".gif");
// line 1
yield from $this->getParent($context)->unwrap()->yield($context, array_merge($this->blocks, $blocks));
}
// line 4
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_meta_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->trans("Order"), "html", null, true);
yield from [];
}
// line 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_meta_description(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Template.php
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function yield(array $context, array $blocks = []): iterable
{
$context += $this->env->getGlobals();
$blocks = array_merge($this->blocks, $blocks);
try {
$this->ensureSecurityChecked();
yield from $this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Template.php
{
return $this;
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*/
public function getBlocks(): array
{
return $this->blocks;
}
public function display(array $context, array $blocks = []): void
{
foreach ($this->yield($context, $blocks) as $data) {
echo $data;
}
}
public function render(array $context): string
{
if (!$this->useYield) {
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(static function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/Template.php
}
public function display(array $context, array $blocks = []): void
{
foreach ($this->yield($context, $blocks) as $data) {
echo $data;
}
}
public function render(array $context): string
{
if (!$this->useYield) {
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(static function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
/home/wowzahos/domains/app.wowzahosting.com/public_html/vendor/twig/twig/src/TemplateWrapper.php
/**
* @return iterable<scalar|\Stringable|null>
*/
public function stream(array $context = []): iterable
{
yield from $this->template->yield($context);
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function streamBlock(string $name, array $context = []): iterable
{
yield from $this->template->yieldBlock($name, $context);
}
public function render(array $context = []): string
{
return $this->template->render($context);
}
/**
* @return void
*/
public function display(array $context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
$this->template->display($context, \func_get_args()[1] ?? []);
}
public function hasBlock(string $name, array $context = []): bool
{
return $this->template->hasBlock($name, $context);
}
/**
* @return string[] An array of defined template block names
*/
/home/wowzahos/domains/app.wowzahosting.com/public_html/library/Box/AppClient.php
$this->di['logger']->setChannel('routing')->info($e->getMessage());
return $this->errorResponse($e, 404);
}
/**
* @param string $fileName
*/
#[Override]
public function render($fileName, $variableArray = [], $ext = 'html.twig'): string
{
try {
$template = $this->getTwig()->load(Path::changeExtension($fileName, $ext));
} catch (Twig\Error\LoaderError $e) {
$this->di['logger']->setChannel('routing')->info($e->getMessage());
throw new FOSSBilling\InformationException('Page not found', null, 404);
}
return $template->render($variableArray);
}
/**
* Get Twig environment for client area.
*/
protected function getTwig(): Twig\Environment
{
$twigFactory = $this->di['twig_factory'];
return $twigFactory->createClientEnvironment($this->debugBar);
}
}
/home/wowzahos/domains/app.wowzahosting.com/public_html/modules/Order/Controller/Client.php
$this->di = $di;
}
public function getDi(): ?\Pimple\Container
{
return $this->di;
}
public function register(\Box_App &$app): void
{
$app->get('/order', 'get_products', [], static::class);
$app->get('/order/service', 'get_orders', [], static::class);
$app->get('/order/:id', 'get_configure_product', ['id' => '[0-9]+'], static::class);
$app->get('/order/:slug', 'get_configure_product_by_slug', ['slug' => '[a-z0-9-]+'], static::class);
$app->get('/order/service/manage/:id', 'get_order', ['id' => '[0-9]+'], static::class);
}
public function get_products(\Box_App $app): string
{
return $app->render('mod_order_index');
}
public function get_configure_product_by_slug(\Box_App $app, $slug): string
{
$api = $this->di['api_guest'];
$product = $api->product_get(['slug' => $slug]);
$tpl = 'mod_service' . $product['type'] . '_order';
if ($api->system_template_exists(['file' => $tpl . '.html.twig'])) {
return $app->render($tpl, ['product' => $product]);
}
return $app->render('mod_order_product', ['product' => $product]);
}
public function get_configure_product(\Box_App $app, $id): string
{
$api = $this->di['api_guest'];
$product = $api->product_get(['id' => $id]);
$tpl = 'mod_service' . $product['type'] . '_order';
if ($api->system_template_exists(['file' => $tpl . '.html.twig'])) {
/home/wowzahos/domains/app.wowzahosting.com/public_html/library/Box/App.php
$timeCollector->startMeasure('executeShared', 'Reflecting module controller (shared mapping)');
$class = new $classname();
if ($class instanceof InjectionAwareInterface) {
$class->setDi($this->di);
}
$reflection = new ReflectionMethod($class::class, $methodName);
$args = [];
$args[] = $this; // first param always app instance
foreach ($reflection->getParameters() as $param) {
if (isset($params[$param->name])) {
$args[$param->name] = $params[$param->name];
} elseif ($param->isDefaultValueAvailable()) {
$args[$param->name] = $param->getDefaultValue();
}
}
$timeCollector->stopMeasure('executeShared');
return $reflection->invokeArgs($class, $args);
}
protected function execute($methodName, $params, $classname = null): mixed
{
/** @var TimeDataCollector $timeCollector */
$timeCollector = $this->debugBar->getCollector('time');
$timeCollector->startMeasure('execute', 'Reflecting module controller');
$reflection = new ReflectionMethod(static::class, $methodName);
$args = [];
foreach ($reflection->getParameters() as $param) {
if (isset($params[$param->name])) {
$args[$param->name] = $params[$param->name];
} elseif ($param->isDefaultValueAvailable()) {
$args[$param->name] = $param->getDefaultValue();
}
}
/home/wowzahos/domains/app.wowzahosting.com/public_html/library/Box/App.php
return $apiController->renderJson(null, $exc);
}
return $this->renderResponse('mod_system_maintenance', [], 503);
}
}
/** @var TimeDataCollector $timeCollector */
$timeCollector = $this->debugBar->getCollector('time');
$timeCollector->startMeasure('sharedMapping', 'Checking shared mappings');
$sharedCount = count($this->shared);
for ($i = 0; $i < $sharedCount; ++$i) {
$mapping = $this->shared[$i];
$url = new Box_UrlHelper($mapping[0], $mapping[1], $mapping[3], $this->url, $this->getRequest()->getMethod());
if ($url->match) {
$timeCollector->stopMeasure('sharedMapping');
return $this->normalizeResponse($this->executeShared($mapping[4], $mapping[2], $url->params));
}
}
$timeCollector->stopMeasure('sharedMapping');
// this class mappings
$timeCollector->startMeasure('mapping', 'Checking mappings');
$mappingsCount = count($this->mappings);
for ($i = 0; $i < $mappingsCount; ++$i) {
$mapping = $this->mappings[$i];
$url = new Box_UrlHelper($mapping[0], $mapping[1], $mapping[3], $this->url, $this->getRequest()->getMethod());
if ($url->match) {
$timeCollector->stopMeasure('mapping');
return $this->normalizeResponse($this->execute($mapping[2], $url->params));
}
}
$timeCollector->stopMeasure('mapping');
$e = new FOSSBilling\InformationException('Page :url not found', [':url' => $this->url], 404);
/home/wowzahos/domains/app.wowzahosting.com/public_html/library/Box/App.php
public function run(): Response
{
/** @var TimeDataCollector $timeCollector */
$timeCollector = $this->debugBar->getCollector('time');
try {
$timeCollector->startMeasure('registerModule', 'Registering module routes');
$this->registerModule();
$timeCollector->stopMeasure('registerModule');
$timeCollector->startMeasure('init', 'Initializing the app');
$this->init();
$timeCollector->stopMeasure('init');
$timeCollector->startMeasure('checkperm', 'Checking access to module');
$this->checkPermission();
$timeCollector->stopMeasure('checkperm');
return $this->processRequest();
} catch (AuthenticationRequiredException $e) {
if ($e->getArea() === 'admin') {
$this->di['set_return_uri'];
return new RedirectResponse($this->di['url']->adminLink('staff/login'));
}
$this->di['set_return_uri'];
return new RedirectResponse($this->di['url']->link('login'));
} catch (EmailValidationRequiredException) {
return new RedirectResponse($this->di['url']->link('client/profile'));
} catch (HttpResponseException $e) {
return $e->getResponse();
}
}
/**
* @param string $path
*/
/home/wowzahos/domains/app.wowzahosting.com/public_html/index.php
$timeCollector?->stopMeasure('translate');
// If HTTP error code has been passed, handle it.
if (!is_null($http_err_code)) {
$http_err_code = intval($http_err_code);
switch ($http_err_code) {
case 404:
$e = new FOSSBilling\Exception('Page :url not found', [':url' => $url], 404);
$app->show404($e)->send();
break;
default:
$e = new FOSSBilling\Exception('HTTP Error :err_code occurred while attempting to load :url', [':err_code' => $http_err_code, ':url' => $url], $http_err_code);
(new Response($app->render('error', ['exception' => $e]), $http_err_code))->send();
}
exit;
}
// If no HTTP error passed, run the app.
$app->run()->send();
exit;