Example #1
0
function fncdelete()
{
    global $_CONF;
    global $_TABLES;
    global $LANG_DATABOX_ADMIN;
    $id = COM_applyFilter($_POST['id'], true);
    $username = DB_getItem($_TABLES['users'], "username", "uid={$id}");
    $email = DB_getItem($_TABLES['users'], "email", "uid={$id}");
    // CHECK
    $err = "";
    if ($err != "") {
        $retval['title'] = $LANG_DATABOX_ADMIN['err'];
        $retval['display'] = $err;
        return $retval;
    }
    //    if (!USER_deleteAccount ($id)) {
    //        $return_page=$_CONF['site_admin_url'] . '/plugins/'.THIS_SCRIPT.'?msg=3';
    //    }else{
    //        $return_page=$_CONF['site_admin_url'] . '/plugins/'.THIS_SCRIPT.'?msg=2';
    //    }
    if (!USER_deleteAccount($id)) {
        $msg = 3;
    } else {
        $msg = 2;
    }
    $rt = fncsendmail('data_delete', $id, $username, $email);
    $cacheInstance = 'userbox__' . $id . '__';
    CACHE_remove_instance($cacheInstance);
    //exit;// debug 用
    //return COM_refresh ($return_page);
    $retval['title'] = $LANG_USERBOX_ADMIN['piname'];
    $retval['display'] = COM_showMessage($msg, 'userbox');
    $retval['display'] .= fncList();
    return $retval;
}
Example #2
0
            break;
            //各項目
        //各項目
        default:
            $retval = $fieldvalue;
            break;
    }
    return $retval;
}
// +---------------------------------------------------------------------------+
// | MAIN                                                                      |
// +---------------------------------------------------------------------------+
//############################
$pi_name = 'userbox';
//############################
// 引数
//?order=0&prevorder=created&direction=ASC&q=ja&query_limit=50
$msg = '';
if (isset($_REQUEST['msg'])) {
    $msg = COM_applyFilter($_REQUEST['msg'], true);
}
$display = '';
$information = array();
$information['pagetitle'] = $LANG_USERBOX['profile'];
$layout = $_USERBOX_CONF['layout'];
if (isset($msg)) {
    $display .= COM_showMessage($msg, $pi_name);
}
$display .= fncList();
$display = DATABOX_displaypage($pi_name, $layout, $display, $information);
COM_output($display);
Example #3
0
function fncdelete()
{
    global $_CONF, $_TABLES;
    global $LANG_DATABOX_ADMIN;
    $pi_name = "databox";
    $id = COM_applyFilter($_POST['id'], true);
    $addition_def = DATABOX_getadditiondef();
    //@@@@@
    $additionfields = $_POST['afield'];
    //@@@@@
    // CHECK
    $err = "";
    if ($err != "") {
        $retval['title'] = $LANG_DATABOX_ADMIN['piname'] . $LANG_DATABOX_ADMIN['edit'];
        $retval['display'] = fncEdit($id, $edt_flg, 3, $err);
        return $retval;
    }
    $rt = databox_deletedata($id);
    $rt = fncsendmail('data_delete', $id, $title);
    $cacheInstance = 'databox__' . $id . '__';
    CACHE_remove_instance($cacheInstance);
    //exit;// @@@@@debug 用
    //$return_page=$_CONF['site_admin_url'] . '/plugins/'.THIS_SCRIPT.'?msg=2';
    //return COM_refresh ($return_page);
    //echo $return_page;
    $retval['title'] = $LANG_DATABOX_ADMIN['piname'];
    $retval['display'] = COM_showMessage(2, 'databox');
    $retval['display'] .= fncList();
    return $retval;
}
Example #4
0
        break;
    case 'copy':
        //コピー
        if ($_DATABOX_CONF['allow_data_insert'] or SEC_hasRights('databox.submit')) {
        } else {
            $id = "";
            $display .= $rt;
        }
    case 'edit':
        // 編集
        if ($id != "") {
            $information['pagetitle'] = $LANG_DATABOX_ADMIN['piname'] . $LANG_DATABOX_ADMIN['edit'];
            $rt = databox_chk_loaddata($id);
            if ($rt === "OK") {
                $display .= fncEdit($id, $edt_flg, $msg, "", $mode, $fieldset_id, $template);
            } else {
                $display .= $rt;
            }
        }
        break;
    default:
        // 初期表示、一覧表示
        $information['pagetitle'] = $LANG_DATABOX_ADMIN['piname'];
        if (isset($msg)) {
            $display .= COM_showMessage($msg, 'databox');
        }
        $display .= fncList($template);
}
$display = COM_startBlock("", '', COM_getBlockTemplate('_admin_block', 'header')) . $display . COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
$display = DATABOX_displaypage($pi_name, '_admin', $display, $information);
COM_output($display);
Example #5
0
            break;
            //各項目
        //各項目
        default:
            $retval = $fieldvalue;
            break;
    }
    return $retval;
}
// +---------------------------------------------------------------------------+
// | MAIN                                                                      |
// +---------------------------------------------------------------------------+
//############################
$pi_name = 'databox';
//############################
// 引数
//order=2&prevorder=orderno&direction=ASC&databoxlistpage=2&q=hotel&query_limit=50
$msg = '';
if (isset($_REQUEST['msg'])) {
    $msg = COM_applyFilter($_REQUEST['msg'], true);
}
$display = '';
$information = array();
$information['pagetitle'] = $LANG_DATABOX['data'];
$layout = $_DATABOX_CONF['layout'];
if (isset($msg)) {
    $display .= COM_showMessage($msg, $pi_name);
}
$display .= fncList($languageid);
$display = DATABOX_displaypage($pi_name, $layout, $display, $information);
COM_output($display);