Exemple #1
0
        if (strstr('[jpg]', $fileExt)) {
            $wh = getimagesize($tmpname);
            if ($wh[0] > 180 && $wh[1] > 180) {
                $photo = $id . '.' . $fileExt;
                $saveFile1 = $g['path_var'] . 'avatar/' . $photo;
                $saveFile2 = $g['path_var'] . 'avatar/180.' . $photo;
                if (is_file($saveFile1)) {
                    unlink($saveFile1);
                }
                if (is_file($saveFile2)) {
                    unlink($saveFile2);
                }
                include $g['path_core'] . 'function/thumb.func.php';
                move_uploaded_file($tmpname, $saveFile2);
                ResizeWidth($saveFile2, $saveFile2, 180);
                ResizeWidthHeight($saveFile2, $saveFile1, 50, 50);
                @chmod($saveFile1, 0707);
                @chmod($saveFile2, 0707);
            }
        }
    }
}
if ($uid) {
    $_M = getDbData($table['s_mbrdata'], 'memberuid=' . $uid, 'd_regis');
    $newPw = getCrypt($pw, $_M['d_regis']);
    getDbUpdate($table['s_mbrid'], "pw='" . $newPw . "'", 'uid=' . $uid);
    getDbUpdate($table['s_mbrdata'], "email='{$email}',name='{$name}',nic='{$nic}',photo='{$photo}',tel2='{$tel2}'", 'memberuid=' . $uid);
    if ($my['uid'] == $uid) {
        if ($pw != '') {
            $_SESSION['mbr_pw'] = $newPw;
            $newPw = getCrypt($pw, $_M['d_regis']);
Exemple #2
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
if (!$my['uid']) {
    getLink('', '', '정상적인 접근이 아닙니다.', '');
}
$tmpname = $_FILES['upfile']['tmp_name'];
$realname = $_FILES['upfile']['name'];
$fileExt = strtolower(getExt($realname));
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
$photo = $my['id'] . '.' . $fileExt;
$saveFile = $g['path_var'] . 'simbol/' . $photo;
if (is_uploaded_file($tmpname)) {
    if (!strstr('[gif][jpg][png]', $fileExt)) {
        getLink('', '', 'gif/jpg/png 파일만 등록할 수 있습니다.', '');
    }
    if (is_file($g['path_var'] . 'simbol/' . $my['photo'])) {
        unlink($g['path_var'] . 'simbol/' . $my['photo']);
    }
    include_once $g['path_core'] . 'function/thumb.func.php';
    move_uploaded_file($tmpname, $saveFile);
    ResizeWidthHeight($saveFile, $saveFile, 50, 50);
    @chmod($saveFile, 0707);
    getDbUpdate($table['s_mbrdata'], "photo='" . $photo . "'", 'memberuid=' . $my['uid']);
}
getLink('reload', 'parent.', '', '');
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
if ($moduleid) {
    $tmpname = $_FILES['upfile']['tmp_name'];
    $realname = $_FILES['upfile']['name'];
    $fileExt = strtolower(getExt($realname));
    $fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
    $photo = $my['id'] . '.' . $fileExt;
    $saveFile = $g['path_module'] . $moduleid . '/icon.gif';
    if (is_uploaded_file($tmpname)) {
        if (!strstr('[gif][jpg][png]', $fileExt)) {
            getLink('', '', 'gif/jpg/png 파일만 등록할 수 있습니다.', '');
        }
        if (is_file($saveFile)) {
            unlink($saveFile);
        }
        include_once $g['path_core'] . 'function/thumb.func.php';
        move_uploaded_file($tmpname, $saveFile);
        ResizeWidthHeight($saveFile, $saveFile, 60, 60);
        @chmod($saveFile, 0707);
    }
    getDbUpdate($table['s_module'], "name='" . trim($name) . "',hidden='{$hidden}',mobile='{$mobile}'", "id='" . $moduleid . "'");
}
getLink('reload', 'parent.', '', '');