', $html);
$html = preg_replace_callback($pattern, function($matches) use($relationDatas) {
$type = $matches[1];
$name = $matches[2];
$value = isset($matches[3]) ? $matches[3] : null;
switch ($type) {
case 'radio':
case 'checkbox':
return '';
case 'text':
case 'email':
case 'number':
case 'date':
if($type == "date") {
$value = date("Y-m-d");
} else {
$value = "";
}
return '';
case 'time':
return '';
case 'textarea':
return '';
case 'select':
$options = "";
if(isset($relationDatas[$name]))
{
foreach($relationDatas[$name] AS $option)
{
$options .= "";
}
}
return '';
default:
return $matches[0]; // Değişiklik yapılmadan bırak
}
}, $html);
$mainContractor = db("subcontractors")->where("operation_type", "MAIN CONTRACTOR")->first();
if($mainContractor)
{
$html = str_replace("{project_address}", $mainContractor->address_ru . " / " . $mainContractor->address_en, $html);
}
$html = str_replace("{project_name}", setting("project_name_ru") . " / " . setting("project_name"), $html);
return $html;
}
?>