function userSignup($uname, $pswd, $email)
{
    $url = $GLOBALS['URL'];
    if (TRUE) {
        //filter_var($email,FILTER_VALIDATE_EMAIL)){
        $confcode = md5(uniqid(rand()));
        $data = array($confcode, $uname, $pswd, $email);
        $response = db("temp_signup", $data);
        if ($response === TRUE && mailer('confirm', array($confcode, $email))) {
            echo "A confirmation email has been sent to the given address!";
        } else {
            if ($response = 1062) {
                userSignup($data[1], $data[2], $data[3]);
            } else {
                echo "RESPONSE: {$response} \r\nMESSAGE: {$message} \r\nCONFCODE: {$confcode} \r\nURL: {$url}";
            }
        }
    } else {
        echo "Invalid Email {$email}";
    }
}
Esempio n. 2
0
function mail_and_die($subject, $body)
{
    mailer('*****@*****.**', $subject, $body);
    die($subject . "\n" . $body);
}
include_once G5_CAPTCHA_PATH . '/captcha.lib.php';
include_once G5_LIB_PATH . '/mailer.lib.php';
$mb_id = trim($_POST['mb_id']);
$mb_email = trim($_POST['mb_email']);
$sql = " select mb_name, mb_datetime from {$g5['member_table']} where mb_id = '{$mb_id}' and mb_email_certify <> '' ";
$mb = sql_fetch($sql);
if (!$mb) {
    alert("이미 메일인증 하신 회원입니다.", G5_URL);
}
if (!chk_captcha()) {
    alert('자동등록방지 숫자가 틀렸습니다.');
}
$sql = " select count(*) as cnt from {$g5['member_table']} where mb_id <> '{$mb_id}' and mb_email = '{$mb_email}' ";
$row = sql_fetch($sql);
if ($row['cnt']) {
    alert("{$mb_email} 메일은 이미 존재하는 메일주소 입니다.\\n\\n다른 메일주소를 입력해 주십시오.");
}
// 인증메일 발송
$subject = '[' . $config['cf_title'] . '] 인증확인 메일입니다.';
$mb_name = $mb['mb_name'];
$mb_datetime = $mb['mb_datetime'] ? $mb['mb_datetime'] : G5_TIME_YMDHIS;
$mb_md5 = md5($mb_id . $mb_email . $mb_datetime);
$certify_href = G5_BBS_URL . '/email_certify.php?mb_id=' . $mb_id . '&amp;mb_md5=' . $mb_md5;
ob_start();
include_once './register_form_update_mail3.php';
$content = ob_get_contents();
ob_end_clean();
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content, 1);
$sql = " update {$g5['member_table']} set mb_email = '{$mb_email}' where mb_id = '{$mb_id}' ";
sql_query($sql);
alert("인증메일을 {$mb_email} 메일로 다시 보내 드렸습니다.\\n\\n잠시후 {$mb_email} 메일을 확인하여 주십시오.", G5_URL);
Esempio n. 4
0
    // 최고관리자에게 보내는 메일
    if ($config['cf_email_wr_super_admin']) {
        $array_email[] = $super_admin['mb_email'];
    }
    // 원글게시자에게 보내는 메일
    if ($config['cf_email_wr_write']) {
        if ($w == '') {
            $wr['wr_email'] = $wr_email;
        }
        $array_email[] = $wr['wr_email'];
    }
    // 옵션에 메일받기가 체크되어 있고, 게시자의 메일이 있다면
    if (strstr($wr['wr_option'], 'mail') && $wr['wr_email']) {
        $array_email[] = $wr['wr_email'];
    }
    // 중복된 메일 주소는 제거
    $unique_email = array_unique($array_email);
    $unique_email = array_values($unique_email);
    for ($i = 0; $i < count($unique_email); $i++) {
        mailer($wr_name, $wr_email, $unique_email[$i], $subject, $content, 1);
    }
}
// 사용자 코드 실행
@(include_once $board_skin_path . '/write_update.skin.php');
@(include_once $board_skin_path . '/write_update.tail.skin.php');
delete_cache_latest($bo_table);
if ($file_upload_msg) {
    alert($file_upload_msg, G5_HTTP_BBS_URL . '/board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $wr_id . '&amp;page=' . $page . $qstr);
} else {
    goto_url(G5_HTTP_BBS_URL . '/board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $wr_id . $qstr);
}
        $mb_md5 = md5($mb_id . $email . $datetime);
        $content = $ma[ma_content];
        $content = preg_replace("/{이름}/", $name, $content);
        $content = preg_replace("/{별명}/", $nick, $content);
        $content = preg_replace("/{회원아이디}/", $mb_id, $content);
        $content = preg_replace("/{이메일}/", $email, $content);
        $content = preg_replace("/{생일}/", (int) substr($birth, 4, 2) . '월 ' . (int) substr($birth, 6, 2) . '일', $content);
        $content = $content . "<hr size=0><p><span style='font-size:9pt; font-familye:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='{$g4['url']}/{$g4['bbs']}/email_stop.php?mb_id={$mb_id}&mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
        /*
        ob_start();
        include "$mail_skin/mail.skin.php";
        $content = ob_get_contents();
        ob_end_clean();
        */
        //mailer($default[de_subject], $default[de_admin_email], $email, $subject, $content, 1);
        mailer($config[cf_title], $member[mb_email], $email, $subject, $content, 1);
        echo "<script> document.all.cont.innerHTML += '{$cnt}. {$email} ({$mb_id} : {$name})<br>'; </script>\n";
        //echo "+";
        flush();
        ob_flush();
        ob_end_flush();
        usleep($sleepsec);
        if ($cnt % $countgap == 0) {
            echo "<script> document.all.cont.innerHTML += '<br>'; document.body.scrollTop += 1000; </script>\n";
        }
        // 화면을 지운다... 부하를 줄임
        if ($cnt % $maxscreen == 0) {
            echo "<script> document.all.cont.innerHTML = ''; document.body.scrollTop += 1000; </script>\n";
        }
    }
}
Esempio n. 6
0
        $result = sql_query($sql);
        for ($i = 0; $row = sql_fetch_array($result); $i++) {
            $auth[$row['au_menu']] = $row['au_auth'];
        }
        if (!$i) {
            alert('최고관리자 또는 관리권한이 있는 회원만 접근 가능합니다.', G5_URL);
        }
    }
}
// 관리자의 아이피, 브라우저와 다르다면 세션을 끊고 관리자에게 메일을 보낸다.
$admin_key = md5($member['mb_datetime'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']);
if (get_session('ss_mb_key') !== $admin_key) {
    session_destroy();
    include_once G5_LIB_PATH . '/mailer.lib.php';
    // 메일 알림
    mailer($member['mb_nick'], $member['mb_email'], $member['mb_email'], 'XSS 공격 알림', $_SERVER['REMOTE_ADDR'] . ' 아이피로 XSS 공격이 있었습니다.\\n\\n관리자 권한을 탈취하려는 접근이므로 주의하시기 바랍니다.\\n\\n해당 아이피는 차단하시고 의심되는 게시물이 있는지 확인하시기 바랍니다.\\n\\n' . G5_URL, 0);
    alert_close('정상적으로 로그인하여 접근하시기 바랍니다.');
}
@ksort($auth);
// 가변 메뉴
unset($auth_menu);
unset($menu);
unset($amenu);
$tmp = dir(G5_ADMIN_PATH);
while ($entry = $tmp->read()) {
    if (!preg_match('/^admin.menu([0-9]{3}).*\\.php$/', $entry, $m)) {
        continue;
    }
    // 파일명이 menu 으로 시작하지 않으면 무시한다.
    $amenu[$m[1]] = $entry;
    include_once G5_ADMIN_PATH . '/' . $entry;
Esempio n. 7
0
                        $strURL = '';
                        $strData = iconv_euckr($sms_content);
                        $strDate = '';
                        $nCount = count($strDest);
                        $res = $SMS->Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate, $nCount);
                        $SMS->Send();
                        $SMS->Init();
                        // 보관하고 있던 결과값을 지웁니다.
                    }
                } else {
                    include_once G5_LIB_PATH . '/icode.sms.lib.php';
                    $SMS = new SMS();
                    // SMS 연결
                    $SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
                    $SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv_euckr(stripslashes($sms_content)), "");
                    $SMS->Send();
                }
            }
        }
        // 답변 이메일전송
        if (trim($row['iq_email'])) {
            include_once G5_LIB_PATH . '/mailer.lib.php';
            $subject = $config['cf_title'] . ' ' . $row['it_name'] . ' 상품문의 답변 알림 메일';
            $content = conv_content($iq_answer, 1);
            mailer($config['cf_title'], $config['cf_admin_email'], $row['iq_email'], $subject, $content, 1);
        }
    }
    goto_url("./itemqaform.php?w={$w}&amp;iq_id={$iq_id}&amp;sca={$sca}&amp;{$qstr}");
} else {
    alert();
}
Esempio n. 8
0
			mysql_query($sql);
		
			//$_SESSION['loguserid'] = $lastid;
		
			$from = $varsline['adminemail'];
			$to = $email;
			$subj = "http://".$_SERVER['SERVER_NAME']." - registration";
			$body = "\n\nДля подтверждения регистрации перейдите по ссылке: http://".$_SERVER['SERVER_NAME']."/work.php?act=submitregistration&code=".$code;
		
			$_SESSION['register_result'] = 'submit';

			$_SESSION['sent'] = 1;
            $_SESSION['sent_title'] = "Спасибо за Вашу регистрацию!";
            $_SESSION['sent_text'] = "Чтобы подтвердить регистрацию, перейдите, пожалуйста, по ссылке в письме, которое уже отправлено на Ваш електронный ящик.";

			mailer($from,$to,$subj,$body);
			echo '<script> document.location.href="'.$_SERVER['HTTP_REFERER'].'?=register=1"; </script>';
			exit();
	    //}
	    //else
	    //{
		//	$_SESSION['register_result'] = 'badcode';

		//	echo '<script> document.location.href="/cabinet/subact/register"; </script>';
		//	exit();
	    //}
	}
	else if($act=="editprofile")
	{
	    if(!isset($_SESSION['loguserid']))
	    {
Esempio n. 9
0
 /**
  * Reset user password (via email)
  *
  * @param string $email
  *
  * @return bool
  * @throws \phpmailerException
  */
 public static function createReset($email)
 {
     $user = User::findOne('email = :email', ['email' => $email]);
     if ($user !== false) {
         $token = zHash($email . rand(10000, 9999999) . time() . microtime());
         $user->reset_token = $token;
         $user->save();
         $email = mailer();
         $email->Subject = 'Password Reset Request';
         $email->Body = view('mail.password_reset', compact('token', 'user'));
         $email->isHTML();
         return $email->send();
     }
     return false;
 }
Esempio n. 10
0
function RunNowReportInDB($report_id = null, $report_arr = array())
{
    if (!$report_id && !count($report_arr)) {
        return;
    }
    global $pearDB, $oreon;
    $hosts = array();
    $reportinfo = array();
    $hosts = getHostReport($report_id);
    $reportinfo = getReportInfo($report_id);
    $services = getServiceGroupReport($report_id);
    $dates = getPeriodToReportFork($reportinfo['period']);
    $start_date = $dates[0];
    $end_date = $dates[1];
    $reportingTimePeriod = getreportingTimePeriod();
    if (isset($_SERVER['DOCUMENT_ROOT'])) {
        $nb_folders = count(explode("/", $_SERVER['DOCUMENT_ROOT']));
        $path_www = "/" . implode("/", array_fill(0, intval($nb_folders) - 1, '..'));
        //echo $_SERVER['DOCUMENT_ROOT'] . "  " . intval($nb_folders) -1 . "  " .  $path_www . "<br />";
    }
    if (isset($hosts) && count($hosts) > 0) {
        foreach ($hosts['report_hgs'] as $hgs_id) {
            $stats = array();
            $stats = getLogInDbForHostGroup($hgs_id, $start_date, $end_date, $reportingTimePeriod);
            $Allfiles[] = pdfGen($report_id, getMyHostGroupName($hgs_id), 'hgs', $start_date, $end_date, $stats, "", $reportinfo["report_title"], $path_www);
            // "/../.."
            //print_r($Allfiles);
        }
    }
    if (isset($services) && count($services) > 0) {
        foreach ($services['report_sg'] as $sg_id) {
            $sg_stats = array();
            $sg_stats = getLogInDbForServicesGroup($sg_id, $start_date, $end_date, $reportingTimePeriod);
            $Allfiles[] = pdfGen($report_id, getMyServiceGroupName($sg_id), 'sgs', $start_date, $end_date, $sg_stats, $l, $reportinfo["report_title"], $path_www);
        }
    }
    $emails = getReportContactEmail($report_id);
    $files = array();
    foreach ($Allfiles as $file) {
        $files[basename($file)]["url"] = $file;
    }
    mailer(getGeneralOptInfo("pdfreports_report_author"), getGeneralOptInfo("pdfreports_email_sender"), $emails, $reportinfo['subject'], $reportinfo['mail_body'], getGeneralOptInfo("pdfreports_smtp_server_address"), $files, $reportinfo['name']);
    $files = null;
    $Allfiles = null;
    $emails = null;
    $services = null;
    $hosts = null;
}
Esempio n. 11
0
        $result = sql_query($sql);
        for ($i = 0; $row = sql_fetch_array($result); $i++) {
            $auth[$row['au_menu']] = $row['au_auth'];
        }
        if (!$i) {
            alert("최고관리자 또는 관리권한이 있는 회원만 접근 가능합니다.", $g4['path']);
        }
    }
}
// 관리자의 아이피, 브라우저와 다르다면 세션을 끊고 관리자에게 메일을 보낸다.
$admin_key = md5($member['mb_datetime'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']);
if (get_session("ss_mb_key") !== $admin_key) {
    session_destroy();
    include_once "{$g4['path']}/lib/mailer.lib.php";
    // 메일 알림
    mailer($member['mb_nick'], $member['mb_email'], $member['mb_email'], "XSS 공격 알림", "{$_SERVER['REMOTE_ADDR']} 아이피로 XSS 공격이 있었습니다.\n\n관리자 권한을 탈취하려는 접근이므로 주의하시기 바랍니다.\n\n해당 아이피는 차단하시고 의심되는 게시물이 있는지 확인하시기 바랍니다.\n\n{$g4['url']}", 0);
    alert_close("정상적으로 로그인하여 접근하시기 바랍니다.");
}
@ksort($auth);
// 가변 메뉴
unset($auth_menu);
unset($menu);
unset($amenu);
$tmp = dir($g4['admin_path']);
while ($entry = $tmp->read()) {
    //if (!preg_match("/^admin.menu([0-9]{3}).php/", $entry, $m))
    //if (!preg_match("/^admin.menu([0-9]{3}).*\.php/", $entry, $m))
    if (!preg_match("/^admin.menu([0-9]{3}).*\\.php\$/", $entry, $m)) {
        continue;
    }
    // 파일명이 menu 으로 시작하지 않으면 무시한다.
Esempio n. 12
0
                    $allsum += $line['price']*$item['count'];

            		$sql1 = "UPDATE $par->objectstable SET `added`=`added`+$item[count] WHERE id=$item[id]";
            		$res1 = mysql_query($sql1);
                
				    unset($_SESSION['basket'][$key]);
				}
        }
        $ordertext .= "Итого: $allsum";

        $currtime = time();

        $sql = "INSERT INTO $par->orderstable (`payment`, `delivery`, `date`, `name`, `email`, `phone`, `region`, `city`, `address`, `ordertext`, `allsum`, `userid`, `orderstr`,`orderstatus`) VALUES ('$payment', '$delivery', $currtime, '$name', '$email', '$phone', '$region', '$city', '$address', '$ordertext', $allsum, $userid, '$orderstr', 2)";
        mysql_query($sql);

        mailer($email, $varsline['adminemail'], 'Заказ',$bodytext.$ordertext);

        $_SESSION['sent'] = 1;
        $_SESSION['sent_title'] = "Спасибо, Ваш заказ успешно оформлен!";
        $_SESSION['sent_text'] = "Наж менеджер свяжется с Вами как можно скорее.";
        echo '
        <script>
                document.location.href=\'/basket\';
        </script>
        ';
        exit();
        
    }


Esempio n. 13
0
<?
if(!$_SESSION['logged']){die();}
	$res=mysql_query("select * from invoices where id='".$_SESSION['invoice']."'")or die(mysql_error());
		$info=mysql_fetch_array($res);
	if(isset($_POST['sendinvoice'])){
		$to=$_POST['to'];
		if($to==''){
			echo "<div class='errormsg'>Please enter a valid Email</div>";
		}else{
			$subject=$_POST['subject'];
			$message=$_POST['message'];
			$_GET['id']=$_SESSION['invoice'];
			include "../inc/invoice_save.php";
			
			$invoiceloc=str_replace(array('inc','mobile/'),'',dirname(__FILE__))."inc/invoices/".$_SESSION['invoice'].".pdf";
			if(mailer($to,$subject,$message,$invoiceloc)){
				echo "<div class='successmsg'>Email has been Sent</div>";
			}else{
				echo "<div class='errormsg'>Oops! Something went wrong!</div>";
			}
		}	
}
		
?>
<table align='center' style=''>
	<tr>
		<td class='alldone' onclick="window.open('../inc/invoicepdf.php?id=<?php 
echo $_SESSION['invoice'];
?>
')"><img src='style/images/save_pdf.png' style='width:120px;'/><br>Download PDF</td>
		<td class='alldone' onclick="window.open('../inc/invoicehtml.php?id=<?php 
<?php

include '../database.php';
session_start();
error_reporting(E_ERROR | E_PARSE);
if (isset($_POST['signupEmail'])) {
    $email = mysqli_real_escape_string($link, $_POST['signupEmail']);
    $password = sha1(md5(mysqli_real_escape_string($link, $_POST['signupPassword'])));
    $confPassword = sha1(md5(mysqli_real_escape_string($link, $_POST['signupconfirmPassword'])));
    if ($confPassword != $password) {
        echo "Enter same password in both fields.";
    } else {
        $sql = "INSERT INTO db_user_info (email, password) VALUES ('{$email}', '{$password}')";
        $pwd = mysqli_query($link, $sql);
        if (mysqli_affected_rows($link)) {
            include '../function/mailer.php';
            $to = $email;
            $message = "Please verify your account by clicking on the given link. <a target='_blank' href='http://buildblockz.com/verifyaccount.php?email=" . $email . "&verifycode=" . $password . "'>Verify</a>";
            mailer($to, $message);
            echo 1;
        } else {
            echo "Email already exist.";
        }
    }
}
mysqli_close();
Esempio n. 15
0
        $hdrs .= "Bcc: david.turgeon@wellsfargo.com\n";
    }
    $hdrs .= "Content-Type: text/html;\n charset=utf-8\n";
    return mail("{$arr['to']}", $sub, $msg, $hdrs);
}
if (sendable($_POST)) {
    $data = $_POST;
} else {
    if (sendable($_GET)) {
        $data = $_GET;
    } else {
        $data = '';
    }
}
if (sendable($data)) {
    $OK = $data && mailer($data);
}
$REZ = json_encode(array('stat' => $OK ? 'sent' : 'fail', 'refr' => "{$SERV['HTTP_REFERER']}"));
?>
<script>
            var W = window,
                R = <?php 
echo $REZ;
?>
,
                S = (R.stat === 'fail') ? 3 : 1;

            W.setTimeout(function () {
                if (S > 1) {
                    W.history.go(-1);
                } else {
Esempio n. 16
0
$sql = " update {$g4['member_table']}\r\n            set mb_lost_certify = '{$mb_lost_certify}'\r\n          where mb_id = '{$mb['mb_id']}' ";
sql_query($sql);
$href = "{$g4['url']}/{$g4['bbs']}/password_lost_certify.php?mb_no={$mb['mb_no']}&mb_datetime={$mb_datetime}&mb_lost_certify={$mb_lost_certify}";
$subject = "요청하신 회원아이디/패스워드 정보입니다.";
$content = "";
$content .= "<div style='line-height:180%;'>";
$content .= "<p>요청하신 계정정보는 다음과 같습니다.</p>";
$content .= "<hr>";
$content .= "<ul>";
$content .= "<li>회원아이디 : {$mb['mb_id']}</li>";
$content .= "<li>변경 패스워드 : <span style='color:#ff3300; font:13px Verdana;'><strong>{$change_password}</strong></span></li>";
$content .= "<li>이름 : " . addslashes($mb[mb_name]) . "</li>";
$content .= "<li>별명 : " . addslashes($mb[mb_nick]) . "</li>";
$content .= "<li>이메일주소 : " . addslashes($mb[mb_email]) . "</li>";
$content .= "<li>요청일시 : {$g4['time_ymdhis']}</li>";
$content .= "<li>홈페이지 : {$g4['url']}</li>";
$content .= "</ul>";
$content .= "<hr>";
$content .= "<p><a href='{$href}' target='_blank'>{$href}</a></p>";
$content .= "<p>";
$content .= "1. 위의 링크를 클릭하십시오. 링크가 클릭되지 않는다면 링크를 브라우저의 주소창에 직접 복사해 넣으시기 바랍니다.<br />";
$content .= "2. 링크를 클릭하시면 패스워드가 변경 되었다는 인증 메세지가 출력됩니다.<br />";
$content .= "3. 홈페이지에서 회원아이디와 위에 적힌 변경 패스워드로 로그인 하십시오.<br />";
$content .= "4. 로그인 하신 후 새로운 패스워드로 변경하시면 됩니다.";
$content .= "</p>";
$content .= "<p>감사합니다.</p>";
$content .= "<p>[끝]</p>";
$content .= "</div>";
$admin = get_admin('super');
mailer($admin[mb_nick], $admin[mb_email], $mb[mb_email], $subject, $content, 1);
alert_close("{$email} 메일로 회원아이디와 패스워드를 인증할 수 있는 메일이 발송 되었습니다.\\n\\n메일을 확인하여 주십시오.");
Esempio n. 17
0
function mail_and_die($m)
{
    mailer('*****@*****.**', 'Error in ' . __FILE__, $m);
    die($m);
}
Esempio n. 18
0
$subject = $ma['ma_subject'];
$cnt = 0;
for ($i = 0; $i < count($member_list); $i++) {
    list($to_email, $mb_id, $name, $nick, $datetime) = explode("||", trim($member_list[$i]));
    $sw = preg_match("/[0-9a-zA-Z_]+(\\.[0-9a-zA-Z_]+)*@[0-9a-zA-Z_]+(\\.[0-9a-zA-Z_]+)*/", $to_email);
    // 올바른 메일 주소만
    if ($sw == true) {
        $cnt++;
        $mb_md5 = md5($mb_id . $to_email . $datetime);
        $content = $ma['ma_content'];
        $content = preg_replace("/{이름}/", $name, $content);
        $content = preg_replace("/{닉네임}/", $nick, $content);
        $content = preg_replace("/{회원아이디}/", $mb_id, $content);
        $content = preg_replace("/{이메일}/", $to_email, $content);
        $content = $content . "<hr size=0><p><span style='font-size:9pt; font-familye:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='" . G5_BBS_URL . "/email_stop.php?mb_id={$mb_id}&amp;mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
        mailer($config['cf_title'], $config['cf_admin_email'], $to_email, $subject, $content, 1);
        echo "<script> document.all.cont.innerHTML += '{$cnt}. {$to_email} ({$mb_id} : {$name})<br>'; </script>\n";
        //echo "+";
        flush();
        ob_flush();
        ob_end_flush();
        usleep($sleepsec);
        if ($cnt % $countgap == 0) {
            echo "<script> document.all.cont.innerHTML += '<br>'; document.body.scrollTop += 1000; </script>\n";
        }
        // 화면을 지운다... 부하를 줄임
        if ($cnt % $maxscreen == 0) {
            echo "<script> document.all.cont.innerHTML = ''; document.body.scrollTop += 1000; </script>\n";
        }
    }
}
Esempio n. 19
0
    set_session("ss_token", "");
} else {
    alert_close("메일 발송시 오류가 발생하였습니다.");
    exit;
}
// 상품
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '{$it_id}' ";
$it = sql_fetch($sql);
if (!$it['it_id']) {
    alert("등록된 상품이 아닙니다.");
}
$subject = stripslashes($subject);
$content = nl2br(stripslashes($content));
$from_name = get_text($member['mb_name']);
$from_email = $member['mb_email'];
$it_id = $it['it_id'];
$it_name = $it['it_name'];
$it_mimg = get_it_image($it_id, $default['de_mimg_width'], $default['de_mimg_height']);
ob_start();
include G5_SHOP_PATH . '/mail/itemrecommend.mail.php';
$content = ob_get_contents();
ob_end_clean();
mailer($from_name, $from_email, $to_email, $subject, $content, 1);
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">";
?>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script language="JavaScript">
alert("메일을 전달하였습니다");
window.close();
</script>
Esempio n. 20
0
 /**
  * Check if an error occured, & take action
  *
  *@access public
  *@return int 1 if error, 0 else
  */
 function error()
 {
     global $config, $l;
     if (mysql_errno()) {
         mailer($config->emailfrom, $config->emailto, $config->sitename . $l['str_trouble_with_db'], '', mysql_errno() . ": " . mysql_error() . "\n" . $this->lastquery . "\n");
         return 1;
     }
     return 0;
 }
Esempio n. 21
0
        if ($old_email != $mb_email && $config['cf_use_email_certify']) {
            $sql_email_certify = " , mb_email_certify = '' ";
        }
        // set mb_name         = '$mb_name', 제거
        $sql = " update {$g4['member_table']}\n                set mb_nick         = '{$mb_nick}',\n                    mb_password_q   = '{$mb_password_q}',\n                    mb_password_a   = '{$mb_password_a}',\n                    mb_mailling     = '{$mb_mailling}',\n                    mb_sms          = '{$mb_sms}',\n                    mb_open         = '{$mb_open}',\n                    mb_email        = '{$mb_email}',\n                    mb_homepage     = '{$mb_homepage}',\n                    mb_tel          = '{$mb_tel}',\n                    mb_hp           = '{$mb_hp}',\n                    mb_zip1         = '{$mb_zip1}',\n                    mb_zip2         = '{$mb_zip2}',\n                    mb_addr1        = '{$mb_addr1}',\n                    mb_addr2        = '{$mb_addr2}',\n                    mb_signature    = '{$mb_signature}',\n                    mb_profile      = '{$mb_profile}',\n                    mb_1            = '{$mb_1}',\n                    mb_2            = '{$mb_2}',\n                    mb_3            = '{$mb_3}',\n                    mb_4            = '{$mb_4}',\n                    mb_5            = '{$mb_5}',\n                    mb_6            = '{$mb_6}',\n                    mb_7            = '{$mb_7}',\n                    mb_8            = '{$mb_8}',\n                    mb_9            = '{$mb_9}',\n                    mb_10           = '{$mb_10}'\n                    {$sql_password}\n                    {$sql_icon}\n                    {$sql_nick_date}\n                    {$sql_open_date}\n                    {$sql_sex}\n                    {$sql_email_certify}\n              where mb_id = '{$_POST['mb_id']}' ";
        sql_query($sql);
        // 인증메일 발송
        if ($old_email != $mb_email && $config['cf_use_email_certify']) {
            $subject = "인증확인 메일입니다.";
            $mb_md5 = md5($mb_id . $mb_email . $member['mb_datetime']);
            $certify_href = "{$g4['url']}/{$g4['bbs']}/email_certify.php?mb_id={$mb_id}&mb_md5={$mb_md5}";
            ob_start();
            include_once "./register_form_update_mail3.php";
            $content = ob_get_contents();
            ob_end_clean();
            mailer($admin['mb_nick'], $admin['mb_email'], $mb_email, $subject, $content, 1);
        }
    }
}
// 사용자 코드 실행
@(include_once "{$g4['path']}/skin/member/{$config['cf_member_skin']}/register_update.skin.php");
if ($msg) {
    echo "<script type='text/javascript'>alert('{$msg}');</script>";
}
/*
// 결과페이지는 https 에서 http 로 변경이 되어야 함
if ($g4['https_url'])
    $https_url = "{$g4['https_url']}/{$g4['bbs']}";
else
    $https_url = ".";
*/
Esempio n. 22
0
function send_mail($to, $from, $subject, $body, $attachments = '', $headers = '', $html = false)
{
    $full_name = db_fetch_cell("SELECT full_name FROM user_auth WHERE email_address='{$from}'");
    if (empty($full_name)) {
        $fromname = $from;
    } else {
        $fromname = $full_name;
    }
    $from = array($from, $fromname);
    mailer($from, $to, '', '', '', $subject, $body, '', $attachments, $headers, $html);
}
Esempio n. 23
0
// TODO: generate this salt
$salt = 'salT';
// Friendlier pincode instead of password
$crc = crc32($salt . strtoupper($email)) & 0x7fffffff;
//remove sign
$password = sprintf("%06u", $crc % 1000000);
require 'inc/db.php';
$email2 = $link->escapeString($email);
$password2 = $link->escapeString($password);
$salt2 = $link->escapeString($salt);
$link->exec("INSERT OR IGNORE INTO Users (email,since) VALUES('{$email2}',DATETIME('now'))") or mail_and_die('link->exec INSERT Users error', __FILE__);
$isnew = $link->changes() == 1;
$link->exec("INSERT INTO Payments (email, submitted, amount) VALUES('{$email2}', DATETIME('now'), {$amount})") or mail_and_die('link->exec INSERT Payments error', __FILE__);
// Give new members the benefit of the doubt (trust, but verify):
// FIXME: might fail because of unique password (change salt)
$link->exec("UPDATE Users SET paid = DATE(MAX(IFNULL(paid,0), DATE('now')),'+{$months} MONTH'), salt = '{$salt2}', password = '******' WHERE email = '{$email2}'") or mail_and_die('link->exec UPDATE error', __FILE__);
if ($link->changes() != 1) {
    mail_and_die('link->changes should be 1', __FILE__);
}
$link->close();
unset($link);
$subject = 'Welcome to Xinchejian 欢迎加入新车间';
$body = "Welcome! 欢迎!\n\nYou can now open the door by going to http://bouncer/\nPIN: {$password}\n\nNote that your access will be revoked if no payment was made.\n\n-- the script that sends out these emails";
mailer($email, $subject, $body);
if ($isnew) {
    $neworold = "New";
} else {
    $neworold = "Old";
}
mailer('*****@*****.**', "{$neworold} member: {$email}, paid {$amount} for {$months} month(s).", '-- ' . __FILE__);
header('Location: welcome.html', true, 303);
Esempio n. 24
0
<?php

if (!defined("_GNUBOARD_")) {
    exit;
}
// 개별 페이지 접근 불가
include_once G5_LIB_PATH . '/mailer.lib.php';
$subject = $config['cf_title'] . ' 주문 오류 알림 메일';
if ($error == 'order') {
    $content = '<p>주문정보를 DB에 입력하는 중 오류가 발생했습니다.</p>';
} else {
    if ($error == 'status') {
        $content = '<p>주문 상품의 상태를 변경하는 중 DB 오류가 발생했습니다.</p>';
    }
}
if ($tno) {
    $content .= '<p>PG사의 ' . $od_settle_case . '는 자동 취소되었습니다.</p>';
    $content .= '<p>취소 내역은 PG사 상점관리자에서 확인할 수 있습니다.</p>';
}
$content .= '<p>오류내용</p>';
$content .= '<p>' . $sql . '</p><p>' . mysql_errno() . ' : ' . mysql_error() . '<p>error file : ' . $_SERVER['SCRIPT_NAME'] . '</p>';
// 메일발송
mailer($od_name, $od_email, $config['cf_admin_email'], $subject, $content, 1);
unset($error);
Esempio n. 25
0
<?php

$sub_menu = '100300';
include_once './_common.php';
auth_check($auth[$sub_menu], 'r');
if (!$config['cf_email_use']) {
    alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
}
include_once G5_LIB_PATH . '/mailer.lib.php';
$g5['title'] = '메일 테스트';
include_once './admin.head.php';
if (isset($_POST['email'])) {
    $email = explode(',', $_POST['email']);
    for ($i = 0; $i < count($email); $i++) {
        mailer($config['cf_admin_email_name'], $config['cf_admin_email'], trim($email[$i]), '[메일검사] 제목', '<span style="font-size:9pt;">[메일검사] 내용<p>이 내용이 제대로 보인다면 보내는 메일 서버에는 이상이 없는것입니다.<p>' . G5_TIME_YMDHIS . '<p>이 메일 주소로는 회신되지 않습니다.</span>', 1);
    }
    echo '<div class="panel panel-success">';
    echo '<div class="panel-heading">';
    echo '<h3 class="panel-title"><strong>결과메세지</strong></h3>';
    echo '</div>';
    echo '<div class="panel-body">';
    echo '다음 ' . count($email) . '개의 메일 주소로 테스트 메일 발송이 완료되었습니다.';
    echo '</div></div>';
    echo '<ul>';
    for ($i = 0; $i < count($email); $i++) {
        echo '<li>' . $email[$i] . '</li>';
    }
    echo '</ul>';
    echo '<div class="local_desc02 local_desc"><p>';
    echo '해당 주소로 테스트 메일이 도착했는지 확인해 주십시오.<br>';
    echo '만약, 테스트 메일이 오지 않는다면 더 다양한 계정의 메일 주소로 메일을 보내 보십시오.<br>';
Esempio n. 26
0
<?php

$sub_menu = "200300";
include_once './_common.php';
if (!$config['cf_email_use']) {
    alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
}
include_once G5_LIB_PATH . '/mailer.lib.php';
auth_check($auth[$sub_menu], 'w');
check_demo();
$g5['title'] = '회원메일 테스트';
$name = get_text($member['mb_name']);
$nick = $member['mb_nick'];
$mb_id = $member['mb_id'];
$email = $member['mb_email'];
$sql = "select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
$ma = sql_fetch($sql);
$subject = $ma['ma_subject'];
$content = $ma['ma_content'];
$content = preg_replace("/{이름}/", $name, $content);
$content = preg_replace("/{닉네임}/", $nick, $content);
$content = preg_replace("/{회원아이디}/", $mb_id, $content);
$content = preg_replace("/{이메일}/", $email, $content);
$mb_md5 = md5($member['mb_id'] . $member['mb_email'] . $member['mb_datetime']);
$content = $content . '<p>더 이상 정보 수신을 원치 않으시면 [<a href="' . G5_BBS_URL . '/email_stop.php?mb_id=' . $mb_id . '&amp;mb_md5=' . $mb_md5 . '" target="_blank">수신거부</a>] 해 주십시오.</p>';
mailer($config['cf_title'], $member['mb_email'], $member['mb_email'], $subject, $content, 1);
alert($member['mb_nick'] . '(' . $member['mb_email'] . ')님께 테스트 메일을 발송하였습니다. 확인하여 주십시오.');
Esempio n. 27
0
$body2 .= "<tr bgcolor='white'><td align='center' height='25'>Area</td><td align='left'>{$areaname}</td></tr>";
$body2 .= "<tr bgcolor='white'><td align='center' height='25'>Question Type</td><td align='left'>{$questype}</td></tr>";
$body2 .= "<tr bgcolor='white'><td align='center' height='25'>Content</td><td align='left'>{$content}</td></tr>";
$body2 .= "</table>";
//$admin_email = "e-mail address";
$admin_email = "*****@*****.**";
if ($mode == "send") {
    //Start attachment
    for ($i = 1; $i <= 3; $i++) {
        $file[$i] = $_FILES['userfile' . $i]['name'];
        $target[$i] = "./temp/" . $file[$i];
        if (move_uploaded_file($_FILES['userfile' . $i]['tmp_name'], $target[$i])) {
            chmod("{$target[$i]}", 0777);
        }
    }
    $ret = mailer($name, $email, "Admin", $admin_email, $subject, $body . $body2, $file);
    if ($file[1] != "") {
        @unlink($target[1]);
    }
    if ($file[2] != "") {
        @unlink($target[2]);
    }
    if ($file[3] != "") {
        @unlink($target[3]);
    }
    if ($ret) {
        echo " <font color='red'>Contact Successful</font>";
    } else {
        echo " <font color='red'>Contact Failed</font>";
    }
}
Esempio n. 28
0
        if ($config['cf_email_use'] && $_POST['cp_email_send'] && $arr_send_list[$i]['mb_email'] && $arr_send_list[$i]['mb_mailling']) {
            $mb_name = get_text($arr_send_list[$i]['mb_name']);
            switch ($cp_method) {
                case 2:
                    $coupon_method = '결제금액할인';
                    break;
                case 3:
                    $coupon_method = '배송비할인';
                    break;
                default:
                    $coupon_method = '개별상품할인';
                    break;
            }
            $contents = '쿠폰명 : ' . $cp_subject . '<br>';
            $contents .= '적용대상 : ' . $coupon_method . '<br>';
            $contents .= '쿠폰만료 : ' . $cp_end;
            $title = $config['cf_title'] . ' - 쿠폰발행알림 메일';
            $email = $arr_send_list[$i]['mb_email'];
            ob_start();
            include G5_SHOP_PATH . '/mail/couponmail.mail.php';
            $content = ob_get_contents();
            ob_end_clean();
            mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $email, $title, $content, 1);
        }
    }
    // SMS발송
    if ($config['cf_sms_use'] == 'icode' && $_POST['cp_sms_send'] && $sms_count) {
        $SMS->Send();
    }
}
goto_url('./couponlist.php');
Esempio n. 29
0
    $pc_idea = stripslashes($pc_idea);
    $name = cut_str($pc_name, $config['cf_cut_name']);
    $mb_id = '';
    if ($member['mb_id']) {
        $mb_id = '(' . $member['mb_id'] . ')';
    }
    // 환경설정의 투표 기타의견 작성시 최고관리자에게 메일발송 사용에 체크되어 있을 경우
    if ($config['cf_email_po_super_admin']) {
        $subject = $po['po_subject'];
        $content = $pc_idea;
        ob_start();
        include_once './poll_etc_update_mail.php';
        $content = ob_get_contents();
        ob_end_clean();
        // 관리자에게 보내는 메일
        $admin = get_admin('super');
        $from_email = $member['mb_email'] ? $member['mb_email'] : $admin['mb_email'];
        mailer($name, $from_email, $admin['mb_email'], '[' . $config['cf_title'] . '] 설문조사 기타의견 메일', $content, 1);
    }
} else {
    if ($w == 'd') {
        if ($member[mb_id] || $is_admin == 'super') {
            $sql = " delete from {$g5[poll_etc_table]} where pc_id = '{$pc_id}' ";
            if (!$is_admin) {
                $sql .= " and mb_id = '{$member['mb_id']}' ";
            }
            sql_query($sql);
        }
    }
}
goto_url('./poll_result.php?po_id=' . $po_id . '&amp;skin_dir=' . $skin_dir);
Esempio n. 30
0
if (substr_count($to, "@") > 1) {
    alert_close('한번에 한사람에게만 메일을 발송할 수 있습니다.');
}
$key = get_session("captcha_keystring");
if (!($key && $key == $_POST[wr_key])) {
    session_unregister("captcha_keystring");
    alert("정상적인 접근이 아닌것 같습니다.");
}
for ($i = 1; $i <= $attach; $i++) {
    if ($_FILES["file" . $i][name]) {
        $file[] = attach_file($_FILES["file" . $i][name], $_FILES["file" . $i][tmp_name]);
    }
}
$content = stripslashes($content);
if ($type == 2) {
    $type = 1;
    $content = preg_replace("/\n/", "<br>", $content);
}
// html 이면
if ($type) {
    $current_url = $g4[url];
    $mail_content = "<html><head><meta http-equiv='content-type' content='text/html; charset={$g4['charset']}'><title>메일보내기</title><link rel='stylesheet' href='{$current_url}/style.css' type='text/css'></head><body>{$content}</body></html>";
} else {
    $mail_content = $content;
}
mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file);
//$html_title = $tmp_to . "님께 메일발송";
$html_title = "메일 발송중";
include_once "{$g4['path']}/head.sub.php";
alert_close("메일을 정상적으로 발송하였습니다.");
include_once "{$g4['path']}/tail.sub.php";