"; return; } my $op = $FORM{'op'}; my $t = $FORM{'t'}; my ($bname, $loc, $pos) = split(/-/, $t); $pos += 0; my $portopts = LJ::Portal::load_portopts($remote); if ($op eq "x") { LJ::Portal::delete_box($portopts, $loc, $pos, $bname); LJ::Portal::save_portopts($remote, $portopts); if ($loc eq "moz") { return BML::redirect("$LJ::SITEROOT/portal/moz.bml"); } else { return BML::redirect("$LJ::SITEROOT$LJ::PORTAL_URI"); } } if ($op eq "u" || $op eq "d") { LJ::Portal::move_box($portopts, $loc, $pos, $bname, $op); LJ::Portal::save_portopts($remote, $portopts); if ($loc eq "moz") { return BML::redirect("$LJ::SITEROOT/portal/moz.bml"); } else { return BML::redirect("$LJ::SITEROOT$LJ::PORTAL_URI"); } } if ($op eq "a") { $title = "Customize Homepage"; $body .= ""; $body .= ""; $body .= ""; $body .= "\n"; { my $modform = LJ::Portal::make_box_modify_form($portopts, $loc, $pos); if ($modform) { $body .= $modform; } else { $body .= "No options for this box."; } } $body .= " p?>"; $body .= ""; foreach my $loc (@LJ::PORTAL_COLS) { $body .= "
"; $body .= LJ::html_hidden("op", "addnew", "loc", $loc); $body .= "

$LJ::Portal::colname{$loc}
"; $body .= LJ::html_select({ 'name' => "bname", 'noescape' => 1, }, "", "(Pick Box Type)", LJ::Portal::get_box_types($loc)); $body .= "

"; } $body .= " p?>"; return; } if ($op eq "addnew") { my $bname = $FORM{'bname'}; my $loc = $FORM{'loc'}; my $pos = LJ::Portal::create_new_box($portopts, $bname, $loc); LJ::Portal::save_portopts($remote, $portopts); my $modform = LJ::Portal::make_box_modify_form($portopts, $loc, $pos); if ($modform) { $title = "Configure Box"; $body .= $modform; return; } else { if ($loc eq "moz") { $op = "mozadd"; } else { return BML::redirect("$LJ::SITEROOT$LJ::PORTAL_URI"); } } } if ($op eq "modbox") { my $newargs = LJ::Portal::modify_box($remote, $portopts, $FORM{'loc'}, $FORM{'pos'}, \%FORM); if ($FORM{'loc'} eq "moz") { $op = "mozadd"; } else { return BML::redirect("$LJ::SITEROOT$LJ::PORTAL_URI"); } } ## add sidebar to mozilla if ($op eq "mozadd") { $title = "Add Mozilla Sidebar"; $body = "If you're running Mozilla or Netscape >= 6.0 you can click the link below to add this LJ portal box to your Mozilla sidebar. If you're using Internet Explorer, sorry.

"; $body .= "

"; $body .= "If you just added a new box to the sidebar or changed a setting and the $LJ::SITENAME sidebar is already open, hit the reload link in the sidebar."; return; } return; _code?> body=> page?> link: htdocs/portal/moz.bml, htdocs/portal/index.bml post: htdocs/portal/alter.bml _c?>