Exemplo n.º 1
0
    function GetOrderInfo($orderid,$line=null)
    {
        global $par;
        
        $orderarr = Array();
        
        if($line==null)
        {
            $sql = "SELECT * FROM $par->orderstable WHERE `id`=$orderid";
            $res = mysql_query($sql);
            $line = mysql_fetch_array($res,MYSQL_ASSOC);
        }
        $orderarr['orderid'] = $line['id'];
        $orderarr['date'] = $line['date'];
        $orderarr['allsum'] = $line['allsum'];
	    $orderarr['orderstatus'] = GetStatusName($line['orderstatus']);
        $orderarr['products'] = Array();
        $orderarr['userid'] = $line['userid'];
        $orderarr['email'] = $line['email'];
        $orderarr['phone'] = $line['phone'];
        $orderarr['name'] = $line['name'];
        $orderarr['address'] = $line['address'];        
        
                    $kk=0;
                    $orderstr = $line['orderstr'];
                    $oarr = explode(':',$orderstr);
                    //Debug($oarr);
                    for($i=1;$i<count($oarr)-1;$i++)
                    {
                        $s = $oarr[$i];
                        $sarr = explode(';',$s);
                        $key = $sarr[0];
                        $value = $sarr[1];
			            $oldprice = $sarr[2];
                        
                        if($value>0)
                        {
                            $oneproduct = Array();

            			    $kk++;

            			    $product = GetProductInfo($key);
            			    $product['_order_price'] = $oldprice;
            			    $product['_order_value'] = $value;
                            //Debug($product);

            			    $orderarr['products'][] = $product;
                        }
                        
                    }
	//Debug($orderarr);
	return $orderarr;
    }
Exemplo n.º 2
0
                    echo '<table cellSpacing="1" cellPadding="3" width="99%"  border="0" class="caborder1" >
                    <tr>
                    <td align="center" ><b>Номер заказа</b></td>
                    <td align="center" ><b>Дата</b></td>
                    <td align="center" ><b>Сумма</b></td>
                    <td align="center" width="80"><b>Статус</b></td>
                    </tr>
                    ';

                    echo '<TR>
                    <TD vAlign=center align="center" width="90"><A>'.htmlspecialchars($line['id']).'</A></TD>
                    <TD vAlign=center align="center" width="90"><A>'.date("d.m.Y",$line['date']).'</A></TD>
                    <TD vAlign=center align="center" width="50"><A>'.htmlspecialchars($line['allsum']).' руб.</A></TD>
                    ';

		    $status = GetStatusName($line['orderstatus']);

                    echo '<td title="Статус" align="center" >'.$status.'</td>';

                    echo '
                    </tr>
                    ';
                    
                    echo '</table>';



		    echo '
                    <div class="m_korzina">
                        <table width="100%" cellpadding="0" cellspacing="0" class="caborder2" >
                        <tr>
Exemplo n.º 3
0
        ?>
                                <tr>
                                  <td><?php 
        echo htmlspecialchars($line['id']);
        ?>
</td>
                                  <td><?php 
        echo date("d.m.Y", $line['date']);
        ?>
</td>
                                  <td><?php 
        echo htmlspecialchars($line['allsum']);
        ?>
 грн.</td>
                                  <td><?php 
        echo GetStatusName($line['orderstatus']);
        ?>
</td>
                                </tr>
                            <?php 
    }
    ?>
                            </tbody>
                            <tfoot>
                              <tr style="background-color: #EFEEEB;">
                                <td class="all" colspan="2" style="border-left-width: 2px; border-bottom-width: 2px; border-color: #EFEEEB;">Всего</td>
                                <td style="border-bottom-width: 2px; border-bottom-color: #EFEEEB;"><?php 
    echo $sum;
    ?>
 грн.</td>
                                <td style="background-color: #fff;"></td>
Exemplo n.º 4
0
$currrow++;
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0,$currrow, '(ID) Заказа');
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1,$currrow, $orderarr['orderid']);

$currrow++;
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0,$currrow, 'Дата');
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1,$currrow, date("d.m.Y h:i",$orderarr['date']));

$currrow++;
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0,$currrow, 'Сумма');
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1,$currrow, $orderarr['allsum']);

$currrow++;
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0,$currrow, 'Статус заказа');
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1,$currrow, GetStatusName($orderarr['orderstatus']));

$currrow++;
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0,$currrow, 'Пользователь (ID)');
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1,$currrow, $orderarr['userid']);

$currrow++;
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0,$currrow, 'Пользователь');
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1,$currrow, $orderarr['name']);

$currrow++;
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0,$currrow, 'Email');
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1,$currrow, $orderarr['email']);

$currrow++;
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0,$currrow, 'Телефон');