Example #1
0
function processOrder($address, $cardType, $cardnumber, $duedate, $ownerId)
{
    $uid = logedUid();
    $date = date('d.m.y - H:m');
    $recite = '';
    $slogen = __('B.R L.T.D - 12345678');
    $anounce = __('Tax Invoice / recite');
    $status = __('Copy');
    $tableHeader['iname'] = __('Item Name');
    $tableHeader['Quantitiy'] = __('Quantitiy');
    $tableHeader['uprice'] = __('Unit Price');
    $tableHeader['total'] = __('Price');
    global $db;
    $data['uid'] = $uid;
    $data['total'] = getCartValue();
    $qid = $db->insert('orders', $data);
    $transactionid = $qid;
    $recite .= <<<EOF
\t\t\t<div id="recite">
\t\t\t\t<div id="reciteheader">
\t\t\t\t\t<div class="date">{$date}</div>
\t\t\t\t\t<div class="slogen">{$slogen}</div>
\t\t\t\t\t<div class="anounce">{$anounce} : {$transactionid} - {$status} </div>
\t\t\t\t</div>
\t\t\t\t<div id="recitebody">
\t\t\t\t<table id="myCart">
\t\t\t\t\t<thead>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<th>{$tableHeader['iname']}</th>
\t\t\t\t\t\t<th>{$tableHeader['Quantitiy']}</th>\t\t\t\t\t
\t\t\t\t\t\t<th>{$tableHeader['uprice']}</th>
\t\t\t\t\t\t<th>{$tableHeader['total']}</th>\t\t\t\t\t\t
\t\t\t\t\t</tr>
\t\t\t\t\t</thead>
\t\t\t\t\t<tbody>
\t\t\t\t\t\t
\t\t\t\t\t
\t\t\t\t
EOF;
    $recite .= printRecite();
    $recite .= <<<EOF
\t\t\t\t</tbody>
\t\t\t\t</table>
\t\t\t\t<div id="reciteFooter">
\t\t\t\t\t
\t\t\t\t

EOF;
    $recite .= sprintf(__('Paid with credit Card ending with %s'), substr($cardnumber, -4, 4));
    $recite .= <<<EOF
\t\t\t\t
\t\t\t\t
\t\t\t\t</div>
\t\t\t\t
\t\t\t\t
\t\t\t\t</div>
\t\t\t</div></div>

EOF;
    $data['dump'] = $recite;
    $db->update('orders', $data, "`orderid` = {$qid}");
    $recite = str_replace(__('Copy'), __('Original'), $recite);
    clearCart();
    return $recite;
}
Example #2
0
_e('Check Out');
?>
</h2>
			<div id="content">
				<form id="checkoutform" method="POST" name="order_form" action="<?php 
echo HOME;
?>
recite">
					<p>						
						<label for="address"><?php 
_e('Select Your Address');
?>
</label>
						<select id="address" name = "address" >
							<?php 
echo getAddressOptionList(logedUid());
?>
						</select>				
					</p>

					<p>						
						<label for="cardType"><?php 
_e('Credit Card Type');
?>
</label>
						<select id="cardType" name = "cardType" >
							<option value="1"><?php 
_e('Visa');
?>
</option>
							<option value="2"><?php 
Example #3
0
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *      
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */
if (isset($_POST['form_submit']) && $_POST['form_submit'] == "11234") {
    $cid = $_POST['cityselect'];
    $sid = $_POST['streetselect'];
    $hn = $_POST['homenumber'];
    $fn = $_POST['floor'];
    $uid = logedUid();
    if (is_numeric($cid) && is_numeric($sid) && is_numeric($hn) && is_numeric($fn) && is_numeric($uid)) {
        addAddress($uid, $cid, $sid, $hn, $fn);
    } else {
        $notice = __('You did something wrong');
    }
}
get_top_nav();
//Call the navigation
?>


<div id="wrap">
	<div id="widecb">
		<div id="additemnav">
			<ul>