示例#1
0
文件: routes.php 项目: fagray/fposs
    print $date = '2015-02-03' . ' <Br>';
    return substr($date, 8, 2);
    // return Carbon::yesterday()->endOfDay();
    // return (new Sale)->getYesterdaysBestSeller();
    // return Carbon::create(2015,2,3,0)->startOfDay();
    // return Carbon::create(2015-08-26 23:06:20)->endOfDay();
    // return $prod->getCurrentProduction()->toArray();
    return Auth::user()->role;
    if (Auth::attempt(array('password' => 'raymund123'))) {
        return 'true';
    } else {
        return 'false';
    }
    // return 10 + -10;
    // return Item::find(1)->cart;
    $temp = TempCart::all()->toArray();
    $item = Item::where('barcode', '=', '900110023')->get()->toArray();
    // return TempCart::all();
    return json_encode(array_merge($temp, $item));
    return DNS1D::getBarcodeHTML('123456789', "EAN13", 2, 60);
    $production = Production::find(2);
    return $production->items;
});
Route::get('test/{trans_id}', ['uses' => 'SalesController@printInvoice']);
Route::get('sample/{code}', ['uses' => 'SalesController@processOrder']);
Route::get('/item/findbyname/{name}', ['uses' => 'ItemsController@findByName']);
Route::group(array('before' => 'auth'), function () {
    Route::get('/', ['as' => 'home', 'uses' => 'BaseController@index']);
    // Route::get('/',function(){
    // 	return View::make('index')
    // 		->with('title',"Flibbys Point of Sale System");
示例#2
0
?>
" alt="<?php 
echo $products->fldProductsName;
?>
" width="88">
                </dt>
                <dd>
                    <big>$<?php 
echo number_format($products->fldProductsPrice, 2);
?>
</big>
                    <a href="products-details-<?php 
echo $products->fldProductsId;
?>
.html" class=details>View Details</a> &nbsp; 
                    <? $optionExists = TempCart::checkProductOption($products->fldProductsId);?>
                    <? if ($optionExists==0): ?>
                    <a href="shopping-cart-product-<?php 
echo $products->fldProductsId;
?>
.html" class=cart>Add to Cart</a>
                    <? endif; ?>
                    <h3><?php 
echo $products->fldProductsName;
?>
</h3>
                    <?php 
echo substr($products->fldProductsOverview, 0, 75);
?>
 [...]
                </dd>
示例#3
0
    $client_id = session_id();
}
if (isset($_POST['login'])) {
    //check if the login information is valid
    $_POST = sanitize($_POST);
    $client = $_POST;
    settype($client, 'object');
    if (Client::checkLogin($client) == 1) {
        $_SESSION['logged_in'] = true;
        $clients = Client::getInfo($client);
        $_SESSION['client_id'] = $clients->fldClientID;
        $xclient = session_id();
        $condition = "fldTempCartClientID='{$xclient}'";
        if (TempCart::countTempcartbyCondition($condition) >= 1) {
            //change the client id
            TempCart::updateTempcartClient($_SESSION['client_id'], $xclient);
            $links = $ROOT_URL . 'billing-info.html';
            header("Location: {$links}");
        } else {
            $links = $ROOT_URL . 'account-information.php';
            header("Location: {$links}");
        }
    } else {
        $error = "Invalid username or password";
    }
}
?>

<? startblock('section') ?>
<aside>
	<?php 
<? 
	if(isset($_POST['submit_bill'])) {
		//update the member information
		$_POST = sanitize($_POST);
		$client = $_POST;
		settype($client,'object');
		$client_id = Client::addClient($client);
		$_SESSION['client_id'] = $client_id;
		//update the TempCart
		$xclient = session_id();
		$condition = "fldTempCartClientID='$xclient'";
		if(TempCart::countTempcartbyCondition($condition)>=1) {
			//change the client id
			TempCart::updateTempcartClient($client_id,$xclient);
		}
		
		
		if (isset($_POST['chkShip'])) {
				if(Shipping::countShippingClient($client_id)==0) {
					$_POST = sanitize($_POST);
					$shipping = $_POST;
					settype($shipping,'object');
					$shipping->client_id = $client_id;
					$shipping = Shipping::addShipping($shipping); 
				} else {
					$shippings = Shipping::findShippingClient($client_id);
					$_POST = sanitize($_POST);
					$shipping = $_POST;
					settype($shipping,'object');
					$shipping->Id = $shippings->fldShippingID;