{'head'}; my $body = \$_[1]->{'body'}; my $u = LJ::User->remote; LJ::need_res('stc/lj_base-app.css', 'stc/imgupload.css', 'stc/display_none.css', 'js/photobucket_jw.js'); if ($GET{upload_count} || LJ::did_post()) { my $js = ""; if (my $ct = $GET{upload_count}) { for my $pn (1..$ct) { my $swidth = int($GET{"sw_$pn"}); my $sheight = int($GET{"sh_$pn"}); my $esurl = LJ::ejs($GET{"su_$pn"}); my $eppurl = LJ::ejs($GET{"pp_$pn"}); $js .= "InOb.onUpload(\"$esurl\", \"$eppurl\", $swidth, $sheight);\n"; } # From URL } else { my $img = LJ::ejs($POST{'url'}); $js = "InOb.onInsURL(\"$img\")\n"; } my $ret = qq{ }; return $ret; } my $step = 1; my $fbenabled = LJ::get_cap($u, 'fb_account') && LJ::get_cap($u, 'fb_can_upload'); my $ret = ''; $$head .= qq{ }; $ret .= "
"; $ret .= "
"; $ret .= "
"; $ret .= ""; $ret .= ""; # content $ret .= "
"; $ret .= "

"; $ret .= "
"; $ret .= "
"; # from URL $ret .= "

\n"; $ret .= LJ::html_check({ 'type' => 'radio', 'name' => 'method', 'id' => 'fromurl', 'class' => 'check', 'value' => 'url', 'selected' => 1, }); $ret .= ""; $ret .= ""; $ret .= LJ::html_text({ 'name' => 'url', 'id' => 'fromurlentry', 'size' => '50', }); $ret .= ""; $ret .= "

"; $ret .= "

Example: http://www.example.com/some-picture.jpg

"; # from file $ret .= "

"; $ret .= LJ::html_check({ 'type' => 'radio', 'name' => 'method', 'id' => 'fromfile', 'class' => 'check', 'value' => 'file', 'disabled' => $fbenabled ? 0 : 1, }); $ret .= " "; $ret .= LJ::html_hidden('redir_to_auth_base', '1', 'sec1', '255'); my $disabled = $fbenabled ? '' : "disabled='1'"; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= "

"; if ($u) { my $msg = LJ::run_hook('update_insobj_fb', $fbenabled) || "Upload a file from your computer"; $ret .= "

$msg

"; } else { $ret .= ""; } # from Fotobilder if ($fbenabled) { $ret .= "

"; $ret .= LJ::html_check({ 'type' => 'radio', 'name' => 'method', 'id' => 'fromfb', 'class' => 'check', 'value' => 'fb', }); $ret .= " "; $ret .= "

"; } if ($u) { $ret .= "

$ML{'.size'}

\n"; } $ret .= "
"; $ret .= "
"; $ret .= ""; $ret .= LJ::html_submit('btn:next', 'Insert', { 'id' => 'btnNext' }) . "\n"; $ret .= "
\n"; $ret .= "
"; $ret .= "
\n"; $$body = $ret; $$head .= "\n"; $$head .= LJ::res_includes(); return; } _code?> Insert Image {'head'}; _code?> {'body'}; _code?>