Exemplo n.º 1
0
function LIB_delete($pi_name)
{
    global $_CONF;
    global $_TABLES;
    $lang_box_admin = "LANG_" . strtoupper($pi_name) . "_ADMIN";
    global ${$lang_box_admin};
    $lang_box_admin = ${$lang_box_admin};
    $table = $_TABLES[strtoupper($pi_name) . '_def_field'];
    $table2 = $_TABLES[strtoupper($pi_name) . '_addition'];
    $id = COM_applyFilter($_POST['id'], true);
    $type = COM_applyFilter($_POST['type']);
    //
    if ($type = 12) {
        $rt = DATABOX_deleteaddtionfiles_def($id, $pi_name);
        //外部ファイルの削除
    }
    DB_delete($table2, "field_id", $id);
    DB_delete($table, 'field_id', $id);
    return COM_refresh($_CONF['site_admin_url'] . '/plugins/' . THIS_SCRIPT . '?msg=2');
}
Exemplo n.º 2
0
function LIB_delete($pi_name)
{
    global $_CONF;
    global $_TABLES;
    $lang_box_admin = "LANG_" . strtoupper($pi_name) . "_ADMIN";
    global ${$lang_box_admin};
    $lang_box_admin = ${$lang_box_admin};
    $table = $_TABLES[strtoupper($pi_name) . '_def_field'];
    $table2 = $_TABLES[strtoupper($pi_name) . '_addition'];
    $id = COM_applyFilter($_POST['id'], true);
    $type = COM_applyFilter($_POST['type']);
    // CHECK
    $err = "";
    if ($err != "") {
        $page_title = $lang_box_admin['err'];
        $retval .= DATABOX_siteHeader($pi_name, '_admin', $page_title);
        $retval .= COM_startBlock($lang_box_admin['err'], '', COM_getBlockTemplate('_msg_block', 'header'));
        $retval .= $err;
        $retval .= COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
        $retval .= DATABOX_siteFooter($pi_name, '_admin');
        return $retval;
    }
    //
    if ($type = 12) {
        $rt = DATABOX_deleteaddtionfiles_def($id, $pi_name);
        //外部ファイルの削除
    }
    DB_delete($table2, "field_id", $id);
    DB_delete($table, 'field_id', $id);
    return COM_refresh($_CONF['site_admin_url'] . '/plugins/' . THIS_SCRIPT . '?msg=2');
}