Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /* __________________________________________________ | Obfuscated by YAK P..

Decoded Output download

<?php 
/*   __________________________________________________ 
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.14  | 
    |              on 2024-01-23 04:34:37              | 
    |    GitHub: https://github.com/pk-fr/yakpro-po    | 
    |__________________________________________________| 
*/ 
namespace App\Helpers; use Illuminate\Contracts\Validation\Factory as ValidationFactory; use Illuminate\Foundation\Http\FormRequest; use function app; use function csrf_token; use function old; use function session; class FormBuilder { protected $fields = array(); protected $formAttributes = array(); protected $errors = array(); protected $rules = array(); protected $validator; public function __construct() { $this->validator = app(ValidationFactory::class)->make([], []); } public function openForm($action = '', $method = "POST", $formName = '', $attributes = array()) { $this->formAttributes = ["action" => $action, "method" => $method, "formName" => $formName ? $formName : '', "attributes" => $attributes]; } public function closeForm() { $html = "</form>"; $html .= "</div>"; return $html; } public function addFileField($name, $label, $options = array(), $uploadedFiles = array()) { $field = ["type" => "file", "name" => $name, "label" => $label, "options" => $options, "uploadedFiles" => $uploadedFiles]; $this->fields[] = $field; } public function addField($type, $name, $label, $options = array()) { if ($type === "submit") { $this->addSubmitButton($name, $label, $options); } else { $field = compact("type", "name", "label", "options"); if (isset($options["rules"])) { $this->rules[$name] = $options["rules"]; } if ($type === "radio" && isset($options["choices"])) { $field["options"]["choices"] = $options["choices"]; $field["options"]["id"] = isset($options["id"]) ? $options["id"] : $name; $field["options"]["value"] = isset($options["value"]) ? $options["value"] : ''; $field["options"]["label_position"] = isset($options["label_position"]) ? $options["label_position"] : "before"; } $this->fields[] = $field; } } public function addSubmitButton($name, $label, $options = array()) { $this->fields[] = ["type" => "submit", "name" => $name, "label" => $label, "options" => $options]; } public function render() { $html = ''; foreach ($this->fields as $field) { $html .= $this->renderField($field); SdZid: } wajL7: return $html; } public function withErrors($errors) { $this->errors = $errors; } public function setErrors($errors) { $this->errors = $errors; } public function validateRequest(FormRequest $request) { $this->validator->setData($request->all()); $this->validator->setRules($this->rules); if ($this->validator->fails()) { $this->errors = $this->validator->errors()->messages(); return false; } return true; } protected function openFormTag() { $action = $this->formAttributes["action"]; $method = $this->formAttributes["method"]; $attributes = $this->formAttributes["attributes"]; $html = "<div class="box box-info">"; $html .= "<div class="box-header with-border">"; $html .= "<h3 class="box-title"> " . $this->formAttributes["formName"] . " </h3>"; $html .= "</div>"; $html .= "<form class="form-horizontal" action="" . $action . "" method="" . $method . """; foreach ($attributes as $attribute => $value) { $html .= " " . $attribute . "="" . $value . """; D9KdN: } BIM4Y: $html .= ">"; $html .= "<input type="hidden" name="_token" value="" . csrf_token() . "">"; return $html; } public function getErrors() { return $this->errors; } protected function renderField($field) { $type = $field["type"]; $name = $field["name"]; $label = $field["label"]; $options = $field["options"]; $requiredLabel = isset($field["options"]["labelRequired"]) ? " <span style="color:red"> (*) </span> " : ''; $appendLabelColumn = "col-sm-2"; $html = "<div class="box-body row">"; if ($type !== "submit") { if (isset($options["id"])) { $html .= "<label class="col-form-label " . $appendLabelColumn . " " for="" . $options["id"] . "">" . $label . "&nbsp " . $requiredLabel . "</label>"; } else { $html .= "<label class="col-form-label " . $appendLabelColumn . "" for="" . $name . "">" . $label . "&nbsp " . $requiredLabel . "</label>"; } } else { $html .= "<label class="col-form-label " . $appendLabelColumn . "" for="" . $name . ""></label>"; } $html .= "<div class="col-sm-10">"; switch ($type) { case "text": $html .= $this->renderTextInput($name, $options); goto gwec9; case "email": $html .= $this->renderEmailInput($name, $options); goto gwec9; case "password": $html .= $this->renderPasswordInput($name, $options); goto gwec9; case "textarea": $html .= $this->renderTextarea($name, $options); goto gwec9; case "select": $html .= $this->renderSelect($name, $options); goto gwec9; case "checkbox": $html .= $this->renderCheckbox($name, $label, $options); goto gwec9; case "radio": $html .= $this->renderRadio($name, $label, $options); goto gwec9; case "submit": $html .= $this->renderSubmitButton($name, $label, $options); goto gwec9; case "custome": $html .= $this->renderCustomField($name, $label, $options); goto gwec9; case "file": $html .= $this->renderFile($name, $label, $options, $field["uploadedFiles"]); goto gwec9; case "switch": $html .= $this->renderSwitch($name, $label, $options); goto gwec9; } iSfaW: gwec9: $html .= "</div>"; $html .= "</div>"; return $html; } protected function renderSwitch($name, $label, $options) { $html = "<label class="switch">"; $html .= "<input type="checkbox" name="" . $name . """; if (isset($options["class"])) { $html .= " class="" . $options["class"] . """; } if (isset($options["id"])) { $html .= " id="" . $options["id"] . """; } if (isset($options["placeholder"])) { $html .= " placeholder="" . $options["placeholder"] . """; } if (isset($options["value"]) && $options["value"] === true) { $html .= " checked"; } $html .= ">"; $html .= "<span class="slider round"></span>"; $html .= "</label>"; return $html; } protected function renderFile($name, $label, $options, $uploadedFiles) { $html = "<input type="file" name="" . $name . """; if (isset($options["class"])) { $html .= " class="" . $options["class"] . """; } if (isset($options["id"])) { $html .= " id="" . $options["id"] . """; } $html .= ">"; if (!empty($uploadedFiles)) { foreach ($uploadedFiles as $uploadedFile) { if (strpos($uploadedFile, ".jpg") !== false || strpos($uploadedFile, ".png") !== false || strpos($uploadedFile, ".jpeg") !== false || strpos($uploadedFile, ".gif") !== false) { $html .= "<img src="" . $uploadedFile . "" alt="Uploaded Image">"; } VoHNi: } z1Mzp: } return $html; } protected function renderTextInput($name, $options) { if (isset($options["regex"])) { $value = $_POST[$name] ?? ''; $regex = $options["regex"]; $this->validateRegex($name, $value, $regex); } $html = "<input type="text"  name="" . $name . """; $oldValue = old($name); if ($oldValue !== null) { $html .= " value="" . htmlspecialchars($oldValue) . """; } foreach ($options as $option => $value) { if ($option !== "id") { $html .= " " . $option . "="" . $value . """; } V4EKG: } lHbtE: if (isset($options["class"])) { $html .= " class="form-control " . $options["class"] . """; } else { $html .= " class="form-control""; } if (isset($options["id"])) { $html .= " id="" . $options["id"] . """; } if (isset($options["placeholder"])) { $html .= " placeholder="" . $options["placeholder"] . """; } $html .= ">"; $errors = session("errors"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "<span class="error-message text-danger">" . $error . "</span>"; } return $html; } protected function renderEmailInput($name, $options) { $html = "<input type="email" name="" . $name . """; $oldValue = old($name); if ($oldValue !== null) { $html .= " value="" . htmlspecialchars($oldValue) . """; } foreach ($options as $option => $value) { if ($option !== "id") { $html .= " " . $option . "="" . $value . """; } fkBpN: } t5heA: if (isset($options["class"])) { $html .= " class="form-control " . $options["class"] . """; } else { $html .= " class="form-control""; } if (isset($options["id"])) { $html .= " id="" . $options["id"] . """; } if (isset($options["placeholder"])) { $html .= " placeholder="" . $options["placeholder"] . """; } $html .= ">"; $errors = session("errors"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "<span class="error-message text-danger" >" . $error . "</span>"; } return $html; } protected function renderPasswordInput($name, $options) { $html = "<input type="password" name="" . $name . """; $oldValue = old($name); if ($oldValue !== null) { $html .= " value="" . htmlspecialchars($oldValue) . """; } foreach ($options as $option => $value) { if ($option !== "id") { $html .= " " . $option . "="" . $value . """; } h6qL8: } fKlMy: if (isset($options["class"])) { $html .= " class="form-control " . $options["class"] . """; } else { $html .= " class="form-control""; } if (isset($options["id"])) { $html .= " id="" . $options["id"] . """; } if (isset($options["placeholder"])) { $html .= " placeholder="" . $options["placeholder"] . """; } $html .= ">"; $errors = session("errors"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "<span class="error-message text-danger">" . $error . "</span>"; } return $html; } protected function renderTextarea($name, $options) { $html = "<textarea name="" . $name . """; foreach ($options as $option => $value) { if ($option !== "id" && $option !== "rows" && $option !== "cols") { $html .= " " . $option . "="" . $value . """; } dTAdZ: } Ie8LV: if (isset($options["class"])) { $html .= " class="form-control " . $options["class"] . """; } else { $html .= " class="form-control""; } if (isset($options["id"])) { $html .= " id="" . $options["id"] . """; } if (isset($options["rows"])) { $html .= " rows="" . $options["rows"] . """; } if (isset($options["cols"])) { $html .= " cols="" . $options["cols"] . """; } if (isset($options["placeholder"])) { $html .= " placeholder="" . $options["placeholder"] . """; } $oldValue = old($name); if ($oldValue !== null) { $html .= " value="" . htmlspecialchars($oldValue) . """; } $html .= "></textarea>"; $errors = session("errors"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "<span class="error-message text-danger">" . $error . "</span>"; } return $html; } protected function renderSelect($name, $options) { $html = "<select class="form-control select2" name="" . $name . """; foreach ($options as $option => $value) { if ($option !== "id" && $option !== "options") { $html .= " " . $option . "="" . $value . """; } TiTxM: } vO1cx: $html .= ">"; $selectOptions = $options["options"]; $oldValue = !empty(session()->getOldInput($name)) ? session()->getOldInput($name) : ''; if (is_array($selectOptions) && count($selectOptions) > 0) { foreach ($selectOptions as $optionValue => $optionLabel) { $selected = ''; if ($oldValue == $optionValue) { $selected = "selected"; } $html .= "<option value="" . $optionValue . "" " . $selected . ">" . $optionLabel . "</option>"; FlQWG: } J_1dv: } $html .= "</select>"; $errors = session("errors"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "<span class="error-message text-danger">" . $error . "</span>"; } return $html; } protected function renderCheckbox($name, $label, $options) { $html = ''; $selectedValues = is_array($options["value"]) ? $options["value"] : [$options["value"]]; $choices = is_array($options["choices"]) ? $options["choices"] : [$options["choices"]]; $inputName = is_array($options["value"]) ? $name . "[]" : $name; $oldValue = !empty(session()->getOldInput($name)) ? session()->getOldInput($name) : ''; foreach ($choices as $value => $choiceLabel) { $radioId = $options["id"] . "_" . $value; $checked = in_array($value, $selectedValues) ? "checked" : ''; $radioClass = !empty($options["class"]) ? "class="" . $options["class"] . """ : ''; if (is_array($oldValue)) { $checked = in_array($value, $oldValue) ? "checked" : ''; } $html .= "<label><input type="checkbox"" . $radioClass . " name="" . $inputName . "" id="" . $radioId . "" value="" . $value . "" " . $checked . ">"; if (isset($options["label_position"]) && $options["label_position"] === "after") { $html .= $choiceLabel . "</label> "; } else { $html .= "</label> " . $choiceLabel . "&nbsp &nbsp"; } sfOBa: } Amo5T: $errors = session("errors"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "<span class="error-message text-danger">" . $error . "</span>"; } return $html; } protected function renderRadio($name, $label, $options) { $html = ''; foreach ($options["choices"] as $value => $choiceLabel) { $radioId = $options["id"] . "_" . $value; $checked = $value == $options["value"] ? "checked" : ''; $radioClass = !empty($options["class"]) ? "class="" . $options["class"] . """ : ''; $html .= "<label><input type="radio"" . $radioClass . " name="" . $name . "" id="" . $radioId . "" value="" . $value . "" " . $checked . ">"; if (isset($options["label_position"]) && $options["label_position"] === "after") { $html .= $choiceLabel . "</label> "; } else { $html .= "</label> " . $choiceLabel . "&nbsp &nbsp"; } wPvg8: } ZNQLp: $errors = session("errors"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "<span class="error-message text-danger">" . $error . "</span>"; } return $html; } protected function renderCustomField($name, $label, $options) { $html = ''; $html .= "<div class="col-sm-10">"; $html .= $options["html"]; $html .= "</div>"; return $html; } protected function renderSubmitButton($name, $label, $options) { $html = "<div class="">"; $html .= "<button type="submit" name="" . $name . """; foreach ($options as $option => $value) { if ($option !== "id" && $option !== "class") { $html .= " " . $option . "="" . $value . """; } KBFfL: } QycbC: if (isset($options["class"])) { $html .= " class="" . $options["class"] . """; } $html .= ">" . $label . "</button>"; $html .= "</div>"; return $html; } protected function addError($name, $message) { $this->errors[$name] = $message; } protected function hasError($name) { return isset($this->errors[$name]); } protected function getError($name) { return $this->errors[$name]; } protected function validateRegex($name, $value, $regex) { if (!preg_match($regex, $value)) { $this->addError($name, $this->getErrorMessage("regex")); return false; } return true; } protected function getErrorMessage($type) { switch ($type) { case "regex": return "Invalid format."; } hjn1m: AUr29: } } 
 ?>

Did this file decode correctly?

Original Code

<?php
/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.14  |
    |              on 2024-01-23 04:34:37              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
namespace App\Helpers; use Illuminate\Contracts\Validation\Factory as ValidationFactory; use Illuminate\Foundation\Http\FormRequest; use function app; use function csrf_token; use function old; use function session; class FormBuilder { protected $fields = array(); protected $formAttributes = array(); protected $errors = array(); protected $rules = array(); protected $validator; public function __construct() { $this->validator = app(ValidationFactory::class)->make([], []); } public function openForm($action = '', $method = "\120\117\x53\124", $formName = '', $attributes = array()) { $this->formAttributes = ["\141\143\164\x69\x6f\156" => $action, "\x6d\x65\164\x68\x6f\144" => $method, "\x66\x6f\162\155\116\141\x6d\145" => $formName ? $formName : '', "\x61\x74\x74\x72\x69\x62\165\x74\x65\x73" => $attributes]; } public function closeForm() { $html = "\74\57\x66\x6f\x72\x6d\x3e"; $html .= "\74\57\x64\x69\x76\76"; return $html; } public function addFileField($name, $label, $options = array(), $uploadedFiles = array()) { $field = ["\x74\171\x70\145" => "\x66\x69\x6c\x65", "\x6e\141\155\x65" => $name, "\154\141\x62\145\x6c" => $label, "\157\160\x74\151\x6f\x6e\163" => $options, "\165\160\154\157\141\x64\145\144\x46\151\154\145\x73" => $uploadedFiles]; $this->fields[] = $field; } public function addField($type, $name, $label, $options = array()) { if ($type === "\163\165\x62\155\x69\x74") { $this->addSubmitButton($name, $label, $options); } else { $field = compact("\164\171\160\145", "\156\x61\x6d\145", "\154\141\x62\145\x6c", "\x6f\x70\164\x69\x6f\x6e\163"); if (isset($options["\162\x75\x6c\145\163"])) { $this->rules[$name] = $options["\x72\x75\x6c\x65\x73"]; } if ($type === "\x72\x61\144\151\x6f" && isset($options["\143\x68\x6f\151\143\x65\163"])) { $field["\x6f\x70\164\x69\x6f\x6e\163"]["\143\x68\x6f\151\143\145\x73"] = $options["\143\x68\157\151\143\x65\x73"]; $field["\x6f\x70\x74\x69\157\156\x73"]["\151\x64"] = isset($options["\151\144"]) ? $options["\x69\144"] : $name; $field["\157\160\164\x69\x6f\156\x73"]["\166\141\154\165\145"] = isset($options["\166\x61\x6c\x75\x65"]) ? $options["\x76\x61\x6c\x75\x65"] : ''; $field["\x6f\160\x74\151\157\156\x73"]["\154\x61\142\145\x6c\137\160\157\x73\x69\164\151\157\x6e"] = isset($options["\154\141\x62\145\x6c\137\160\157\x73\151\164\151\x6f\156"]) ? $options["\154\141\x62\x65\x6c\x5f\160\x6f\163\151\x74\x69\157\156"] : "\x62\145\x66\157\162\145"; } $this->fields[] = $field; } } public function addSubmitButton($name, $label, $options = array()) { $this->fields[] = ["\164\x79\x70\x65" => "\x73\165\x62\x6d\x69\x74", "\156\141\155\145" => $name, "\x6c\x61\142\x65\154" => $label, "\157\160\x74\x69\157\x6e\x73" => $options]; } public function render() { $html = ''; foreach ($this->fields as $field) { $html .= $this->renderField($field); SdZid: } wajL7: return $html; } public function withErrors($errors) { $this->errors = $errors; } public function setErrors($errors) { $this->errors = $errors; } public function validateRequest(FormRequest $request) { $this->validator->setData($request->all()); $this->validator->setRules($this->rules); if ($this->validator->fails()) { $this->errors = $this->validator->errors()->messages(); return false; } return true; } protected function openFormTag() { $action = $this->formAttributes["\x61\x63\164\151\157\156"]; $method = $this->formAttributes["\155\x65\164\x68\x6f\x64"]; $attributes = $this->formAttributes["\141\164\164\x72\151\142\165\164\145\163"]; $html = "\x3c\144\x69\x76\x20\x63\x6c\141\163\163\x3d\x22\142\157\x78\x20\142\x6f\170\x2d\151\x6e\x66\157\x22\x3e"; $html .= "\x3c\144\151\166\x20\143\x6c\x61\163\163\75\42\142\x6f\x78\55\150\145\141\144\145\162\x20\167\x69\164\x68\x2d\142\157\162\x64\145\x72\x22\76"; $html .= "\x3c\150\x33\40\143\154\141\163\163\x3d\x22\142\x6f\170\x2d\x74\x69\x74\154\145\x22\76\x20" . $this->formAttributes["\x66\x6f\x72\x6d\116\141\x6d\145"] . "\x20\x3c\57\150\x33\x3e"; $html .= "\74\x2f\144\x69\x76\x3e"; $html .= "\x3c\146\x6f\x72\x6d\40\143\x6c\x61\x73\163\x3d\42\146\x6f\162\x6d\x2d\x68\x6f\x72\151\172\157\x6e\164\141\x6c\x22\40\x61\143\x74\x69\x6f\x6e\x3d\42" . $action . "\42\40\x6d\145\164\x68\157\x64\x3d\42" . $method . "\x22"; foreach ($attributes as $attribute => $value) { $html .= "\40" . $attribute . "\x3d\x22" . $value . "\x22"; D9KdN: } BIM4Y: $html .= "\76"; $html .= "\x3c\151\x6e\160\x75\x74\40\164\171\x70\x65\75\42\150\x69\144\x64\145\x6e\x22\40\x6e\x61\x6d\x65\75\42\137\x74\157\x6b\145\156\x22\x20\x76\x61\x6c\x75\x65\75\x22" . csrf_token() . "\42\x3e"; return $html; } public function getErrors() { return $this->errors; } protected function renderField($field) { $type = $field["\x74\x79\x70\x65"]; $name = $field["\x6e\x61\x6d\x65"]; $label = $field["\x6c\x61\142\145\x6c"]; $options = $field["\x6f\x70\164\x69\x6f\156\x73"]; $requiredLabel = isset($field["\x6f\160\164\151\157\x6e\163"]["\154\x61\x62\145\x6c\122\x65\x71\165\x69\162\145\x64"]) ? "\40\74\163\160\x61\x6e\40\163\164\171\154\x65\x3d\x22\x63\157\154\x6f\x72\72\x72\x65\144\42\76\40\x28\52\51\40\x3c\x2f\x73\x70\141\156\76\40" : ''; $appendLabelColumn = "\143\x6f\154\55\163\155\x2d\x32"; $html = "\x3c\144\151\x76\40\143\154\x61\x73\163\x3d\42\x62\157\x78\55\x62\x6f\144\171\x20\x72\157\x77\42\x3e"; if ($type !== "\163\165\x62\155\x69\164") { if (isset($options["\151\144"])) { $html .= "\x3c\x6c\x61\142\x65\x6c\x20\x63\x6c\141\163\163\75\42\x63\x6f\154\x2d\146\x6f\162\155\55\154\x61\x62\145\154\40" . $appendLabelColumn . "\x20\x22\x20\x66\x6f\x72\x3d\42" . $options["\151\x64"] . "\x22\76" . $label . "\46\x6e\x62\x73\160\40" . $requiredLabel . "\x3c\x2f\154\x61\x62\x65\154\76"; } else { $html .= "\x3c\154\141\142\x65\154\x20\x63\154\141\x73\x73\x3d\42\143\157\154\55\x66\157\x72\x6d\55\x6c\141\x62\145\154\x20" . $appendLabelColumn . "\42\x20\x66\157\x72\x3d\x22" . $name . "\x22\76" . $label . "\46\156\x62\163\x70\40" . $requiredLabel . "\x3c\57\154\x61\x62\x65\x6c\76"; } } else { $html .= "\x3c\x6c\x61\142\x65\x6c\x20\143\154\x61\163\163\75\42\x63\157\154\55\146\157\162\x6d\x2d\154\141\142\x65\154\x20" . $appendLabelColumn . "\42\40\x66\157\162\75\42" . $name . "\x22\x3e\74\57\x6c\141\x62\x65\154\76"; } $html .= "\x3c\x64\x69\166\40\x63\154\x61\163\163\x3d\42\x63\x6f\154\x2d\163\155\55\61\x30\42\76"; switch ($type) { case "\x74\x65\170\x74": $html .= $this->renderTextInput($name, $options); goto gwec9; case "\145\155\141\151\154": $html .= $this->renderEmailInput($name, $options); goto gwec9; case "\x70\x61\163\x73\167\157\162\x64": $html .= $this->renderPasswordInput($name, $options); goto gwec9; case "\164\x65\x78\x74\x61\162\x65\141": $html .= $this->renderTextarea($name, $options); goto gwec9; case "\x73\145\x6c\145\143\164": $html .= $this->renderSelect($name, $options); goto gwec9; case "\x63\x68\145\x63\153\142\157\170": $html .= $this->renderCheckbox($name, $label, $options); goto gwec9; case "\162\x61\x64\x69\157": $html .= $this->renderRadio($name, $label, $options); goto gwec9; case "\163\x75\142\x6d\x69\x74": $html .= $this->renderSubmitButton($name, $label, $options); goto gwec9; case "\143\x75\163\x74\x6f\x6d\x65": $html .= $this->renderCustomField($name, $label, $options); goto gwec9; case "\146\x69\x6c\145": $html .= $this->renderFile($name, $label, $options, $field["\165\x70\x6c\157\x61\144\145\144\x46\x69\154\x65\x73"]); goto gwec9; case "\x73\x77\151\164\143\150": $html .= $this->renderSwitch($name, $label, $options); goto gwec9; } iSfaW: gwec9: $html .= "\74\x2f\x64\151\x76\76"; $html .= "\74\57\144\151\x76\x3e"; return $html; } protected function renderSwitch($name, $label, $options) { $html = "\x3c\x6c\141\x62\145\154\40\x63\x6c\141\x73\x73\75\42\x73\167\151\x74\143\150\x22\76"; $html .= "\74\x69\156\160\x75\164\x20\164\171\x70\x65\x3d\42\x63\x68\x65\143\153\142\x6f\x78\42\40\x6e\x61\155\x65\x3d\42" . $name . "\x22"; if (isset($options["\143\x6c\141\x73\163"])) { $html .= "\x20\x63\154\x61\163\163\75\42" . $options["\x63\154\x61\x73\163"] . "\42"; } if (isset($options["\151\144"])) { $html .= "\x20\x69\144\75\x22" . $options["\151\144"] . "\x22"; } if (isset($options["\160\x6c\x61\x63\x65\150\157\x6c\144\145\162"])) { $html .= "\40\x70\154\x61\x63\x65\x68\x6f\x6c\144\145\162\x3d\x22" . $options["\160\x6c\x61\143\145\x68\157\154\144\x65\x72"] . "\42"; } if (isset($options["\x76\x61\154\x75\x65"]) && $options["\166\141\x6c\x75\145"] === true) { $html .= "\40\143\x68\145\x63\x6b\145\x64"; } $html .= "\x3e"; $html .= "\x3c\x73\x70\141\x6e\40\143\x6c\141\x73\x73\75\x22\163\x6c\151\144\145\x72\40\x72\157\x75\156\x64\x22\x3e\x3c\57\163\160\141\x6e\76"; $html .= "\x3c\57\x6c\141\x62\145\x6c\76"; return $html; } protected function renderFile($name, $label, $options, $uploadedFiles) { $html = "\x3c\x69\x6e\160\x75\164\x20\x74\x79\160\145\x3d\x22\x66\x69\x6c\145\x22\x20\x6e\x61\x6d\145\x3d\42" . $name . "\x22"; if (isset($options["\x63\x6c\141\x73\x73"])) { $html .= "\40\x63\154\x61\163\x73\x3d\x22" . $options["\143\154\141\163\163"] . "\42"; } if (isset($options["\151\x64"])) { $html .= "\40\151\144\75\x22" . $options["\151\x64"] . "\x22"; } $html .= "\76"; if (!empty($uploadedFiles)) { foreach ($uploadedFiles as $uploadedFile) { if (strpos($uploadedFile, "\x2e\152\x70\147") !== false || strpos($uploadedFile, "\x2e\x70\x6e\147") !== false || strpos($uploadedFile, "\x2e\152\x70\x65\x67") !== false || strpos($uploadedFile, "\x2e\147\151\x66") !== false) { $html .= "\x3c\151\x6d\147\x20\163\x72\143\75\x22" . $uploadedFile . "\42\40\x61\x6c\x74\75\x22\125\160\154\x6f\x61\144\145\144\40\111\x6d\x61\147\145\42\76"; } VoHNi: } z1Mzp: } return $html; } protected function renderTextInput($name, $options) { if (isset($options["\162\145\x67\x65\170"])) { $value = $_POST[$name] ?? ''; $regex = $options["\162\145\147\x65\170"]; $this->validateRegex($name, $value, $regex); } $html = "\x3c\151\156\160\x75\164\x20\x74\171\160\145\75\42\164\145\x78\164\42\40\40\156\141\x6d\x65\x3d\x22" . $name . "\42"; $oldValue = old($name); if ($oldValue !== null) { $html .= "\40\166\x61\x6c\x75\145\x3d\42" . htmlspecialchars($oldValue) . "\x22"; } foreach ($options as $option => $value) { if ($option !== "\x69\x64") { $html .= "\40" . $option . "\75\42" . $value . "\42"; } V4EKG: } lHbtE: if (isset($options["\x63\x6c\141\x73\x73"])) { $html .= "\x20\143\154\141\163\163\x3d\x22\x66\157\x72\x6d\55\x63\x6f\x6e\164\x72\157\x6c\40" . $options["\x63\154\141\x73\x73"] . "\42"; } else { $html .= "\x20\x63\154\141\x73\163\x3d\42\x66\157\162\155\x2d\x63\x6f\156\164\x72\x6f\x6c\x22"; } if (isset($options["\151\x64"])) { $html .= "\40\x69\x64\x3d\42" . $options["\x69\144"] . "\x22"; } if (isset($options["\160\x6c\x61\143\145\x68\157\x6c\x64\145\162"])) { $html .= "\x20\160\154\x61\143\145\x68\x6f\154\144\x65\162\x3d\42" . $options["\x70\154\141\143\145\150\x6f\x6c\x64\x65\162"] . "\42"; } $html .= "\x3e"; $errors = session("\145\x72\x72\157\x72\x73"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "\74\163\x70\141\x6e\40\x63\154\x61\163\163\x3d\x22\x65\162\162\x6f\x72\55\x6d\145\x73\163\141\x67\x65\x20\x74\x65\x78\x74\55\x64\x61\x6e\147\145\162\42\76" . $error . "\74\57\163\x70\x61\156\x3e"; } return $html; } protected function renderEmailInput($name, $options) { $html = "\x3c\x69\156\160\x75\x74\40\164\171\x70\x65\x3d\42\x65\155\x61\151\154\42\40\x6e\141\x6d\145\x3d\x22" . $name . "\x22"; $oldValue = old($name); if ($oldValue !== null) { $html .= "\40\166\141\x6c\x75\145\x3d\42" . htmlspecialchars($oldValue) . "\x22"; } foreach ($options as $option => $value) { if ($option !== "\x69\x64") { $html .= "\x20" . $option . "\75\x22" . $value . "\x22"; } fkBpN: } t5heA: if (isset($options["\x63\x6c\141\163\x73"])) { $html .= "\40\143\x6c\141\x73\163\75\x22\146\x6f\162\155\55\143\x6f\x6e\x74\x72\x6f\x6c\40" . $options["\x63\x6c\x61\x73\x73"] . "\42"; } else { $html .= "\x20\143\154\x61\163\163\x3d\42\146\157\x72\155\55\143\x6f\x6e\x74\x72\157\154\42"; } if (isset($options["\x69\x64"])) { $html .= "\40\x69\144\75\x22" . $options["\x69\144"] . "\42"; } if (isset($options["\160\154\x61\143\x65\150\x6f\x6c\x64\x65\162"])) { $html .= "\x20\160\154\141\x63\145\x68\157\154\x64\145\162\x3d\42" . $options["\160\154\141\x63\145\150\x6f\154\144\x65\162"] . "\42"; } $html .= "\76"; $errors = session("\145\x72\x72\157\x72\163"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "\74\x73\160\141\x6e\40\143\154\141\x73\x73\x3d\x22\x65\x72\x72\157\x72\55\x6d\145\x73\x73\x61\147\145\40\164\x65\170\x74\55\144\141\156\x67\145\162\x22\40\76" . $error . "\74\57\163\x70\141\x6e\x3e"; } return $html; } protected function renderPasswordInput($name, $options) { $html = "\x3c\x69\x6e\160\x75\164\x20\164\171\x70\x65\x3d\x22\160\x61\x73\163\167\157\162\144\42\x20\156\x61\x6d\x65\75\x22" . $name . "\x22"; $oldValue = old($name); if ($oldValue !== null) { $html .= "\x20\166\x61\154\x75\145\x3d\x22" . htmlspecialchars($oldValue) . "\x22"; } foreach ($options as $option => $value) { if ($option !== "\x69\144") { $html .= "\40" . $option . "\75\x22" . $value . "\42"; } h6qL8: } fKlMy: if (isset($options["\143\154\x61\x73\x73"])) { $html .= "\40\143\154\x61\163\x73\x3d\42\146\x6f\x72\x6d\x2d\x63\157\x6e\164\x72\x6f\154\x20" . $options["\143\154\141\x73\x73"] . "\x22"; } else { $html .= "\x20\x63\x6c\141\x73\163\75\x22\146\x6f\162\x6d\x2d\143\157\x6e\x74\x72\x6f\x6c\x22"; } if (isset($options["\x69\x64"])) { $html .= "\40\151\144\x3d\x22" . $options["\151\144"] . "\42"; } if (isset($options["\160\154\141\143\145\x68\157\x6c\x64\145\x72"])) { $html .= "\40\160\x6c\141\x63\x65\x68\157\x6c\144\x65\x72\75\x22" . $options["\160\154\141\143\x65\150\x6f\154\x64\145\x72"] . "\x22"; } $html .= "\x3e"; $errors = session("\x65\162\162\x6f\162\163"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "\74\x73\160\x61\x6e\x20\x63\154\x61\x73\x73\x3d\42\145\x72\162\157\x72\55\155\145\x73\x73\141\x67\145\40\x74\x65\x78\164\55\x64\x61\156\x67\145\162\42\x3e" . $error . "\74\57\x73\x70\141\156\76"; } return $html; } protected function renderTextarea($name, $options) { $html = "\74\x74\x65\x78\164\141\162\x65\141\40\x6e\141\x6d\x65\x3d\42" . $name . "\42"; foreach ($options as $option => $value) { if ($option !== "\x69\x64" && $option !== "\x72\157\167\x73" && $option !== "\x63\x6f\154\x73") { $html .= "\40" . $option . "\x3d\x22" . $value . "\42"; } dTAdZ: } Ie8LV: if (isset($options["\x63\x6c\x61\x73\x73"])) { $html .= "\40\143\154\x61\x73\163\75\x22\x66\157\x72\x6d\55\143\157\x6e\x74\162\157\154\x20" . $options["\x63\x6c\x61\163\163"] . "\x22"; } else { $html .= "\40\143\x6c\141\163\x73\x3d\42\146\x6f\x72\155\x2d\x63\157\156\x74\162\157\x6c\x22"; } if (isset($options["\x69\144"])) { $html .= "\x20\151\x64\75\42" . $options["\151\x64"] . "\42"; } if (isset($options["\x72\x6f\167\163"])) { $html .= "\x20\162\157\167\x73\75\42" . $options["\x72\157\x77\x73"] . "\42"; } if (isset($options["\x63\x6f\154\163"])) { $html .= "\x20\143\x6f\154\x73\x3d\42" . $options["\143\x6f\x6c\163"] . "\42"; } if (isset($options["\160\x6c\141\143\145\x68\157\x6c\144\145\162"])) { $html .= "\x20\160\154\141\x63\x65\x68\157\154\x64\145\162\75\x22" . $options["\x70\x6c\141\x63\x65\x68\x6f\154\144\145\162"] . "\42"; } $oldValue = old($name); if ($oldValue !== null) { $html .= "\x20\166\x61\x6c\165\145\75\42" . htmlspecialchars($oldValue) . "\42"; } $html .= "\76\x3c\x2f\x74\145\x78\164\x61\162\145\141\x3e"; $errors = session("\145\162\162\x6f\x72\163"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "\74\x73\x70\x61\156\x20\x63\154\x61\x73\x73\75\x22\x65\162\162\157\162\55\x6d\145\x73\163\141\x67\x65\40\164\x65\x78\164\55\144\141\x6e\x67\x65\x72\x22\76" . $error . "\74\57\163\x70\x61\156\76"; } return $html; } protected function renderSelect($name, $options) { $html = "\74\x73\145\154\x65\x63\x74\x20\143\154\141\x73\x73\75\42\x66\x6f\162\155\x2d\x63\157\x6e\x74\x72\x6f\154\x20\x73\x65\x6c\145\x63\x74\x32\42\x20\x6e\141\x6d\x65\75\x22" . $name . "\x22"; foreach ($options as $option => $value) { if ($option !== "\151\144" && $option !== "\x6f\160\x74\x69\x6f\156\x73") { $html .= "\40" . $option . "\x3d\42" . $value . "\42"; } TiTxM: } vO1cx: $html .= "\x3e"; $selectOptions = $options["\157\160\x74\151\157\156\x73"]; $oldValue = !empty(session()->getOldInput($name)) ? session()->getOldInput($name) : ''; if (is_array($selectOptions) && count($selectOptions) > 0) { foreach ($selectOptions as $optionValue => $optionLabel) { $selected = ''; if ($oldValue == $optionValue) { $selected = "\163\145\x6c\145\143\x74\145\144"; } $html .= "\74\157\160\x74\151\x6f\x6e\x20\x76\x61\x6c\x75\145\x3d\42" . $optionValue . "\42\40" . $selected . "\x3e" . $optionLabel . "\74\x2f\x6f\160\x74\151\x6f\x6e\x3e"; FlQWG: } J_1dv: } $html .= "\74\x2f\163\x65\154\x65\x63\x74\x3e"; $errors = session("\x65\x72\x72\x6f\162\x73"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "\74\163\160\x61\x6e\x20\143\x6c\x61\x73\x73\x3d\x22\145\162\x72\157\x72\x2d\155\145\163\163\x61\147\145\x20\164\x65\170\164\55\144\x61\x6e\x67\x65\x72\x22\x3e" . $error . "\74\x2f\163\x70\x61\156\76"; } return $html; } protected function renderCheckbox($name, $label, $options) { $html = ''; $selectedValues = is_array($options["\166\141\x6c\x75\x65"]) ? $options["\166\141\154\x75\145"] : [$options["\x76\141\154\165\145"]]; $choices = is_array($options["\x63\150\157\151\143\x65\x73"]) ? $options["\143\150\157\151\143\145\163"] : [$options["\x63\x68\x6f\x69\x63\145\163"]]; $inputName = is_array($options["\x76\x61\154\165\145"]) ? $name . "\133\135" : $name; $oldValue = !empty(session()->getOldInput($name)) ? session()->getOldInput($name) : ''; foreach ($choices as $value => $choiceLabel) { $radioId = $options["\151\144"] . "\x5f" . $value; $checked = in_array($value, $selectedValues) ? "\x63\x68\145\143\153\x65\144" : ''; $radioClass = !empty($options["\x63\154\141\163\163"]) ? "\143\x6c\x61\x73\163\x3d\x22" . $options["\x63\154\141\163\163"] . "\42" : ''; if (is_array($oldValue)) { $checked = in_array($value, $oldValue) ? "\x63\150\x65\x63\x6b\x65\144" : ''; } $html .= "\74\x6c\141\142\x65\154\76\x3c\x69\x6e\160\165\164\x20\164\x79\160\145\75\42\x63\150\x65\x63\x6b\142\157\170\x22" . $radioClass . "\40\x6e\x61\x6d\x65\75\x22" . $inputName . "\x22\x20\x69\x64\x3d\x22" . $radioId . "\42\40\x76\141\x6c\x75\145\75\x22" . $value . "\x22\40" . $checked . "\76"; if (isset($options["\154\141\142\145\x6c\x5f\x70\x6f\x73\x69\x74\151\x6f\156"]) && $options["\x6c\141\x62\x65\154\x5f\x70\x6f\x73\151\164\x69\157\156"] === "\x61\x66\x74\x65\x72") { $html .= $choiceLabel . "\74\57\x6c\141\142\145\154\76\x20"; } else { $html .= "\74\57\154\x61\x62\x65\x6c\x3e\x20" . $choiceLabel . "\46\x6e\142\x73\x70\40\46\x6e\142\x73\x70"; } sfOBa: } Amo5T: $errors = session("\145\x72\162\157\x72\x73"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "\x3c\163\x70\x61\156\x20\x63\154\141\x73\x73\75\x22\145\162\x72\x6f\162\x2d\155\x65\163\163\141\147\x65\x20\x74\145\x78\x74\x2d\x64\141\156\147\145\162\42\x3e" . $error . "\74\57\x73\160\141\x6e\76"; } return $html; } protected function renderRadio($name, $label, $options) { $html = ''; foreach ($options["\143\150\x6f\x69\x63\x65\x73"] as $value => $choiceLabel) { $radioId = $options["\151\x64"] . "\x5f" . $value; $checked = $value == $options["\x76\x61\x6c\x75\145"] ? "\143\x68\145\143\x6b\145\144" : ''; $radioClass = !empty($options["\143\x6c\x61\163\163"]) ? "\143\x6c\141\x73\x73\75\42" . $options["\143\x6c\141\163\163"] . "\x22" : ''; $html .= "\x3c\x6c\141\142\145\154\x3e\74\151\x6e\x70\165\x74\40\164\x79\160\145\75\x22\x72\x61\144\x69\157\42" . $radioClass . "\x20\x6e\x61\155\x65\x3d\x22" . $name . "\42\40\151\x64\75\42" . $radioId . "\42\40\x76\141\x6c\x75\145\75\x22" . $value . "\x22\40" . $checked . "\x3e"; if (isset($options["\154\141\142\x65\x6c\x5f\x70\x6f\163\151\x74\151\157\x6e"]) && $options["\x6c\141\x62\x65\154\137\160\x6f\x73\x69\x74\x69\157\156"] === "\141\x66\x74\145\x72") { $html .= $choiceLabel . "\x3c\57\x6c\x61\142\x65\154\x3e\x20"; } else { $html .= "\74\57\154\x61\142\145\154\x3e\x20" . $choiceLabel . "\46\156\x62\163\160\x20\46\x6e\142\163\x70"; } wPvg8: } ZNQLp: $errors = session("\x65\x72\x72\157\162\163"); if ($errors && $errors->has($name)) { $error = $errors->first($name); $html .= "\x3c\163\160\141\x6e\40\143\x6c\x61\163\163\x3d\x22\x65\x72\x72\x6f\x72\x2d\x6d\x65\163\163\141\x67\145\40\164\x65\x78\164\55\144\141\156\147\145\x72\x22\x3e" . $error . "\x3c\x2f\x73\160\x61\156\x3e"; } return $html; } protected function renderCustomField($name, $label, $options) { $html = ''; $html .= "\x3c\x64\151\x76\x20\x63\154\141\x73\x73\75\42\143\157\154\55\163\x6d\55\x31\x30\42\x3e"; $html .= $options["\x68\x74\155\154"]; $html .= "\x3c\57\144\x69\x76\x3e"; return $html; } protected function renderSubmitButton($name, $label, $options) { $html = "\74\x64\151\x76\x20\143\x6c\141\x73\163\75\42\42\x3e"; $html .= "\x3c\x62\x75\x74\164\157\x6e\40\x74\171\x70\x65\x3d\x22\163\165\142\155\x69\164\42\40\156\x61\155\x65\75\x22" . $name . "\x22"; foreach ($options as $option => $value) { if ($option !== "\x69\144" && $option !== "\x63\154\x61\163\x73") { $html .= "\x20" . $option . "\x3d\42" . $value . "\42"; } KBFfL: } QycbC: if (isset($options["\143\x6c\x61\163\x73"])) { $html .= "\40\x63\x6c\x61\x73\x73\75\x22" . $options["\x63\x6c\x61\163\x73"] . "\x22"; } $html .= "\x3e" . $label . "\x3c\57\142\x75\164\x74\x6f\x6e\76"; $html .= "\74\x2f\144\151\x76\76"; return $html; } protected function addError($name, $message) { $this->errors[$name] = $message; } protected function hasError($name) { return isset($this->errors[$name]); } protected function getError($name) { return $this->errors[$name]; } protected function validateRegex($name, $value, $regex) { if (!preg_match($regex, $value)) { $this->addError($name, $this->getErrorMessage("\162\x65\x67\145\170")); return false; } return true; } protected function getErrorMessage($type) { switch ($type) { case "\162\x65\147\x65\170": return "\x49\156\166\x61\154\151\x64\x20\146\x6f\162\155\x61\164\x2e"; } hjn1m: AUr29: } }

Function Calls

None

Variables

None

Stats

MD5 dcf02be6a845b99dfaae654f5ac49a90
Eval Count 0
Decode Time 103 ms