public static function add_test_subscribers($post) { if (isset($post['count'])) { $count = $post['count']; for ($c = 0; $c < $count; $c++) { EZP_CS_Query_Utility::add_new_subscriber("person-{$c}", "{$c}@gmail.com"); } } else { EZP_CS_Utility::debug('Count parameter not set for add_test_subscribers!'); } }
<?php $global = EZP_CS_Global_Entity::get_instance(); $set_index = $global->active_set_index; $set = EZP_CS_Set_Entity::get_by_id($set_index); $display = EZP_CS_Display_Entity::get_by_id($set->display_index); $content = EZP_CS_Content_Entity::get_by_id($set->content_index); $config = EZP_CS_Config_Entity::get_by_id($global->config_index); $error_display = 'none'; $error_text = ''; $js_thank_you = "var thankYouDisplayed=false;"; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $subscriber = new EZP_CS_Subscriber_Entity(); $error_text = EZP_CS_Query_Utility::add_new_subscriber($_POST['ezp_cs_name'], $_POST['ezp_cs_email']); if ($error_text == null) { $js_thank_you = "var thankYouDisplayed=true;"; $initial_section_display = 'none'; $thank_you_section_display = 'block'; } else { $error_display = 'block'; $initial_section_display = 'block'; $thank_you_section_display = 'none'; } } else { $initial_section_display = 'block'; $thank_you_section_display = 'none'; } ?> <!DOCTYPE html> <html> <head>