コード例 #1
0
ファイル: index.php プロジェクト: salomay/refreshin
        header("location: {$app['webmin']}/index.php?act=member");
    } else {
        include "dsp_login.php";
    }
    exit;
}
/*******************************************************************************
* login
* gambaran : validasi login
*******************************************************************************/
if ($act == "login") {
    $formix->init();
    $formix->serialize_form();
    $formix->validate('', 'p_uname,p_pwdx');
    if ($formix->is_error()) {
        $msgx->build_msg();
        header("location: index.php");
        exit;
    }
    if ($dbu->anti_sql_injection($_POST['p_uname']) and $dbu->anti_sql_injection($_POST['p_uname'])) {
        // lakukan proses login
        $passwordhash = md5(serialize($p_pwdx));
        $sql = "select *\n\t\t\t\tfrom " . $app['table']['pengguna'] . "\n\t\t\t\twhere username = '******'\n\t\t\t\t\t  and password = '******' and status = 'aktif'\n\t\t\t\tlimit 1";
        $dbu->query($sql, $rs['login'], $nr['login']);
        //echo $nr['login'];exit;
        if ($nr['login']) {
            $formix->reset();
            // $_SESSION['inline_edit'] = "on";
            $_SESSION['adminsession'] = $appx->serialize64($dbu->fetch($rs['login']));
            header("location: " . $app['webmin'] . "/index.php?act=home");
            exit;
コード例 #2
0
ファイル: index.php プロジェクト: salomay/refreshin
if ($act == "update") {
    $admlib->validate('sett_edit,sett_add');
    $formix->init();
    if ($step == "1") {
        $admlib->set_aktip("sett_configbhs");
        $config = $dbu->get_record("konfig", "id", 1);
        $form = $config;
        $formix->populate($form);
        include "tmp_config.php";
        exit;
    }
    if ($step == "2") {
        $formix->serialize_form();
        $formix->validate('', 'p_judul,p_judul_cms,p_domain');
        if ($formix->is_error()) {
            $msgx->build_msg();
            header("location: index.php?act=update&error=1&referer=" . $urlx->get_referer());
            exit;
        }
        $data = $dbu->get_record("konfig", "id", 1);
        $id = rand(1, 999) . date("dmYHis");
        $imgx = new SimpleImage();
        if ($p_logo_cms_size > 0) {
            @unlink($app['data_path'] . "/konfig/logo/{$data['logo_cms']}");
            $data['logo_cms'] = "";
            try {
                $src_img = $_FILES["p_logo_cms"]['tmp_name'];
                ## THUMB ###############
                $imgx->load($src_img);
                $imgx->save($app['data_path'] . "/konfig/logo/logo_cms_" . $id . ".png");
                $data['logo_cms'] = "logo_cms_" . $id . ".png";