function WriteLI($Character, $Start, $Active) { if ($Active) { echo '<li class="active"><a href="?start=' . $Start . AddGetVar('C') . '">' . $Character . '</a></li>' . PHP_EOL; } else { echo '<li><a href="?start=' . $Start . AddGetVar('C') . '">' . $Character . '</a></li>' . PHP_EOL; } return null; }
function WriteTH($Sort, $Dir, $Str) { global $StartPoint; echo '<th><a href="?start=' . $StartPoint . AddGetVar('C') . '&sort=' . $Sort . '&dir=' . $Dir . AddGetVar('V') . AddGetVar('E') . AddGetVar('DR') . '">' . $Str . '</a></th>'; return null; }
function DisplayCustomList($View) { global $List, $SearchStr; echo '<div class="sys-group"><div class="sys-title">' . PHP_EOL; echo '<h5>' . ucfirst($View) . ' List</h5>' . PHP_EOL; echo '</div>' . PHP_EOL; echo '<div class="sys-items">' . PHP_EOL; echo '<div class="centered">' . PHP_EOL; echo '<form action="?" method="get">'; echo '<input type="hidden" name="v" value="' . $View . '">'; if ($SearchStr == '') { echo '<input type="text" name="s" id="search" placeholder="Search">' . PHP_EOL; } else { echo '<input type="text" name="s" id="search" value="' . $SearchStr . '">' . PHP_EOL; } echo '</form>' . PHP_EOL; echo '</div></div></div>' . PHP_EOL; echo '<div class="sys-group">'; echo '<div class="row"><br />' . PHP_EOL; echo '<table id="block-table">' . PHP_EOL; $i = 1; if ($SearchStr == '') { foreach ($List as $Site) { if ($Site[2] == true) { echo '<tr><td>' . $i . '</td><td>' . $Site[0] . '</td><td>' . $Site[1] . '<td><input type="checkbox" name="r' . $i . '" onclick="ChangeSite(this)" checked="checked"><button class="button-small" onclick="DeleteSite(' . $i . ')"><span><img src="./images/icon_trash.png" class="btn" alt="-"></span></button></td></tr>' . PHP_EOL; } else { echo '<tr class="dark"><td>' . $i . '</td><td>' . $Site[0] . '</td><td>' . $Site[1] . '<td><input type="checkbox" name="r' . $i . '" onclick="ChangeSite(this)"><button class="button-small" onclick="DeleteSite(' . $i . ')"><span><img src="./images/icon_trash.png" class="btn" alt="-"></span></button></td></tr>' . PHP_EOL; } $i++; } } else { foreach ($List as $Site) { if (strpos($Site[0], $SearchStr) !== false) { if ($Site[2] == true) { echo '<tr><td>' . $i . '</td><td>' . $Site[0] . '</td><td>' . $Site[1] . '<td><input type="checkbox" name="r' . $i . '" onclick="ChangeSite(this)" checked="checked"><button class="button-small" onclick="DeleteSite(' . $i . ')"><span><img src="./images/icon_trash.png" class="btn" alt="-"></span></button></td></tr>' . PHP_EOL; } else { echo '<tr class="dark"><td>' . $i . '</td><td>' . $Site[0] . '</td><td>' . $Site[1] . '<td><input type="checkbox" name="r' . $i . '" onclick="ChangeSite(this)"><button class="button-small" onclick="DeleteSite(' . $i . ')"><span><img src="./images/icon_trash.png" class="btn" alt="-"></span></button></td></tr>' . PHP_EOL; } } $i++; } } echo '<tr><td>' . $i . '</td><td><input type="text" name="site' . $i . '" placeholder="site.com"></td><td><input type="text" name="comment' . $i . '" placeholder="comment"></td><td><button class="button-small" onclick="AddSite(' . $i . ')"><span><img src="./images/green_tick.png" class="btn" alt=""></span>Save</button></td></tr>'; echo '</table></div></div>' . PHP_EOL; echo '<div class="sys-group"><div class="centered">' . PHP_EOL; echo '<a href="./include/downloadlist.php?v=' . $View . '" class="button-grey">Download List</a> '; echo '<a href="?v=' . $View . AddGetVar('S') . '&action=' . $View . '&do=update" class="button-blue">Update Blocklists</a>'; echo '</div></div>' . PHP_EOL; }