Remove old csv reading code.

This commit is contained in:
20xd6 2022-07-26 13:29:08 -04:00
parent b01c237d5d
commit 4958a76f9a

View File

@ -4,34 +4,6 @@
echo "<article><h1 id=\"page_title\">Posts by Tag</h1></article>"; echo "<article><h1 id=\"page_title\">Posts by Tag</h1></article>";
echo "<div id=\"search_inputs\"><input type=\"text\" id=\"tag_sort\" onkeyup=\"tag_search()\" placeholder=\"Search Tags...\" title=\"Type a tage to search\"><input id=\"search_toggle\" type=\"button\" value=\"Search Titles\" onclick=\"search_toggle()\"></div><!--End Div Search Inputs-->"; echo "<div id=\"search_inputs\"><input type=\"text\" id=\"tag_sort\" onkeyup=\"tag_search()\" placeholder=\"Search Tags...\" title=\"Type a tage to search\"><input id=\"search_toggle\" type=\"button\" value=\"Search Titles\" onclick=\"search_toggle()\"></div><!--End Div Search Inputs-->";
//if(file_exists("tags.csv")){
//echo "<ul id=\"tag_menu\">\n";
//$csv = array_map('str_getcsv', file("tags.csv"));
//array_walk($csv, function(&$a) use ($csv) {
//$a = array_combine($csv[0], $a);
//});
//array_shift($csv); # remove column header
//foreach ($csv as $row){
//$counter = 0;
//foreach ($row as $item){
//$counter++;
//if ($counter == 1){
//echo "\t<li id=\"" . $item . "\">" . $item . " <a id=\"" . $item . "\"></a>\n";
//} elseif ($counter % 2 == 0) {
//if ($item == ""){
//break;
//} else {
//echo "\t\t<ol><a href=\"" . $item . "\">";
//}
//} elseif ($counter % 2 != 0) {
//echo $item . "</a></ol>\n";
//}
//}
//echo "\t</li>\n";
//}
//echo "</ul>\n";
//}
function read_tags($tags_file){ function read_tags($tags_file){
$tags_csv = array_map('str_getcsv', file('tags.csv')); $tags_csv = array_map('str_getcsv', file('tags.csv'));
$tags_rows = sizeof($tags_csv); $tags_rows = sizeof($tags_csv);