php ULTRA PRO Masterclass Bridge for italaw.com Forensic Fix Guaranteed Form Submission & Proactive URL Parameter Injection. 1. Nginx Polyfill if (!function_exists('getallheaders')) { function getallheaders() { $headers = array(); foreach ($_SERVER as $name = $value) { if (substr($name, 0, 5) === 'HTTP_') { $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; } } return $headers; } } 2. Safe SDK Hydration function sendinblue_boot() { error_reporting(E_ALL & ~E_NOTICE); $sib_path = DRUPAL_ROOT . 'sitesallmodulessendinbluevendorautoload.php'; if (file_exists($sib_path)) { require_once $sib_path; } } sendinblue_boot(); define('SENDINBLUE_SIGNUP_BLOCK', 1); define('SENDINBLUE_SIGNUP_PAGE', 2); define('SENDINBLUE_SIGNUP_BOTH', 3); module_load_include('inc', 'sendinblue', 'includessendinblue.manage'); module_load_include('php', 'sendinblue', 'includessendinblue.mailin'); Required API Models module_load_include('php', 'sendinblue', 'includesModelGetLists'); module_load_include('php', 'sendinblue', 'includesModelGetExtendedList'); module_load_include('php', 'sendinblue', 'includesModelGetAttributes'); module_load_include('php', 'sendinblue', 'includesModelGetAttributesAttributes'); module_load_include('php', 'sendinblue', 'includesModelGetAttributesEnumeration'); module_load_include('php', 'sendinblue', 'includesModelGetSmtpTemplates'); module_load_include('php', 'sendinblue', 'includesModelGetSmtpTemplateOverview'); module_load_include('inc', 'sendinblue', 'includessendinblue_signup.entity'); THE NUCLEAR FIX FOR SILENT SUBMISSIONS Forces the form submit handlers into global memory so Drupal never drops the POST payload. module_load_include('inc', 'sendinblue', 'includessendinblue_signup.admin'); ULTRA PRO FORECASTING Auto-Inject Case Name Prevents the next roadblock by automatically grabbing the case= URL parameter, injecting it into the Brevo payload, and hiding the field from the user. function sendinblue_form_sendinblue_signup_form_alter(&$form, &$form_state, $form_id) { if (isset($_GET['case'])) { $case_val = check_plain($_GET['case']); if (isset($form['CASE_NAME'])) { $form['CASE_NAME']['#default_value'] = $case_val; $form['CASE_NAME']['#access'] = FALSE; Hides it cleanly } if (isset($form['attributes']) && isset($form['attributes']['CASE_NAME'])) { $form['attributes']['CASE_NAME']['#default_value'] = $case_val; $form['attributes']['CASE_NAME']['#access'] = FALSE; } } } THE SURGICAL FIX FOR BLOCKS Direct Database Query function sendinblue_block_info() { $blocks = array(); if (db_table_exists('sendinblue_signup')) { try { $result = db_query(SELECT name, title FROM {sendinblue_signup}); foreach ($result as $record) { $blocks[$record-name] = array( 'info' = t('SendinBlue Signup @title', array('@title' = $record-title)), 'cache' = DRUPAL_CACHE_PER_ROLE, ); } } catch (Exception $e) { Safe fallback } } return $blocks; } function sendinblue_block_view($delta = '') { $block = array(); try { $signups = sendinblue_signup_load_multiple(FALSE, array('name' = $delta)); if (!empty($signups)) { $signup = reset($signups); $block['subject'] = check_plain($signup-title); $block['content'] = drupal_get_form('sendinblue_signup_form', $signup); } } catch (Exception $e) { $block['content'] = t('Signup form temporarily unavailable.'); } return $block; } function sendinblue_permission() { return array( 'administer sendinblue' = array( 'title' = t('administer sendinblue'), 'description' = t('Access the configuration options.'), ), ); } function sendinblue_entity_info() { return array( 'sendinblue_signup' = array( 'label' = t('SendinBlue Signup'), 'entity class' = 'SendinBlueSignup', 'controller class' = 'EntityAPIControllerExportable', 'base table' = 'sendinblue_signup', 'fieldable' = FALSE, 'exportable' = TRUE, 'entity keys' = array( 'id' = 'mcsId', 'name' = 'name', 'label' = 'title', ), 'access callback' = 'sendinblue_signup_access', 'module' = 'sendinblue', 'admin ui' = array( 'path' = 'adminconfigsystemsendinbluesignup', 'file' = 'includessendinblue_signup.admin.inc', 'controller class' = 'SendinblueSignupUIController', ), ), ); } function sendinblue_signup_access($op, $entity = NULL, $account = NULL) { return user_access('administer sendinblue', $account); } function sendinblue_menu() { $items = array(); $base = 'adminconfigsystemsendinblue'; $items[$base] = array( 'title' = 'SendinBlue', 'page callback' = 'sendinblue_home_page_router', 'access arguments' = array('administer sendinblue'), 'type' = MENU_NORMAL_ITEM, ); $items[$baseglobal] = array( 'title' = 'Home', 'type' = MENU_DEFAULT_LOCAL_TASK, 'weight' = -10, ); $items[$basesignup] = array( 'title' = 'Signups', 'page callback' = 'sendinblue_signup_page_router', 'access arguments' = array('administer sendinblue'), 'type' = MENU_LOCAL_TASK, 'weight' = 7, ); $items[$baselists] = array( 'title' = 'Lists', 'page callback' = 'sendinblue_list_page_router', 'access arguments' = array('administer sendinblue'), 'type' = MENU_LOCAL_TASK, 'weight' = 8, ); $items[$basestatistics] = array( 'title' = 'Statistics', 'page callback' = 'sendinblue_statistic_page_router', 'access arguments' = array('administer sendinblue'), 'type' = MENU_LOCAL_TASK, 'weight' = 9, ); return $items; } function sendinblue_signup_page_router() { $output = 'div style=margin-bottom 20px;'; $output .= 'a href=adminconfigsystemsendinbluesignupadd style=padding 8px 15px; background #0073ea; color white; text-decoration none; border-radius 4px; font-weight bold;+ Add SendinBlue Signupa'; $output .= 'div'; $output .= 'h3Active Signup Formsh3'; $output .= 'ul style=list-style-type none; padding 0;'; if (db_table_exists('sendinblue_signup')) { try { $result = db_query(SELECT name, title FROM {sendinblue_signup}); $count = 0; foreach ($result as $row) { $count++; $edit_link = 'adminconfigsystemsendinbluesignupmanage' . $row-name; $output .= 'li style=padding 10px; background #f9f9f9; border 1px solid #ddd; margin-bottom 10px; border-radius 4px;'; $output .= 'strong' . check_plain($row-title) . 'strong em(' . check_plain($row-name) . ')em'; $output .= ' a href=' . $edit_link . ' style=margin-left 15px; color #0073ea;[Edit Form]a'; $output .= 'li'; } if ($count === 0) { $output .= 'liNo forms generated yet. Click the Add button above.li'; } } catch (Exception $e) { $output .= 'liError reading from the database.li'; } } $output .= 'ul'; return $output; } function sendinblue_home_page_router() { module_load_include('inc', 'sendinblue', 'includessendinblue_home.admin'); return function_exists('sendinblue_home_page') sendinblue_home_page() t('Home missing.'); } function sendinblue_list_page_router() { module_load_include('inc', 'sendinblue', 'includessendinblue_list.admin'); return function_exists('sendinblue_list_page') sendinblue_list_page() t('Lists missing.'); } function sendinblue_statistic_page_router() { module_load_include('inc', 'sendinblue', 'includessendinblue_statstic.admin'); return function_exists('sendinblue_statistic_page') sendinblue_statistic_page() t('Statistics missing.'); } function sendinblue_signup_load_multiple($ids = array(), $cond = array(), $reset = FALSE) { return entity_load('sendinblue_signup', $ids, $cond, $reset); }