getPublicDictionaryDetails($dict); if ($dictionary_data !== false) { $dictionary_data['words'] = $dictionary->getPublicDictionaryWords($dict); $html = str_replace('{{dict}}', $dict, $html); $html = str_replace('{{dict_name}}', $dictionary_data['name'] . ' ' . $dictionary_data['specification'], $html); $html = str_replace('{{public_name}}', $dictionary_data['createdBy'], $html); $dictionary_json = json_encode($dictionary_data); $html = str_replace('{{dict_json}}', addslashes($dictionary_json), $html); } else { $html = str_replace('{{dict}}', 'error', $html); $html = str_replace('{{dict_name}}', 'Error: Dictionary Not Found', $html); $html = str_replace('{{public_name}}', 'Error', $html); $html = str_replace('{{dict_json}}', '{"name": "Error:", "specification": "Dictionary Not Found", "words": []}', $html); } echo $html; } break; } }