} if ($found_it == true) { array_push($temp_lines, $line); } } return $temp_lines; } save_log($ldap, $code_v0, $code_v1, $code_v2); $lines1 = get_diff_summary($ldap, $passwd, $code_v0, $code_v1, $code_v1_raw); $lines2 = get_diff_summary($ldap, $passwd, $code_v0, $code_v2, $code_v2_raw); if ($simple_view == "1") { simple_output($lines1, $lines2); } else { if ($same_update_view == "1") { $file_list = array(); foreach (array_keys($lines1) as $file) { if (array_key_exists($file, $lines2)) { array_push($file_list, $file); } } $lines = get_diff_lines($ldap, $passwd, $code_v0, $code_v1); $temp_lines = get_care_lines($lines, $file_list); $diffObjList = get_diff($temp_lines); $lines2 = get_diff_lines($ldap, $passwd, $code_v0, $code_v2); $temp_lines2 = get_care_lines($lines2, $file_list); $diffObjList2 = get_diff($temp_lines2); output_html_result($diffObjList, "1"); echo ""; output_html_result($diffObjList2, "2"); } }
$old_class = ""; array_push($diff_content_lines, "<tr class='headline'><th class='index'>{$c1_idx}</th><td><pre><span>{$c1_line}</span></pre></td><th class='index'>{$c2_idx}</th><td><pre><span>{$c2_line}</span></pre></td></tr>"); } else { array_push($diff_content_lines, "<tr><th class='index'>{$c1_idx}</th><td><pre><span>{$c1_line}</span></pre></td><th class='index'>{$c2_idx}</th><td><pre><span>{$c2_line}</span></pre></td></tr>"); } } } } } array_push($diff_content_lines, "</table>\n<br>"); $index++; } $url_html_str = implode("\n", $url_html_lines); $diff_content_str = implode("\n", $diff_content_lines); echo "<div id='filelist' class='content'>\n"; echo $url_html_str . "\n"; echo "</div>\n"; echo "<br>\n"; echo "<div id='diff_content'>\n"; echo $diff_content_str . "\n"; echo "</div>\n"; echo "<br>\n"; echo "<div id='filelist2' class='content'>\n"; echo $url_html_str . "\n"; echo "</div>\n"; echo "<br>\n"; } $lines = get_diff_lines($ldap, $passwd, $url, $version1, $version2); $diffObjList = get_diff($lines); output_html_result($diffObjList);