Exemplo n.º 1
0
function AdminAlert($reg_compname, $reg_contactname)
{
    $message = '<html>';
    $message .= '<head>';
    $message .= '<title></title>';
    $message .= '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
    $message .= '</head>';
    $message .= '<body>';
    $message .= '<table width="550" border="0" cellspacing="0" cellpadding="0">';
    $message .= '<tr bgcolor="#ff7e00">';
    $message .= '<td width="10" height="10" align="left" valign="top"></td>';
    $message .= '<td height="10" align="left" valign="top"></td>';
    $message .= '<td width="10" height="10" align="left" valign="top"></td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td width="10" align="left" valign="top" bgcolor="#ff7e00"></td>';
    $message .= '<td align="left" valign="top">';
    $message .= '<table width="530" border="0" cellspacing="0" cellpadding="0">';
    $message .= '<tr>';
    $message .= '<td width="20" height="20" align="left" valign="top"></td>';
    $message .= '<td height="20" align="left" valign="top"></td>';
    $message .= '<td width="20" height="20" align="left" valign="top"></td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td width="20" align="left" valign="top"></td>';
    $message .= '<td align="left" valign="top">';
    $message .= '<table width="490" border="0" cellspacing="0" cellpadding="0">';
    $message .= '<tr>';
    $message .= '<td width="100" align="left" valign="top"><img src="http://supply.sohorepro.com/store_files/soho_logo.jpg" width="126" height="115" alt=""/></td>';
    $message .= '<td width="40" align="left" valign="top"></td>';
    $message .= '<td width="350" align="left" valign="top">';
    $message .= '<table width="350" border="0" cellspacing="0" cellpadding="0" style="margin-right:-1px;">';
    $message .= '<tr>';
    $message .= '<td height="25" align="left" valign="top" style="font-family:Arial, Helvetica, sans-serif; font-size:15px; color:#ff7e00; font-weight:bold;">Dear Admin,</br></td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td align="left" valign="top" style="font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#444444">';
    $message .= '<table>';
    $message .= '<tr>';
    $message .= '<td>New user has been registered</td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td>Company Name : ' . $reg_compname . '</td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td>Contact Name : ' . $reg_contactname . '</td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td><a href="http://supply.sohorepro.com/admin/new_accounts.php" target="_blank">http://supply.sohorepro.com/admin/new_accounts.php</a></td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td height="20" align="left" valign="top"></td>';
    $message .= '<td height="20" align="left" valign="top"></td>';
    $message .= '<td height="20" align="left" valign="top"></td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</td>';
    $message .= '<td width="10" align="left" valign="top" bgcolor="#ff7e00"></td>';
    $message .= '</tr>';
    $message .= '<tr bgcolor="#ff7e00">';
    $message .= '<td width="10" height="10" align="left" valign="top"></td>';
    $message .= '<td height="10" align="left" valign="top"></td>';
    $message .= '<td width="10" height="10" align="left" valign="top"></td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</body>';
    $message .= '</html>';
    $final_html = html_entity_decode($message);
    $mail_id = getActiveEmail();
    foreach ($mail_id as $to) {
        $subject = 'New Account Created by ' . $reg_compname;
        $headers = 'From: "SohoRepro" <*****@*****.**>' . "\r\n";
        $headers .= "MIME-Version: 1.0" . "\r\n";
        $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
        $to = $to['email_id'];
        //$mail_id = '*****@*****.**';
        $result_mail = mail($to, $subject, $final_html, $headers);
    }
    if ($result_mail) {
        return '1';
    } else {
        return '0';
    }
}
Exemplo n.º 2
0
</style>
<title>Sohorepro-Order</title>
<?php
include './admin/config.php';
include './admin/db_connection.php';
$user_id                = $_SESSION['sohorepro_userid'];
$sql                    = "DELETE FROM sohorepro_checkout WHERE user_id = " . $user_id . " ";
mysql_query($sql);
$sql_order_id           = mysql_query("SELECT id,order_id,created_date,order_number FROM sohorepro_order_master ORDER BY id DESC LIMIT 1");
$object                 = mysql_fetch_assoc($sql_order_id);
$id                     = $object['id'];
$Order_id               = $object['order_id'];
$Order_number           = $object['order_number'];
$Date                   = date("m-d-Y h:m:s", strtotime($object['created_date']));                            
$view_orders            = viewOrders($id);
$mail_id                = getActiveEmail();

$message  = '<link href="mail_css.css" media="screen" rel="stylesheet" type="text/css" />';
$message .= '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">';
$message .= '<table width="750" border="0" cellspacing="0" cellpadding="0">';
$message .= '<tr bgcolor="#ff7e00">';
$message .= '<td width="10" height="10" align="left" valign="top"></td>';
$message .= '<td height="10" align="left" valign="top"></td>';
$message .= '<td width="10" height="10" align="left" valign="top"></td>';
$message .= '</tr>';
$message .= '<tr>';
$message .= '<td width="10" align="left" valign="top" bgcolor="#ff7e00"></td>';
$message .= '<td align="left" valign="top"><table width="730" border="0" cellspacing="0" cellpadding="0">';
$message .= '<tr>';
$message .= '<td width="20" height="20" align="left" valign="top"></td>';
$message .= '<td height="20" align="left" valign="top"></td>';
Exemplo n.º 3
0
function CreateUsrNotiAdmin($reg_compname, $cus_contact_name, $reg_email_id)
{
    $comp_name = getCompName($reg_compname);
    $mail_id = getActiveEmail();
    $customer_email = array('email_id' => CompanyMail($reg_compname));
    array_push($mail_id, $customer_email);
    $message = '<html>';
    $message .= '<head>';
    $message .= '<title></title>';
    $message .= '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
    $message .= '</head>';
    $message .= '<body>';
    $message .= '<table width="575" border="0" cellspacing="0" cellpadding="0">';
    $message .= '<tr bgcolor="#ff7e00">';
    $message .= '<td width="10" height="10" align="left" valign="top"></td>';
    $message .= '<td height="10" align="left" valign="top"></td>';
    $message .= '<td width="10" height="10" align="left" valign="top"></td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td width="10" align="left" valign="top" bgcolor="#ff7e00"></td>';
    $message .= '<td align="left" valign="top">';
    $message .= '<table width="530" border="0" cellspacing="0" cellpadding="0">';
    $message .= '<tr>';
    $message .= '<td width="20" height="20" align="left" valign="top"></td>';
    $message .= '<td height="20" align="left" valign="top"></td>';
    $message .= '<td width="20" height="20" align="left" valign="top"></td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td width="20" align="left" valign="top"></td>';
    $message .= '<td align="left" valign="top">';
    $message .= '<table width="490" border="0" cellspacing="0" cellpadding="0">';
    $message .= '<tr>';
    $message .= '<td width="100" align="left" valign="top"><img src="http://supply.sohorepro.com/store_files/soho_logo.jpg" width="126" height="115" alt=""/></td>';
    $message .= '<td width="40" align="left" valign="top"></td>';
    $message .= '<td width="350" align="left" valign="top">';
    $message .= '<table width="350" border="0" cellspacing="0" cellpadding="0" style="margin-right:-1px;">';
    $message .= '<tr>';
    $message .= '<td height="25" align="left" valign="top" style="font-family:Arial, Helvetica, sans-serif; font-size:15px; color:#ff7e00; font-weight:bold;">Dear Admin,</br></td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td align="left" valign="top" style="font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#444444">';
    $message .= '<table>';
    $message .= '<tr>';
    $message .= '<td>New user has been registered by the following company:</td>';
    //    $message .='<td>New User has been registered:</td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td>Company Name : ' . $comp_name . '</td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td>Contact Name : ' . $cus_contact_name . '</td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td>User Mail ID : ' . $reg_email_id . '</td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td height="20" align="left" valign="top"></td>';
    $message .= '<td height="20" align="left" valign="top"></td>';
    $message .= '<td height="20" align="left" valign="top"></td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</td>';
    $message .= '<td width="10" align="left" valign="top" bgcolor="#ff7e00"></td>';
    $message .= '</tr>';
    $message .= '<tr bgcolor="#ff7e00">';
    $message .= '<td width="10" height="10" align="left" valign="top"></td>';
    $message .= '<td height="10" align="left" valign="top"></td>';
    $message .= '<td width="10" height="10" align="left" valign="top"></td>';
    $message .= '</tr>';
    $message .= '</table>';
    $message .= '</body>';
    $message .= '</html>';
    $final_html = html_entity_decode($message);
    foreach ($mail_id as $mails_sent) {
        $pre_filt[] = $mails_sent['email_id'];
    }
    $final_list = array_unique($pre_filt);
    foreach ($final_list as $to) {
        $subject = 'New User Registered by ' . $comp_name;
        $headers = 'From: "SohoRepro" <*****@*****.**>' . "\r\n";
        $headers .= "MIME-Version: 1.0" . "\r\n";
        $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
        //$mail_id = '*****@*****.**';
        if ($comp_name != '') {
            $result_mail = mail($to, $subject, $final_html, $headers);
        }
    }
    if ($result_mail) {
        return '1';
    } else {
        return '0';
    }
}