0) { $gate_error = 'Too many failed attempts. Please wait ' . ceil($gate_wait / 60) . ' minute(s).'; } elseif (!verify_captcha($_POST['captcha_answer'] ?? '')) { $gate_error = 'Incorrect math answer. Please try again.'; record_failed_attempt($list_id); $gate_wait = get_rate_limit_wait($list_id); } elseif (!check_rate_limit($list_id)) { $gate_error = 'Too many failed attempts. Please wait ' . ceil(get_rate_limit_wait($list_id) / 60) . ' minute(s).'; } elseif (!verify_list_password($list, $_POST['list_password'] ?? '')) { record_failed_attempt($list_id); $gate_wait = get_rate_limit_wait($list_id); $gate_error = $gate_wait > 0 ? 'Too many failed attempts. Locked for ' . ceil($gate_wait / 60) . ' minute(s).' : 'Incorrect password. ' . (RATE_LIMIT_MAX - (RATE_LIMIT_MAX - (int)ceil(get_rate_limit_wait($list_id)/RATE_LIMIT_WINDOW))) . ' attempt(s) remaining before lockout.'; } else { // Correct password grant_list_access($list_id); reset_rate_limit($list_id); redirect(list_url($owner, $list_id)); } } $captcha_q = set_captcha(); $page_title = $list['title'] . ' — Restricted'; require_once 'includes/header.php'; ?>
🔒 Password Required —
0): ?>
Access locked. Try again in minute(s).

This public list is password protected. Enter the list password to view it.

Cancel
$task_id])); } edit_task($owner, $list_id, $task_id, $text, $pri, $order_val, $due_val, $clear_due); break; case 'move_to_list': $to_list_id = preg_replace('/[^a-f0-9]/', '', $_POST['to_list_id'] ?? ''); if ($to_list_id && move_task_to_list($owner, $list_id, $task_id, $to_list_id)) { $to = get_list($owner, $to_list_id); flash('success', 'Task moved to "' . ($to['title'] ?? 'list') . '".'); } else { flash('error', 'Could not move task.'); } break; case 'clear_completed': clear_completed($owner, $list_id); flash('success', 'Completed queue cleared.'); break; case 'generate_share_token': generate_share_token($owner, $list_id); flash('success', 'Share link generated.'); redirect(list_url($owner, $list_id, ['edit' => '1'])); case 'revoke_share_token': revoke_share_token($owner, $list_id); flash('success', 'Share link revoked.'); redirect(list_url($owner, $list_id, ['edit' => '1'])); case 'update_list': $title = trim($_POST['title'] ?? ''); $desc = trim($_POST['description'] ?? ''); $pub = isset($_POST['public']) && $_POST['public'] === '1'; if ($title === '') { flash('error', 'Title cannot be empty.'); redirect(list_url($owner, $list_id, ['edit' => '1'])); } update_list_meta($owner, $list_id, $title, $desc, $pub); // Handle list password $lp_action = $_POST['list_pw_action'] ?? ''; if ($lp_action === 'set') { $lp = $_POST['list_password_new'] ?? ''; if ($lp !== '') set_list_password($owner, $list_id, $lp); } elseif ($lp_action === 'remove') { set_list_password($owner, $list_id, ''); } flash('success', 'List settings saved.'); break; } redirect(list_url($owner, $list_id)); } /* ── Reload after any POST ────────────────────────────────────── */ $list = get_list($owner, $list_id); $edit_task_id = $_GET['edit_task'] ?? ''; $move_task_id = $_GET['move_task'] ?? ''; $show_settings = isset($_GET['edit']); // Other lists owned by this user (for the move-to selector) $other_lists = []; if ($can_edit && $move_task_id !== '') { foreach (get_lists_for_user($owner) as $l) { if ($l['id'] !== $list_id) { $other_lists[] = $l; } } } $page_title = $list['title']; $og_image_url = get_user_avatar_url($owner) ?: get_og_logo_url(); $full_height = !$show_settings; $body_class = 'app-shell'; require_once 'includes/header.php'; ?>
List Settings —
>
List Password (optional — protects public lists from casual viewing)
🔒 Password protection is active.
Cancel Print / Export
Private Share Link (allows guests to view this list without an account)
Share URL:

No share link active. Generate one to let guests view this list via a secret URL.

PUBLIC PRIVATE 👁 · unique Settings ⇓ Import 💾 CSV 💾 MD 🖶 Print
'Insert order', 'created_asc' => 'Oldest first', 'created_desc' => 'Newest first', 'priority' => 'By priority', 'alpha' => 'A-Z', 'order' => 'Custom #', 'due_asc' => 'Due: soonest', 'due_desc' => 'Due: latest', ]; $sort_labels_c = [ 'completed_desc' => 'Completed: newest', 'completed_asc' => 'Completed: oldest', 'created_asc' => 'Added: oldest', 'created_desc' => 'Added: newest', 'alpha' => 'A-Z', ]; ?>
■ Active Tasks task
Sort: $label): ?>
$task): ?>
Move:
No other lists.
#
·
0): ?>
✓ Completed Queue item
Sort: $label): ?>
No completed tasks yet.
Completed · Added