Example #1
0
function getSendMail($to, $from, $subject, $content, $html)
{
    if ($html == 'TEXT') {
        $content = nl2br(htmlspecialchars($content));
    }
    $to_exp = explode('|', $to);
    $from_exp = explode('|', $from);
    $To = $to_exp[1] ? "\"" . getUTFtoKR($to_exp[1]) . "\" <{$to_exp['0']}>" : $to_exp[0];
    $Frm = $from_exp[1] ? "\"" . getUTFtoKR($from_exp[1]) . "\" <{$from_exp['0']}>" : $from_exp[0];
    $Header = "From:{$Frm}\nReply-To:{$frm}\nX-Mailer:PHP/" . phpversion();
    $Header .= "\nContent-Type:text/html;charset=EUC-KR\r\n";
    return @mail($To, getUTFtoKR($subject), getUTFtoKR($content), $Header);
}
Example #2
0
					<option value="">배경</option>
					<option value="1">흰색</option>
					<option value="2">검정</option>
					<option value="3">파랑</option>
					</select>
					<img src="<?php 
        echo $g['img_module_admin'];
        ?>
/btn_full.gif" alt="전체화면으로 편집" id="fullimg" class="resizeimg hand" onclick="editBoxcontrol(this);" />
				</td>
			</tr>
		</table>

		<div id="editbox" class="editdiv">
			<textarea id="editboxarea" name="content"><?php 
        echo @htmlspecialchars(implode('', file($pwd . getUTFtoKR($file))));
        ?>
</textarea>
		</div>


		</form>
		</div>

		<form name="srcForm" action="<?php 
        echo $g['s'];
        ?>
/" method="post" target="_action_frame_<?php 
        echo $m;
        ?>
">
Example #3
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
include_once $g['dir_module'] . 'var/var.php';
$R = getUidData($table['s_upload'], $uid);
if (!$R['uid']) {
    getLink('', '', '정상적인 요청이 아닙니다.', '');
}
$filename = getUTFtoKR($R['name']);
$filetmpname = getUTFtoKR($R['tmpname']);
if ($R['url'] == $d['upload']['ftp_urlpath']) {
    $filepath = $d['upload']['ftp_urlpath'] . $R['folder'] . '/' . $filetmpname;
    $filesize = $R['size'];
} else {
    $filepath = $g['path_file'] . $R['folder'] . '/' . $filetmpname;
    $filesize = filesize($filepath);
}
if (!strstr($_SERVER['HTTP_REFERER'], 'module=upload')) {
    //동기화
    $cyncArr = getArrayString($R['cync']);
    $fdexp = explode(',', $cyncArr['data'][2]);
    if ($fdexp[0] && $fdexp[1] && $cyncArr['data'][3]) {
        if ($cyncArr['data'][0] == 'bbs' && $cyncArr['data'][1]) {
            $AT = getUidData($table[$cyncArr['data'][0] . 'data'], $cyncArr['data'][1]);
            include_once $g['path_module'] . $cyncArr['data'][0] . '/var/var.' . $AT['bbsid'] . '.php';
            $B['var'] = $d['bbs'];
            if (!$my['admin'] && $my['uid'] != $AT['mbruid']) {
                if ($B['var']['perm_l_down'] > $my['level'] || strstr($B['var']['perm_g_down'], '[' . $my['sosok'] . ']')) {
                    getLink('', '', '다운로드 권한이 없습니다.', '-1');
Example #4
0
    $add9[$key] = getUTFtoKR($value);
}
foreach ($add10 as $key => $value) {
    $add10[$key] = getUTFtoKR($value);
}
foreach ($add11 as $key => $value) {
    $add11[$key] = getUTFtoKR($value);
}
foreach ($add13 as $key => $value) {
    $add13[$key] = getUTFtoKR($value);
}
foreach ($add14 as $key => $value) {
    $add14[$key] = getUTFtoKR($value);
}
foreach ($add30 as $key => $value) {
    $add30[$key] = getUTFtoKR($value);
}
/*
성인
*/
$adult_count = 0;
$children_count = 0;
$baby_count = 0;
$adult_a = 0;
$adult_r = 0;
$adult_f = 0;
$adult_e = 0;
$child_a = 0;
$child_r = 0;
$child_f = 0;
$child_e = 0;
Example #5
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
if ($folder) {
    $folder = $_POST['folder'];
    if (!trim($folder)) {
        getLink('', '', '정상적인 접속이 아닙니다.', '');
    }
}
if ($newfile) {
    $newfile = $_POST['newfile'];
    if (!trim($newfile)) {
        getLink('', '', '정상적인 접속이 아닙니다.', '');
    }
}
$folder = './' . str_replace('./', '', $folder);
$nFile = $folder . getUTFtoKR($newfile);
$fp = fopen($nFile, 'w');
fwrite($fp, trim(stripslashes($content)));
fclose($fp);
@chmod($nFile, 0707);
getLink('reload', 'parent.', $alert, $history);
Example #6
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
?>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<textarea id="codesrc"><?php 
echo htmlspecialchars(implode('', file($g['path_tmp'] . 'backup/' . str_replace('/', '_', str_replace('./', '', $folder) . getUTFtoKR($oldfile)) . '.bak')));
?>
</textarea>
<script type="text/javascript">
parent.document.getElementById('editboxarea').value = document.getElementById('codesrc').value;
alert('백업파일 소스를 새로 불러왔습니다.');
</script>

<?php 
exit;
Example #7
0
$m_rs = mysql_fetch_array($m_sql);
$radd5_url = $url[$m_rs[category]] . $resort5;
if (!empty($resort1)) {
    $smsText .= getUTFtoKR($radd1_1) . " : " . $radd1_url . "\n";
}
if (!empty($resort2)) {
    $smsText .= getUTFtoKR($radd2_1) . " : " . $radd2_url . "\n";
}
if (!empty($resort3)) {
    $smsText .= getUTFtoKR($radd3_1) . " : " . $radd3_url . "\n";
}
if (!empty($resort4)) {
    $smsText .= getUTFtoKR($radd4_1) . " : " . $radd4_url . "\n";
}
if (!empty($resort5)) {
    $smsText .= getUTFtoKR($radd5_1) . " : " . $radd5_url . "\n";
}
// history에 저장 SMS
$f_phone_r = str_replace("-", "", $f_phone);
$qry = "insert into rb_sms_history set cp='" . $f_phone_r . "', writer='" . $memuid . "', content='" . $smsText . "', send_date='" . date("YmdHis") . "', from_type='batch'";
mysql_query($qry);
getSendSMS("_sms", "sms", $f_phone, "대량전송(관리자)", $smsText, "mms");
//	getSendSMS("_sms","sms","01089997157","대량전송(관리자)",$smsText,"sms");
// 발송완료끝
//	getSendSMS("_sms","sms",$f_phone,"대량전송(관리자)",$smsText,"mms");
if ($debug) {
    echo $qrys . "<br />";
    echo $uid . " = " . $puid . " : " . $_uid . "<br />";
    echo $smsText . "<br />";
    echo $_POST['save_flag'] . " - " . $_POST['insert_flag'] . "<br>";
    echo "To_Email : " . $add3[5] . ", Add_Email : " . $_POST[addemail] . ", Admin_Email : " . $admin_email . ", From_Email : " . $_POST[from_email];
Example #8
0
        <td align="center" bgcolor="#ffffff"><span class="style4">서울시 마포구 서교동 480-10 미리내빌딩 3층</span></td>
        <td align="center" bgcolor="#e6e6e6"><span class="style13">전화</span></td>
        <td align="center" bgcolor="#ffffff"><?php 
echo $tel[1];
?>
<input type="hidden" name="val49" value="<?php 
echo $tel[1];
?>
" /></td>
      </tr>
      <tr>
        <td height="20" align="center" bgcolor="#e6e6e6"><span class="style4"><b>대표자</b></span></td>
        <td align="center" bgcolor="#ffffff"><span class="style4">임 희 성 </span></td>
        <td align="center" bgcolor="#e6e6e6"><span class="style13">담당자직통</span></td>
<?php 
$sql = mysql_query("SELECT * FROM rb_s_mbrdata where name = '" . getUTFtoKR($tel[0]) . "' and admin=1;");
$man = mysql_fetch_array($sql);
?>
        <td align="center" bgcolor="#ffffff"><?php 
echo $man[tel2];
?>
</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;
	<input type="hidden" name="val51" value="<?php 
echo $tel[3];
?>
" />
Example #9
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
$folder = './' . str_replace('./', '', $folder);
foreach ($members as $val) {
    unlink($folder . getUTFtoKR($val));
}
getLink('reload', 'parent.', $alert, $history);
Example #10
0
function get_excel_content($db, $table, $SQL)
{
    $result = mysql_db_query($db, "SELECT * FROM {$table} {$SQL}");
    print "<table border=1>\r\n";
    print "<tr bgcolor=gold align=center>\r\n";
    for ($j = 0; $j < mysql_num_fields($result); $j++) {
        print "<td><b>" . mysql_field_name($result, $j) . "</b></td>\r\n";
    }
    print "</tr>\r\n";
    while ($row = mysql_fetch_row($result)) {
        print "<tr>\r\n";
        for ($j = 0; $j < mysql_num_fields($result); $j++) {
            print "<td>" . getUTFtoKR($row[$j]) . "</td>\r\n";
        }
        print "</tr>\r\n";
    }
    print "</table>\r\n";
}
Example #11
0
function getSendMail($mailTo, $mailFrom, $title, $content, $upfile, $html)
{
    if ($_POST['save_flag'] == "true") {
        return;
    }
    $to_exp = explode('|', $mailTo);
    $from_exp = explode('|', $mailFrom);
    $mailTo = $to_exp[0];
    //$to_exp[1] ? "\"".getUTFtoKR($to_exp[1])."\" <$to_exp[0]>" :
    $mailFrom = $from_exp[0];
    //$from_exp[1] ? "\"".getUTFtoKR($from_exp[1])."\" <$from_exp[0]>" :
    if (!$mailTo) {
        return;
    }
    if (!$mailFrom) {
        return;
    }
    if ($html == 'TEXT') {
        $content = nl2br(htmlspecialchars($content));
    }
    ## 구분자 생성
    $boundary = '----' . uniqid('part');
    // 구분자 생성
    ## 해더생성
    $header = "Return-Path: {$mailFrom}\r\n";
    // 반송 이메일 주소
    $header .= "from: {$mailFrom}\r\n";
    // 송신자명, 송신자 이메일 주소
    ## 첨부파일이 있는 경우
    if ($upfile && $upfile['name']) {
        ## 해더생성
        $header .= "MIME-Version: 1.0\r\n";
        // MIME 버전 표시
        $header .= "Content-Type: Multipart/mixed; boundary=\"{$boundary}\"";
        // 구분자 설정, Multipart/mixed 일 경우 첨부화일
        $filename = basename($upfile['name']);
        // 파일명 추출
        $fp = fopen($upfile['tmp_name'], 'r');
        // 파일 열기
        $file = fread($fp, $upfile['size']);
        // 파일 읽기
        fclose($fp);
        // 파일 닫기
        $upfile_type = $upfile['type'];
        if ($upfile_type == '') {
            $upfile_type = 'application/octet-stream';
        }
        ## 이메일 본문 생성
        $mailbody = "This is a multi-part message in MIME format.\r\n\r\n";
        $mailbody .= "--{$boundary}\r\n";
        $mailbody .= "Content-Type: text/html; charset=euc-kr\r\n";
        $mailbody .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
        //		$mailbody .= nl2br(addslashes($content)) . "\r\n";
        $mailbody .= $content . "\r\n";
        ## 첨부파일
        $mailbody .= "--{$boundary}\r\n";
        $mailbody .= "Content-Type: " . $upfile_type . "; name=\"" . $filename . "\"\r\n";
        // 내용
        $mailbody .= "Content-Transfer-Encoding: base64\r\n";
        // 암호화 방식
        $mailbody .= "Content-Disposition: attachment; filename=\"" . $filename . "\"\r\n\r\n";
        // 첨부파일인 것을 알림
        $mailbody .= base64_encode($file) . "\r\n\r\n";
        $mailbody .= "--{$boundary}--";
        //내용 구분자 마침
    } else {
        ## 해더생성
        $header .= "MIME-Version: 1.0\r\n";
        $header .= "Content-Type: Multipart/alternative; boundary = \"{$boundary}\"";
        ## 이메일 본문 생성
        $mailbody = "--{$boundary}\r\n";
        $mailbody .= "Content-Type: text/html; charset=euc-kr\r\n";
        $mailbody .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
        //		$mailbody .= nl2br(addslashes($content)) . "\r\n";
        $mailbody .= $content . "\r\n";
        $mailbody .= "--{$boundary}--\r\n\r\n";
    }
    return @mail($mailTo, getUTFtoKR($title), $mailbody, $header);
}
include_once $g['dir_module'] . 'var/var.php';
if ($d['trackback']['perm_write'] > $my['level'] && !$my['admin']) {
    getLink('', '', '권한이 없습니다.', '');
}
if ($trackback) {
    $cyncArr = getArrayString($_SESSION[$m . 'cync']);
    $trackback = trim($trackback);
    $compaurl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . '/' . $r . '/' . $cyncArr['data'][0] . '/' . $cyncArr['data'][1];
    if ($trackback == $compaurl) {
        getLink('', '', '지정된 주소는 원본글의 트랙백주소입니다.', '');
    }
    $R = getUidData($table[$cyncArr['data'][0] . 'data'], $cyncArr['data'][1]);
    if ($R['uid']) {
        include_once $g['path_core'] . 'function/trackback.func.php';
        $orignurl = $g['url_root'] . '/?r=' . $r . '&m=' . $cyncArr['data'][0] . '&bid=' . $R['bbsid'] . '&uid=' . $R['uid'];
        $result = putTrackback($trackback, $orignurl, getUTFtoKR($R['subject']), getUTFtoKR($R[$_HS['nametype']]), getUTFtoKR(strip_tags($R['content'])), 0);
        if ($result) {
            $minuid = getDbCnt($table['s_trackback'], 'min(uid)', '');
            $uid = $minuid ? $minuid - 1 : 100000000;
            $QKEY = "uid,site,type,parent,parentmbr,url,name,subject,content,d_regis,d_modify,cync";
            $QVAL = "'{$uid}','{$s}','2','" . $cyncArr['data'][0] . $R['uid'] . "','" . $my['uid'] . "','{$trackback}','','','','" . $date['totime'] . "','','" . $_SESSION[$m . 'cync'] . "'";
            getDbInsert($table['s_trackback'], $QKEY, $QVAL);
            getDbUpdate($table['s_numinfo'], 'sndtrack=sndtrack+1', "date='" . $date['today'] . "' and site=" . $s);
            if ($uid == 100000000) {
                db_query("OPTIMIZE TABLE " . $table['s_trackback'], $DB_CONNECT);
            }
        } else {
            getLink('', '', '트랙백서버가 동작하지 않거나 정상적인 주소가 아닙니다.', '');
        }
    }
}
Example #13
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
unlink($g['path_tmp'] . 'backup/' . str_replace('/', '_', str_replace('./', '', $folder) . getUTFtoKR($oldfile)) . '.bak');
getLink('reload', 'parent.', $alert, $history);
Example #14
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
if (!$sess_Code) {
    exit;
}
$savePath = $upload_dir;
$saveFile = $savePath . getUTFtoKR($_FILES['Filedata']['name']);
$fileExt = strtolower(getExt($_FILES['Filedata']['name']));
if ($Overwrite == 'true' || !is_file($saveFile)) {
    if (strstr('php3,html,inc,cgi,pl,jsp', $fileExt)) {
        exit;
    }
    move_uploaded_file($_FILES['Filedata']['tmp_name'], $saveFile);
    @chmod($saveFile, 0707);
}
exit;
Example #15
0
    }
    if ($gid == 100000000.0) {
        db_query("OPTIMIZE TABLE " . $table[$m . 'idx'], $DB_CONNECT);
        db_query("OPTIMIZE TABLE " . $table[$m . 'data'], $DB_CONNECT);
        db_query("OPTIMIZE TABLE " . $table[$m . 'month'], $DB_CONNECT);
        db_query("OPTIMIZE TABLE " . $table[$m . 'day'], $DB_CONNECT);
    }
}
$NOWUID = $LASTUID ? $LASTUID : $R['uid'];
if ($trackback) {
    $trackback = trim($trackback);
    $compaurl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . '/' . $m . '/' . $NOWUID;
    if ($trackback != $compaurl) {
        include_once $g['path_core'] . 'function/trackback.func.php';
        $orignurl = 'http://' . $_SERVER['HTTP_HOST'] . str_replace('index.php', '?m=', $_SERVER['SCRIPT_NAME']) . $m . '&bid=' . $bbsid . '&uid=' . $NOWUID;
        $result = putTrackback($trackback, $orignurl, getUTFtoKR(strip_tags($subject)), getUTFtoKR(${$_HS['nametype']}), getUTFtoKR(strip_tags($content)), 0);
        if ($result) {
            $minuid = getDbCnt($table['s_trackback'], 'min(uid)', '');
            $trackuid = $minuid ? $minuid - 1 : 100000000;
            $cync = '[' . $m . '][' . $NOWUID . '][m:' . $m . ',bid:' . $bbsid . ',uid:' . $NOWUID . ']';
            $QKEY = "uid,site,type,parent,parentmbr,url,name,subject,content,d_regis,d_modify,cync";
            $QVAL = "'{$trackuid}','{$s}','2','" . $m . $NOWUID . "','{$mbruid}','{$trackback}','','','','{$d_regis}','','{$cync}'";
            getDbInsert($table['s_trackback'], $QKEY, $QVAL);
            getDbUpdate($table['s_numinfo'], 'sndtrack=sndtrack+1', "date='" . $date['today'] . "' and site=" . $s);
            if ($trackuid == 100000000) {
                db_query("OPTIMIZE TABLE " . $table['s_trackback'], $DB_CONNECT);
            }
        }
    }
}
if ($tag || $R['tag']) {
Example #16
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
$folder = './' . str_replace('./', '', $folder);
$oldfile = getUTFtoKR($oldfile);
$newfile = getUTFtoKR($newfile);
if ($oldfile == $newfile) {
    if ($backup) {
        $backUpFile = $g['path_tmp'] . 'backup/' . str_replace('/', '_', str_replace('./', '', $folder) . $oldfile) . '.bak';
        if (is_file($backUpFile)) {
            unlink($backUpFile);
        }
        copy($folder . $oldfile, $backUpFile);
        @chmod($backUpFile, 0707);
    }
    $fp = fopen($folder . $oldfile, 'w');
    fwrite($fp, trim(stripslashes($content)));
    fclose($fp);
    @chmod($folder . $oldfile, 0707);
} else {
    if ($backup) {
        $new_backUpFile = $g['path_tmp'] . 'backup/' . str_replace('/', '_', str_replace('./', '', $folder) . $newfile) . '.bak';
        copy($folder . $oldfile, $new_backUpFile);
        @chmod($new_backUpFile, 0707);
    }
    $old_backUpFile = $g['path_tmp'] . 'backup/' . str_replace('/', '_', str_replace('./', '', $folder) . $oldfile) . '.bak';
    if (is_file($old_backUpFile)) {
        unlink($old_backUpFile);
Example #17
0
function getSendMail($to, $from, $subject, $content, $html)
{
    global $g, $d;
    if ($html == 'TEXT') {
        $content = nl2br(htmlspecialchars($content));
    }
    $to_exp = explode('|', $to);
    $from_exp = explode('|', $from);
    if ($d['admin']['smtp_use'] && $d['admin']['smtp']) {
        require $g['path_core'] . 'opensrc/phpmailer/PHPMailerAutoload.php';
        $mail = new PHPMailer();
        $mail->CharSet = 'utf-8';
        $mail->Encoding = 'base64';
        $mail->isSMTP();
        $mail->Host = $d['admin']['smtp_host'];
        $mail->SMTPAuth = $d['admin']['smtp_auth'] ? true : false;
        $mail->Username = $d['admin']['smtp_user'];
        $mail->Password = $d['admin']['smtp_pass'];
        if ($d['admin']['smtp_ssl']) {
            $mail->SMTPSecure = $d['admin']['smtp_ssl'];
        }
        $mail->Port = $d['admin']['smtp_port'];
        $mail->From = $from_exp[0];
        if ($from_exp[1]) {
            $mail->FromName = $from_exp[1];
        } else {
            $mail->FromName = $from_exp[0];
        }
        if ($to_exp[1]) {
            $mail->addAddress($to_exp[0], $to_exp[1]);
        } else {
            $mail->addAddress($to_exp[0]);
        }
        $mail->addReplyTo($from_exp[0], $from_exp[1] ? $from_exp[1] : $from_exp[0]);
        if ($ccEmail) {
            $mail->addCC($ccEmail);
        }
        if ($bccEmail) {
            $mail->addBCC($bccEmail);
        }
        $mail->WordWrap = 50;
        if ($addAttach) {
            $mail->addAttachment($addAttach);
        }
        $mail->isHTML($html == 'TEXT' ? false : true);
        $mail->Subject = $subject;
        $mail->Body = $content;
        if ($altBody) {
            $mail->AltBody = $altBody;
        }
        if (!$mail->send()) {
            return false;
            //$mail->ErrorInfo;
        } else {
            return true;
        }
    } else {
        $To = $to_exp[1] ? "\"" . getUTFtoKR($to_exp[1]) . "\" <{$to_exp['0']}>" : $to_exp[0];
        $Frm = $from_exp[1] ? "\"" . getUTFtoKR($from_exp[1]) . "\" <{$from_exp['0']}>" : $from_exp[0];
        $Header = "From:{$Frm}\nReply-To:{$frm}\nX-Mailer:PHP/" . phpversion();
        $Header .= "\nContent-Type:text/html;charset=EUC-KR\r\n";
        return @mail($To, getUTFtoKR($subject), getUTFtoKR($content), $Header);
    }
}
Example #18
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
if (is_uploaded_file($_FILES['upfile']['tmp_name'])) {
    $folder = './' . str_replace('./', '', $folder);
    $oldfile = getUTFtoKR($oldfile);
    $upFile_A = explode('.', $_FILES['upfile']['name']);
    $upFile_E = strtolower($upFile_A[count($upFile_A) - 1]);
    if ($upFile_E == $fileext) {
        move_uploaded_file($_FILES['upfile']['tmp_name'], $folder . $oldfile);
        @chmod($folder . $oldfile, 0707);
    }
}
getLink('reload', 'parent.', $alert, $history);