Esempio n. 1
0
$message .= '<table width="690" border="0" cellspacing="0" cellpadding="0" style="margin-right:-1px;">';
$message .= '<tr style="color:#fff; text-transform:uppercase;">';
$message .= '<td width="260" align="center" valign="middle" bgcolor="#f68210" class="brdr">Product Detail</td>';
$message .= '<td width="110" align="center" valign="middle" bgcolor="#f68210" class="brdr">Quantity</td>';
$message .= '<td width="110" align="center" valign="middle" bgcolor="#f68210" class="brdr">Unit Cost</td>';
$message .= '<td width="110" align="center" valign="middle" bgcolor="#f68210" class="brdr">Line Cost</td>';
$message .= '</tr>';
$total = 0;
$i = 0;
foreach ($view_orders as $ord) {
    $rowColor = ($i % 2 != 0) ? '#dfdfdf' : '#eeeeee';
    $rowColor1 = ($i % 2 != 0) ? '#eeeeee' : '#f6f2f2';
    $prod_id = $ord['product_id'];
    $id = $ord['id'];    
$message .= '<tr>';
$message .= '<td width="260" align="left" valign="middle" bgcolor="'.$rowColor1.'" class="brdr pad_lft">'.getorderProd($prod_id).'</td>';
$message .= '<td width="110" align="center" valign="middle" bgcolor="'.$rowColor.'" class="brdr">'.$ord['product_quantity'].'</td>';
$message .= '<td width="110" align="right" valign="middle" bgcolor="'.$rowColor1.'" class="brdr pad_rght">'.'$' . $ord['product_price'].'</td>';
$message .= '<td width="110" align="right" valign="middle" bgcolor="'.$rowColor.'" class="brdr pad_rght">'.'$' . ($ord['product_quantity'] * $ord['product_price']).'.00</td>';
$message .= '</tr>';
$sub_tot = $ord['product_quantity'] * $ord['product_price'];
$total = $total + $sub_tot;
$tax         = (8.875 * ($total/100));
$i++;
}
$message .= '</table></td>';
$message .= '<td width="20" align="left" valign="top"></td>';
$message .= '</tr>';
$message .= '<tr>';
$message .= '<td width="20" height="20" align="left" valign="top"></td>';
$message .= '<td height="20" align="left" valign="top"></td>';
Esempio n. 2
0
                                                                                            <td align="center" width="" valign="middle" bgcolor="#f68210"  class="brdr">Action</td>
                                                                                        </tr>

                                                                                        <?php 
            $special_price = getSpecialProduct($cumpony_id);
            if (count($special_price) > 0) {
                $k = 1;
                foreach ($special_price as $Special_Product) {
                    $super_id = getsuper($Special_Product['sp_product_id']);
                    $cat_id = getcat($Special_Product['sp_product_id']);
                    $sub_id = getsub($Special_Product['sp_product_id']);
                    $super_name = getsuperN($super_id);
                    $cat_name = getcatN($cat_id);
                    $sub_name = getsubN($sub_id);
                    $special_id = $Special_Product['sp_id'];
                    $product_name = getorderProd($Special_Product['sp_product_id']);
                    $list_price = $Special_Product['sp_list_price'];
                    $discount_price = $Special_Product['sp_discount'];
                    $selling_price = $Special_Product['sp_special_price'];
                    ?>
 

                                                                                                <tr style="background-color: #F9F2DE;" id="test_<?php 
                    echo $cumpony_id;
                    ?>
_<?php 
                    echo $special_id;
                    ?>
">                                                                                                                                                        
                                                                                                    <td style="text-align: center;"><?php 
                    echo $k;
Esempio n. 3
0
$message .= '<td>Description</td>';
$message .= '<td>Quantity</td>';
$message .= '<td>Unit Price</td>';
$message .= '<td>Total</td>';
$message .= '</tr>';
$total = 0;
$i = 1;
foreach ($view_orders as $ord) {
    $rowColor   = ($i % 2 != 0) ? '#dfdfdf' : '#eeeeee';
    $rowColor1  = ($i % 2 != 0) ? '#eeeeee' : '#f6f2f2';
    $prod_id    = $ord['product_id'];
    $shipping   = SelectAllAddress($ord['shipping_add_id']);
    $id = $ord['id'];    
$message .= '<tr>';
$message .= '<td>'.$i.'</td>';
$message .= '<td>'.getorderProd($prod_id).'</td>';
$message .= '<td>'.$ord['product_quantity'].'</td>';
$message .= '<td>'.'$' . $ord['product_price'].'</td>';
$message .= '<td>'.'$' . ($ord['product_quantity'] * $ord['product_price']).'</td>';
$message .= '</tr>';
$sub_tot = $ord['product_quantity'] * $ord['product_price'];
$tax_status = getTaxStatusChk($comp_id);
if($tax_status == '1')
{
$tax_line = '0';    
}  else {
$tax_line = '8.875';       
}
$total = $total + $sub_tot;
$tax         = ($tax_line * ($total/100));
$i++;
Esempio n. 4
0
    $sub_name_pre = getsubN($sub_id) != '' ? getsubN($sub_id) : '';
    $sub_name = $sub_name != '' ? '>>' . $sub_name_pre : $sub_name_pre;
    ?>
                                    <tr>
                                        <td width="40" align="left" valign="middle" bgcolor="<?php 
    echo $rowColor1;
    ?>
" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-left:20px;"><?php 
    echo $i;
    ?>
</td>
                                        <td width="400" align="center" valign="middle" bgcolor="<?php 
    echo $rowColor;
    ?>
" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;"><?php 
    echo getorderProd($prod_id);
    ?>
</td>                                        
                                        <td width="80" align="right" valign="middle" bgcolor="<?php 
    echo $rowColor1;
    ?>
" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;"><?php 
    echo $ord['product_quantity'];
    ?>
</td>
                                        <td width="100" align="right" valign="middle" bgcolor="<?php 
    echo $rowColor;
    ?>
" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;">$<?php 
    echo $ord['product_price'];
    ?>
Esempio n. 5
0
$message .= '<td width="400" align="center" valign="middle" bgcolor="#f68210" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;">Description</td>';
$message .= '<td width="80" align="center" valign="middle" bgcolor="#f68210" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;">Quantity</td>';
$message .= '<td width="100" align="center" valign="middle" bgcolor="#f68210" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;">Unit Price</td>';
$message .= '<td width="110" align="center" valign="middle" bgcolor="#f68210" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;">Total</td>';
$message .= '</tr>';
$total = 0;
$i = 1;
foreach ($view_orders as $ord) {
    $rowColor   = ($i % 2 != 0) ? '#dfdfdf' : '#eeeeee';
    $rowColor1  = ($i % 2 != 0) ? '#eeeeee' : '#f6f2f2';
    $prod_id    = $ord['product_id'];
    $shipping   = SelectAllAddress($ord['shipping_add_id']);
    $id = $ord['id'];    
$message .= '<tr>';
$message .= '<td width="40" align="left" valign="middle" bgcolor="'.$rowColor1.'" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-left:20px;">'.$i.'</td>';
$message .= '<td width="400" align="center" valign="middle" bgcolor="'.$rowColor.'" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;">'.getorderProd($prod_id).'</td>';
$message .= '<td width="80" align="right" valign="middle" bgcolor="'.$rowColor1.'" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;">'.$ord['product_quantity'].'</td>';
$message .= '<td width="100" align="right" valign="middle" bgcolor="'.$rowColor.'" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;">'.'$' . $ord['product_price'].'</td>';
$message .= '<td width="110" align="right" valign="middle" bgcolor="'.$rowColor1.'" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;">'.'$' . ($ord['product_quantity'] * $ord['product_price']).'</td>';
$message .= '</tr>';
$sub_tot = $ord['product_quantity'] * $ord['product_price'];
$total = $total + $sub_tot;
$tax         = (8.875 * ($total/100));
$i++;
}
$message .= '<tr>';
$message .= '<td colspan="4" align="right" bgcolor="#eeeeee" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;"><span style="font-weight:bold;">Subtotal</span></td>';
$message .= '<td bgcolor="#eeeeee" align="right" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;">'.'$' .number_format($total, 2, '.', '').'</td>';
$message .= '</tr>';
$message .= '<tr>';
$message .= '<td colspan="4" align="right" bgcolor="#dfdfdf" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;"><span style="font-weight:bold;">Tax</span></td>';
Esempio n. 6
0
                 <td width="120" align="center" valign="middle" bgcolor="#f68210" class="brdr">Action</td>
             </tr>
             <?php
             $total = 0;
             $i = 0;
             foreach ($view_orders as $ord) {
                 $rowColor = ($i % 2 != 0) ? '#dfdfdf' : '#eeeeee';
                 $rowColor1 = ($i % 2 != 0) ? '#eeeeee' : '#f6f2f2';
                 $prod_id = $ord['product_id'];
                 $id = $ord['id'];
                 $ord_id = $ord['order_id'];
                 $ca_id = $_GET['id'];
                 ?>
                 <tr>
                     <td width="80" align="left" valign="middle" bgcolor="<?php echo $rowColor; ?>"  class="brdr pad_lft"><?php echo getorderSku($prod_id); ?></td>
                     <td width="260" align="left" valign="middle" bgcolor="<?php echo $rowColor1; ?>" class="brdr pad_lft"><?php echo $cName = getorderProd($prod_id); ?></td>
                     <td width="80" align="center" valign="middle" bgcolor="<?php echo $rowColor; ?>"  class="brdr"><?php echo $ord['product_quantity']; ?></td>
                     <td width="80" align="right" valign="middle" bgcolor="<?php echo $rowColor1; ?>"  class="brdr pad_rght"><?php echo '$' . $ord['product_price']; ?></td>
                     <td width="80" align="right" valign="middle" bgcolor="<?php echo $rowColor; ?>" class="brdr pad_rght"><?php echo '$' . ($ord['product_quantity'] * $ord['product_price']).'.00'; ?></td>
                     <td width="120" align="center" valign="middle" bgcolor="<?php echo $rowColor1; ?>"  class="brdr pad_rght">
                         <a class="fancybox fancybox.iframe" href="edit_order_product.php?id=<?php echo $prod_id; ?>&ord_id=<?php echo $ord_id; ?>&can_id=<?php echo $ca_id; ?>"><img src="images/edit.png"  alt="" width="22" height="22"/></a>
                         <a href="view_orders.php?delete_id=<?php echo $prod_id; ?>" onclick="return confirm('Are you delete this product of this order?');"><img src="images/del.png"  alt="" width="22" height="22" class="mar_lft"/></a></td>
                 </tr>
                 <?php
                 $sub_tot = $ord['product_quantity'] * $ord['product_price'];
                 $total = $total + $sub_tot;
                 $i++;
             }
             ?>
         </table></td>
 </tr>
Esempio n. 7
0
function ExtraProductsInOrder($Order_Id, $shipp_add_id, $short_msg)
{
    $sql_order_id_mail = mysql_query("SELECT id,order_id,created_date,order_number,customer_name,customer_company,deleivery_date,order_comment FROM sohorepro_order_master WHERE id = '" . $Order_Id . "' ORDER BY id DESC LIMIT 1");
    $object = mysql_fetch_assoc($sql_order_id_mail);
    $user_mail_id_txt = UserMail($object['customer_name']);
    $user_mail = array('email_id' => UserMail($object['customer_name']));
    $user_name = UserName($object['customer_name']);
    $company_name = companyName($object['customer_company']);
    $phone = companyphone($object['customer_company']);
    $billing_address = BillingAddressShippId($object['customer_company']);
    $shipp_address = CompanyAddressMail($billing_address);
    $prop = PropTest($shipping_id);
    $id = $Order_Id;
    $Order_id = $object['order_id'];
    $Order_number = $object['order_number'];
    $deleivery_date = $object['deleivery_date'];
    $comp_id = $object['customer_company'];
    $order_comm = $object['order_comment'];
    //$current_time           = date("Y-m-d h:i:s");
    $current_time = $object['created_date'];
    $datew = new DateTime($current_time, new DateTimeZone('America/New_York'));
    date_default_timezone_set('America/New_York');
    $temp_times = date("Y-m-d h:iA", $datew->format('U'));
    //$Date = date("m-d-Y", strtotime(date('Y-m-d h:i:s', time()))). ' ' .date("h:iA",strtotime("-0 minutes",strtotime($temp_times)));
    $Date = date('Y-m-d h:i A', time());
    $view_orders = viewOrders($id);
    $pick_up = $view_orders[0]['shipping_add_id'];
    $mail_id = getActiveEmail();
    $returnValue = html_entity_decode('Your Soho Repro graphics order has been received and will be processed promptly.', ENT_COMPAT, 'ISO-8859-1');
    $customer_email = array('email_id' => CompanyMail($comp_id));
    array_push($mail_id, $user_mail, $customer_email);
    $comment = 'Comment :';
    $address_3 = $shipp_address['address_3'] != '' ? $shipp_address['address_3'] . '<br>' : '';
    $mail = new PHPMailer();
    $message = '<html>';
    $message .= '<head>';
    $message .= '<title></title>';
    $message .= '<meta content="text/html;charset=iso-8859-1" http-equiv="Content-Type">';
    $message .= '</head>';
    $message .= '<body>';
    $message .= '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">';
    $message .= '<table width="780" border="0" cellspacing="0" cellpadding="0" class="padd">';
    $message .= '<tr><td>' . $short_msg . '</td></tr>';
    $message .= '</table>';
    $message .= '<table width="780" border="0" cellspacing="0" cellpadding="0" class="padd">';
    $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="760" 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"><table width="740" border="0" cellspacing="0" cellpadding="0">';
    $message .= '<tr>';
    $message .= '<td>' . $returnValue . '</br></td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td>&nbsp;</td>';
    $message .= '</tr>';
    $message .= '<tr height="30px">';
    $message .= '<td><span style="font-weight:bold;">Customer Reference :</span> ' . $Order_id . '</td>';
    $message .= '</tr>';
    $message .= '<tr height="25px">';
    $message .= '<td><span style="font-weight:bold;">Date :</span> ' . $Date . '</td>';
    $message .= '</tr>';
    $message .= '<tr height="25px">';
    $message .= '<td><span style="font-weight:bold;">Name :</span> ' . $user_name . '</td>';
    $message .= '</tr>';
    $message .= '<tr height="25px">';
    $message .= '<td><span style="font-weight:bold;">Company :</span> ' . $company_name . '</td>';
    $message .= '</tr>';
    $message .= '<tr height="25px">';
    $message .= '<td><span style="font-weight:bold;">Email :</span> ' . $user_mail_id_txt . '</td>';
    $message .= '</tr>';
    $message .= '<tr height="25px">';
    $message .= '<td><span style="font-weight:bold;">Phone :</span> ' . $phone . '</td>';
    $message .= '</tr>';
    if ($pick_up == 'P') {
        $message .= '<tr height="30px">';
        $message .= '<td><span style="font-weight:bold;">Pickup Address: </span></td>';
        $message .= '</tr>';
        $message .= '<tr>';
        $message .= '<td style="padding-bottom:7px;">Soho Reprographics<br>381 Broome Street<br>New York, NY 10013</td>';
        $message .= '</tr>';
    } else {
        $message .= '<tr height="30px">';
        $message .= '<td><span style="font-weight:bold;">Billing Address: </span></td>';
        $message .= '</tr>';
        $message .= '<tr>';
        $message .= '<td style="padding-bottom:7px;">' . $shipp_address['company_name'] . '<br>' . $shipp_address['address_1'] . '<br>' . $shipp_address['address_2'] . '<br>' . $address_3 . $shipp_address['city'] . ',&nbsp;' . StateName($shipp_address['state']) . '&nbsp;' . $shipp_address['zip'] . '</td>';
        $message .= '</tr>';
        $message .= '<tr height="25px">';
        $message .= '<td><span style="font-weight:bold;">Multiple Shipping Addresses: </span></td>';
        $message .= '</tr>';
        $multi = MultiShippingAddress($Order_Id);
        $pick_up_multi = Pickup();
        foreach ($multi as $multi_shipp) {
            $address_multi_pre = SelectIdAddress($multi_shipp['shipping_id']);
            $address_multi_1 = $address_multi_pre[0]['address_1'] != '' ? $address_multi_pre[0]['address_1'] . '<br>' : '';
            $address_multi_2 = $address_multi_pre[0]['address_2'] != '' ? $address_multi_pre[0]['address_2'] . '<br>' : '';
            $address_multi_3 = $address_multi_pre[0]['address_3'] != '' ? $address_multi_pre[0]['address_3'] . '<br>' : '';
            $check_item_id = explode(",", $multi_shipp['item_id']);
            $items_tag = $check_item_id[1] != '' ? '<span style="font-weight:bold;">Items&nbsp;:&nbsp;' . $multi_shipp['item_id'] . '<br>' : '<span style="font-weight:bold;">Item&nbsp;:&nbsp;' . $multi_shipp['item_id'] . '<br>';
            $address_for_items_pre[] = $multi_shipp['shipping_id'] != 'P' ? $items_tag . '</span><span style="font-weight:bold;">Shipping Address: </span><br>' . $address_multi_pre[0]['company_name'] . '<br>' . $address_multi_1 . $address_multi_2 . $address_multi_pre[0]['city'] . ',&nbsp;' . StateName($address_multi_pre[0]['state']) . '&nbsp;' . $address_multi_pre[0]['zip'] . '<br><br><span style="font-weight:bold;">Delivery Date :</span>' . $deleivery_date : $items_tag . '</span><span style="font-weight:bold;">Pickup Address: </span><br>' . $pick_up_multi . '<br><br><br><span style="font-weight:bold;">Delivery Date :</span>' . $deleivery_date;
        }
        $message .= '<tr><td>';
        $message .= '<table align="left">';
        for ($m = 0; $m < count($address_for_items_pre); $m += 3) {
            $message .= '<tr>
                <td>' . $address_for_items_pre[$m] . '</td>
                <td>' . $address_for_items_pre[$m + 1] . '</td>
                <td>' . $address_for_items_pre[$m + 2] . '</td>
            </tr>';
            $message .= '<tr><td>&nbsp;</td></tr>';
        }
        $message .= '</table>';
        $message .= '</td></tr>';
    }
    $message .= '</table></td>';
    $message .= '<td height="25" width="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="740" border="0" cellspacing="0" cellpadding="0" style="margin-right:-1px;">';
    $message .= '<tr style="color:#fff; text-transform:uppercase;">';
    $message .= '<td width="40" align="center" valign="middle" bgcolor="#f68210" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;">Item</td>';
    $message .= '<td width="400" align="center" valign="middle" bgcolor="#f68210" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;">Description</td>';
    $message .= '<td width="80" align="center" valign="middle" bgcolor="#f68210" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;">Quantity</td>';
    $message .= '<td width="100" align="center" valign="middle" bgcolor="#f68210" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;">Unit Price</td>';
    $message .= '<td width="110" align="center" valign="middle" bgcolor="#f68210" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;">Total</td>';
    $message .= '</tr>';
    $total = 0;
    $i = 1;
    foreach ($view_orders as $ord) {
        $rowColor = $i % 2 != 0 ? '#dfdfdf' : '#eeeeee';
        $rowColor1 = $i % 2 != 0 ? '#eeeeee' : '#f6f2f2';
        $prod_id = $ord['product_id'];
        $shipping = SelectAllAddress($ord['shipping_add_id']);
        $id = $ord['id'];
        $message .= '<tr>';
        $message .= '<td width="40" align="left" valign="middle" bgcolor="' . $rowColor1 . '" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-left:20px;">' . $i . '</td>';
        $message .= '<td width="400" align="center" valign="middle" bgcolor="' . $rowColor . '" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;">' . getorderProd($prod_id) . '</td>';
        $message .= '<td width="80" align="right" valign="middle" bgcolor="' . $rowColor1 . '" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;">' . $ord['product_quantity'] . '</td>';
        $message .= '<td width="100" align="right" valign="middle" bgcolor="' . $rowColor . '" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;">' . '$' . $ord['product_price'] . '</td>';
        $message .= '<td width="110" align="right" valign="middle" bgcolor="' . $rowColor1 . '" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;">' . '$' . number_format($ord['product_quantity'] * $ord['product_price'], 2, '.', '') . '</td>';
        $message .= '</tr>';
        $sub_tot = $ord['product_quantity'] * $ord['product_price'];
        $tax_status = getTaxStatusChk($comp_id);
        $tax_value = TaxValue();
        if ($tax_status == '1') {
            $tax_line = '0';
        } else {
            $tax_line = $tax_value;
        }
        $total = $total + $sub_tot;
        $tax = $tax_line * ($total / 100);
        $i++;
    }
    $message .= '<tr>';
    $message .= '<td colspan="2" rowspan="3" bgcolor="#eeeeee" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;"><span style="font-weight:bold;">Comment:</span><br>' . $order_comm . '</td>';
    $message .= '<td colspan="2" align="right" bgcolor="#eeeeee" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;"><span style="font-weight:bold;">Subtotal</span></td>';
    $message .= '<td bgcolor="#eeeeee" align="right" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;">' . '$' . number_format($total, 2, '.', '') . '</td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td colspan="2" align="right" bgcolor="#dfdfdf" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;"><span style="font-weight:bold;">Tax</span></td>';
    $message .= '<td bgcolor="#dfdfdf" align="right" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;">' . '$' . number_format($tax, 2, '.', '') . '</td>';
    $message .= '</tr>';
    $message .= '<tr>';
    $message .= '<td colspan="2" align="right" bgcolor="#eeeeee" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;"><span style="font-weight:bold;">Total*</span></td>';
    $message .= '<td bgcolor="#eeeeee" align="right" style="border-right:1px solid #fff; border-bottom:1px solid #fff; padding:7px 0px;padding-right:15px;">' . '$' . number_format($total + $tax, 2, '.', '') . '</td>';
    $message .= '</tr>';
    $message .= '</table></td>';
    $message .= '<td width="20" align="left" valign="top"></td>';
    $message .= '</tr>';
    $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 height="20" align="left" valign="top"></td>';
    $message .= '<td height="20" align="left" valign="top" style="padding-bottom:5px;font-size:12px;">*Delivery charges to be applied as necessary</td>';
    $message .= '<td height="20" align="left" valign="top"></td>';
    $message .= ' </tr>';
    $message .= '</table></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 .= '</table>';
    $message .= '</body>';
    $message .= '</html>';
    $final_html = html_entity_decode($message);
    //        foreach ($mail_id as $to){
    //        $subject    = "Soho Reprographic Order Acknowledgement with Extra Products";
    //        $headers    = 'From: "SohoRepro" <*****@*****.**>' . "\r\n";
    //        $headers   .= 'MIME-Version: 1.0' . "\n";
    //        $headers   .= 'Content-Type: text/html; charset=utf-8\r\n';
    //        $headers   .= 'Content-Transfer-Encoding: 8bit\r\n\r\n';
    //        $to         = $to['email_id'];
    //        //echo $to, $subject, $message, $headers;
    //        $result = mail($to, $subject, $message, $headers);
    //        }
    foreach ($mail_id as $mails_sent) {
        $pre_filt[] = $mails_sent['email_id'];
    }
    $final_list = array_unique($pre_filt);
    //        foreach ($final_list as $to){
    //        $subject  = "Order Changed by Admin for Job:".$Order_id;
    //        $headers  = 'From: "SohoRepro" <*****@*****.**>' . "\r\n";
    //        $headers .= 'MIME-Version: 1.0' . "\n";
    //        $headers .= 'Content-Type: text/html; charset=utf-8\r\n'."X-Mailer: PHP";
    //        $headers .= 'Content-Transfer-Encoding: 8bit\r\n\r\n';
    //        //$to       = $to['email_id'];
    //        //echo $to, $subject, $message, $headers;
    //        $result = mail($to, $subject, $final_html, $headers);
    //        }
    $subject = "Order Changed by Admin for Job:" . $Order_id;
    $headers = 'From: "SohoRepro" <*****@*****.**>' . "\r\n";
    $headers .= 'MIME-Version: 1.0' . "\n";
    $headers .= 'Content-Type: text/html; charset=utf-8\\r\\n' . "X-Mailer: PHP";
    $headers .= 'Content-Transfer-Encoding: 8bit\\r\\n\\r\\n';
    $to = "*****@*****.**";
    //echo $to, $subject, $message, $headers;
    $result = mail($to, $subject, $final_html, $headers);
    if ($result) {
        return '1';
    } else {
        return '0';
    }
}
Esempio n. 8
0
     <div style="width:10%;float: left;">%</div>
     <div style="width:15%;float: left;">Selling Price</div>
 </div>
 <?php
 $favorites = ALLFAV($company_id);
 if (count($favorites) > 0) {
     $k = 1;
     foreach ($favorites as $Special_Product) {
         $super_id = getsuper($Special_Product['product_id']);
         $cat_id = getcat($Special_Product['product_id']);
         $sub_id = getsub($Special_Product['product_id']);
         $super_name = (getsuperN($super_id) == '') ? '--' : getsuperN($super_id);
         $cat_name = (getcatN($cat_id) == '') ? '--' : getcatN($cat_id);
         $sub_name = (getsubN($sub_id) == '') ? '--' : getsubN($sub_id);
         $special_id = $Special_Product['sp_id'];
         $product_name = (getorderProd($Special_Product['product_id']) == '') ? '--' : getorderProd($Special_Product['product_id']);
         $list_price = $Special_Product['list_price'];
         $discount_price = $Special_Product['discount_price'];
         $sell_price = $Special_Product['sell_price'];
         ?>
         <div style="width: 99.5%;float: left;margin-bottom: 5px;">
             <div style="width:7%;float: left;"><?php echo $k; ?></div>
             <div style="width:12%;float: left;"><?php echo $super_name; ?></div>
             <div style="width:12%;float: left;"><?php echo $cat_name; ?></div>
             <div style="width:12%;float: left;"><?php echo $sub_name; ?></div>
             <div style="width:19%;float: left;"><?php echo $product_name; ?></div>
             <div style="width:12%;float: left;"><?php echo $list_price; ?></div>
             <div style="width:10%;float: left;"><?php echo $discount_price; ?></div>
             <div style="width:15%;float: left;"><?php echo $sell_price; ?></div>
         </div>
         <?php