예제 #1
0
파일: mylists.php 프로젝트: 4Vs/oc-server3
if (isset($_REQUEST['delete'])) {
    sql("DELETE FROM `cache_lists` WHERE `user_id`='&1' AND `id`='&2'", $login->userid, $_REQUEST['delete'] + 0);
    // All dependent deletion and cleanup is done via trigger.
}
// redirect to list search output after editing a list from the search output page
if ($fromsearch && !$switchDescMode && !$name_error && isset($_REQUEST['listid'])) {
    $tpl->redirect('cachelist.php?id=' . ($_REQUEST['listid'] + 0));
}
// prepare editor and editing
if ($descMode == 3) {
    $tpl->add_header_javascript('resource2/tinymce/tiny_mce_gzip.js');
    $tpl->add_header_javascript('resource2/tinymce/config/list.js.php?lang=' . strtolower($opt['template']['locale']));
}
if ($edit_list) {
    $tpl->assign('edit_list', true);
    $tpl->assign('listid', $list->getId());
    $tpl->assign('caches', $list->getCaches());
}
// prepare rest of template
$tpl->assign('cachelists', cachelist::getMyLists());
$tpl->assign('show_status', true);
$tpl->assign('show_user', false);
$tpl->assign('show_watchers', true);
$tpl->assign('show_edit', true);
$tpl->assign('togglewatch', false);
$tpl->assign('fromsearch', $fromsearch);
$tpl->assign('name_error', $name_error);
$tpl->assign('list_name', $list_name);
$tpl->assign('list_visibility', $list_visibility);
$tpl->assign('watch', $watch);
$tpl->assign('desctext', $desctext);