function IIRS_0_print_HTML_href($string) { IIRS_0_print(IIRS_0_escape_for_HTML_href($string)); }
$TI = IIRS_0_details_TI_user(); } if (!isset($list_mode)) { $list_mode = false; } $full_mode = !$list_mode; if (!$TI || !is_array($TI)) { $IIRS_error = new IIRS_Error(IIRS_USER_NO_ASSOCIATED_TI, 'There is no Initiative associated with this user', 'TI not linked to this user', IIRS_MESSAGE_USER_ERROR, IIRS_MESSAGE_NO_USER_ACTION); IIRS_0_debug_print($IIRS_error); } // ------------------------------------------------------- field pre-formatting $website = NULL; if (!isset($TI['domain']) || empty($TI['domain'])) { $website = IIRS_0_translation('currently no website'); } else { $website = '<a target="_blank" href="http://' . IIRS_0_escape_for_HTML_href($TI['domain']) . '">' . IIRS_0_translation('website') . '</a>'; } $maps_href = "https://www.google.com/maps/@{$TI['location_latitude']},{$TI['location_longitude']},16z"; ?> </pre></div> <div id="IIRS_0"> <?php if ($IIRS_error) { // IIRS_0_set_translated_error_message( ... ) uses IIRS_0_set_message( ... ) IIRS_0_set_translated_error_message($IIRS_error); } else { ?> <div> <!-- the framework always prints the title --> <?php
if (true) { IIRS_0_debug_print('testing nice_domains...'); foreach ($nice_domains as $nice_domain) { foreach ($all_TLDs as $tld) { $full_domain = strtolower("{$nice_domain}.{$tld}"); IIRS_0_debug_print("testing [{$full_domain}]"); $ip_address = gethostbyname($full_domain); // gethostbyname PHP 4,5 $valid_dns = $ip_address != $full_domain; if ($valid_dns) { IIRS_0_debug_print(" valid [{$ip_address}]"); $domains_found = true; $selected = $option == 1 ? 'checked="1"' : ''; $selected_class = $option == 1 ? 'selected' : ''; // SECURITY: $full_domain is constructed from user input $full_domain_escaped = IIRS_0_escape_for_HTML_href($full_domain); $view_in_new_window = IIRS_0_translation('view in new window'); $nice_domains_html .= <<<HTML <li class="{$selected_class}"> <input {$selected} name="domain" class="IIRS_0_radio" value="{$full_domain}" type="radio" id="IIRS_0_domain_{$option}_input" /> <label for="IIRS_0_domain_{$option}_input"> {$full_domain} <div class="IIRS_0_status"><a target="_blank" href="http://{$full_domain}">{$view_in_new_window}</a></div> </label> </li> HTML; $option++; } else { IIRS_0_debug_print(" invalid"); } }