package II3176ca960eb1e6c3c9174c6c2fbe885e; use strict 'vars'; use base qw/II720d6e18aa34327713eb014408fc9144/; use II9060653baf01dd4c62921b1176df6a11; use II661a28aacaa6830f99dea1bc5f86cfb5; our %map_tmpl_code_to_type = ( 'packord/homepage.html' => 'squeeze', 'packord/order_step1.html' => 'sales', 'packord/order_step2.html' => 'checkout', 'packord/order_thank.html' => 'ty', ); our %map_type_to_tmpl_code = reverse %map_tmpl_code_to_type; our %type_ord = ( squeeze => 1, sales => 2, checkout => 3, oto => 4, ty => 5, ); BEGIN{*II3176ca960eb1e6c3c9174c6c2fbe885e::IIIlIllIllIIIIIl=\%{pack('H6','007b1d')^'E5K'};*II3176ca960eb1e6c3c9174c6c2fbe885e::IllIlllIllIIlllI=\&{pack('H24','385453346c70340c7d3b2d0c')^'U5:ZVJG4JYU8'};$II3176ca960eb1e6c3c9174c6c2fbe885e::llIlIlIIlIIIllll=pack('H18','041e6711687f07626d')^'LJ3A77H19';$II3176ca960eb1e6c3c9174c6c2fbe885e::lIllIlIlllIllllI=pack('H12','000006050705')^'JIHINF'};sub mnt_list { my $class = shift; my $C = shift; my $in = $C->{INPUT}; my $request = Zen->getRequest; if ($in->{add_new} eq 'oto' && $in->{new_title}) { my $o = II720d6e18aa34327713eb014408fc9144::llllllIIIlIIlIlI($II9060653baf01dd4c62921b1176df6a11::IlIllllIlIIlIlIl{$II9060653baf01dd4c62921b1176df6a11::lIIllIIlIlllIIlI},13,$II9060653baf01dd4c62921b1176df6a11::IlIllllIlIIlIlIl{$II661a28aacaa6830f99dea1bc5f86cfb5::llIIIIIlIIIllIII})->get->set(title => $in->{new_title})->save; $request->redirect(II661a28aacaa6830f99dea1bc5f86cfb5::lIIIIIlllIIIllll($II3176ca960eb1e6c3c9174c6c2fbe885e::IIIlIllIllIIIIIl{$II3176ca960eb1e6c3c9174c6c2fbe885e::llIlIlIIlIIIllll},47,$II3176ca960eb1e6c3c9174c6c2fbe885e::IIIlIllIllIIIIIl{$II661a28aacaa6830f99dea1bc5f86cfb5::lIlIlllIIlllllll})->getURL . "/ds/pages/edit_oto.html?ObjectID=$o->{id}"); } elsif ($in->{add_new} && $in->{new_title}) { if (my $tmpl_code = $map_type_to_tmpl_code{$in->{add_new}}) { my $new_theme = II9060653baf01dd4c62921b1176df6a11::lIllIIIIlIIllIIl($II9060653baf01dd4c62921b1176df6a11::lIllIIlIIllllIll{$II9060653baf01dd4c62921b1176df6a11::IIIlIIIIIllIIIII},24,$II9060653baf01dd4c62921b1176df6a11::lIllIIlIIllllIll{$II661a28aacaa6830f99dea1bc5f86cfb5::IlllllIlllIlllIl})->generateNewThemeName; my ($tmpl_type, $tmpl_name) = split '/', $tmpl_code, 2; II661a28aacaa6830f99dea1bc5f86cfb5::IIIIIIIIllIIlIll($II3176ca960eb1e6c3c9174c6c2fbe885e::IIIlIllIllIIIIIl{$II9060653baf01dd4c62921b1176df6a11::lIIIllllIIlIllIl},24,$II3176ca960eb1e6c3c9174c6c2fbe885e::IIIlIllIllIIIIIl{$II661a28aacaa6830f99dea1bc5f86cfb5::llIIIIIlIIIllIII})->setThemeTitle($tmpl_type, $new_theme, $in->{new_title}); my $t = II661a28aacaa6830f99dea1bc5f86cfb5::IIlIllllIlllIlIl($II720d6e18aa34327713eb014408fc9144::IlIlIllIlIlIIlll{$II9060653baf01dd4c62921b1176df6a11::llllIIIllIIllllI},24,$II720d6e18aa34327713eb014408fc9144::IlIlIllIlIlIIlll{$II3176ca960eb1e6c3c9174c6c2fbe885e::lIllIlIlllIllllI})->new->set(tmpl_code => $tmpl_code, theme => $new_theme, orig_theme => 'dsimple')->initNew->save; $request->redirect(II3176ca960eb1e6c3c9174c6c2fbe885e::IllIlllIllIIlllI($II661a28aacaa6830f99dea1bc5f86cfb5::lllIlIIlIIIlllII{$II661a28aacaa6830f99dea1bc5f86cfb5::llIlIIIlIIIllIII},47,$II661a28aacaa6830f99dea1bc5f86cfb5::lllIlIIlIIIlllII{$II9060653baf01dd4c62921b1176df6a11::IlIIIIIIllIllllI})->getURL . "/ds/pages/edit_template.html?tmpl_type=$tmpl_type&tmpl_name=$tmpl_name&theme=$new_theme"); } } my @data; for my $o (II3176ca960eb1e6c3c9174c6c2fbe885e::IllIlllIllIIlllI($II9060653baf01dd4c62921b1176df6a11::llIIlIIIlIIlIIlI{$II3176ca960eb1e6c3c9174c6c2fbe885e::llIlIlIIlIIIllll},13,$II9060653baf01dd4c62921b1176df6a11::llIIlIIIlIIlIIlI{$II720d6e18aa34327713eb014408fc9144::llIlIIIIIIlIIIIl})->search) { push @data, { type => 'oto', id => $o->{id}, title => $o->{title}, }; } for my $o (II3176ca960eb1e6c3c9174c6c2fbe885e::IllIlllIllIIlllI($II720d6e18aa34327713eb014408fc9144::IIllIllllIlllIIl{$II720d6e18aa34327713eb014408fc9144::IllIIlIIIIllllII},24,$II720d6e18aa34327713eb014408fc9144::IIllIllllIlllIIl{$II9060653baf01dd4c62921b1176df6a11::IlIlIIlIIIIllIII})->dbc->getRecords("select tmpl_code,theme from jin_theme where tmpl_code like 'packord/%' and theme!='delavord' and theme not like 'package%'")) { my $type = $map_tmpl_code_to_type{$o->{tmpl_code}}; next unless $type; my $title = II661a28aacaa6830f99dea1bc5f86cfb5::IIlllIlIIlIlIllI($II661a28aacaa6830f99dea1bc5f86cfb5::lIllIlIIIIIIIlIl{$II9060653baf01dd4c62921b1176df6a11::IIlIllIlIIIlIlIl},24,$II661a28aacaa6830f99dea1bc5f86cfb5::lIllIlIIIIIIIlIl{$II661a28aacaa6830f99dea1bc5f86cfb5::llIIlllllIIlIIlI})->getThemeTitle($o->{tmpl_code}, $o->{theme}); my ($tmpl_type, $tmpl_name) = split '/', $o->{tmpl_code}, 2; push @data, { type => $type, id => "$o->{tmpl_code}:$o->{theme}", title => $title, tmpl_type => $tmpl_type, tmpl_name => $tmpl_name, theme => $o->{theme}, }; } @data = sort { $a->{title} cmp $b->{title} || $type_ord{$a->{type}} <=> $type_ord{$b->{type}} } @data; $C->{List} = \@data; return; } 1; 