예제 #1
0
 public function showVendor($username)
 {
     // menampilkan halaman vendor berdasarkan nama
     $vendor = Stand::where('username', $username)->first();
     $listMenu = Menu::where('idStand', $vendor['idStand'])->get();
     $data = array('vendor' => $vendor, 'listMenu' => $listMenu);
     return View::make('vendor-home', $data);
 }
예제 #2
0
 public function orderDelivered($idTransaksi)
 {
     $orderDelivered = Transaksi::where('idTransaksi', $idTransaksi)->first();
     $orderDelivered->statustransaksi = 'terkirim';
     $standDelivered = Stand::where('idStand', $orderDelivered->idStand)->first();
     $standDelivered->saldo = $standDelivered->saldo + $orderDelivered->hargaTotal;
     $orderDelivered->save();
     $standDelivered->save();
     return Redirect::to('user/admin');
 }
예제 #3
0
 public function showHome()
 {
     // menampilkan home, GET DATA SELURUH STAND
     $listStand = Stand::get();
     $data = array('listStand' => $listStand);
     if (Session::has('user')) {
         if (Session::get('status') == "stand") {
             return Redirect::to('vendor-admin');
         }
     }
     return View::make('home', $data);
 }
예제 #4
0
									<input type="hidden" name="idBarang" id="idBarang">
								</form>
							</div>
							<form class="form" method="POST" action="{{url('/saveMenu')}}">
								<input type="hidden" name="_token" value="{{csrf_token()}}">
								<div class="form-group">
									<input type="text" onchange="showVal(this.value)" name="id_product" id="id_product" placeholder="Product ID" class="form-controller form-control" >
								
									<input type="text" name="product_name" id="product_name" placeholder="Name of Product" class="form-controller form-control">
								
									<input type="text" name="price" id="price" placeholder="Price" class="form-controller form-control">
								
									<input type="text" name="stock" id="stock" placeholder="Stock" class="form-controller form-control">

									<?php 
$idStand = Stand::where('username', Session::get('user'))->first();
?>
									<input type="hidden" name="idtoko" value="<?php 
echo $idStand->idStand;
?>
">
								</div>
								<button class="btn btn-primary" id="submit2">Add Product</button>
							</form>
						</div>
					</center>
				</div>
			</div>
		</div>
	</div>
예제 #5
0
<div class="container-fluid">
	<nav class="navbar navbar-default navbar-fixed-top">
		<!-- Brand and toggle get grouped for better mobile display -->
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="{{ url() }}">TELMOP</a>
		</div>

		<?php 
$standLoggedIn = Stand::where('username', Session::get('user'))->first();
?>
		<!-- Collect the nav links, forms, and other content for toggling -->
		<div class="collapse navbar-collapse navbar-ex1-collapse">
			<ul class="nav navbar-nav navbar-right">
				@if(Session::has('user'))
					<li><a><?php 
echo Session::get('user');
?>
</a></li>
						@if(Session::get('status') != 'kasir')
						<li><a href="{{ url() }}/vendor-admin/myMenu">My Menu</a></li>
						<li><a href="#">Saldo Rp {{$standLoggedIn->saldo}}</a></li>
						<li><a href="#">Waiting List 
							<span class="badge">
							<?php 
$menuOrdered = Transaksi::where('idStand', $standLoggedIn->idStand)->where('statustransaksi', 'prepare')->get();
예제 #6
0
$artesano = new Artesano();
if (!isset($_SESSION["USER"])) {
    ?>
			<script type="text/javascript">
				alert("No tienes permiso para ver este contenido");
			</script>
			<META http-equiv="Refresh" content="0,url=index.php">
		<?php 
} else {
    if ($_SESSION["ROL"] == "Artesano") {
        $artesano->setIdArtesano($_SESSION["ID"]);
        $list = $adao->searchMatching($conn, $artesano);
        $artesano = $list[0];
        $artesano = $adao->encodificaraUTF($artesano);
        $lista = $sdao->loadAll($conn);
        $busqueda = new Stand();
        $busqueda->setIdartesano($_SESSION["ID"]);
        //Lógica de control de si ha reservado algún stand
        $stands = $sdao->searchMatching($conn, $busqueda);
        $mostrar1 = true;
        $mostrar2 = true;
        $mostrar3 = true;
        if (count($stands) > 0) {
            for ($i = 0; $i < count($stands); $i++) {
                if (0 < $stands[$i]->getIdstand() && $stands[$i]->getIdstand() < 61) {
                    $mostrar1 = false;
                    echo "Stand en el evento 1 reservado";
                } elseif (60 < $stands[$i]->getIdstand() && $stands[$i]->getIdstand() < 81) {
                    $mostrar2 = false;
                    echo "Stand en el evento 2 reservado";
                } else {
예제 #7
0
 /**
  * Clone will return identical deep copy of this valueObject.
  * Note, that this method is different than the clone() which
  * is defined in java.lang.Object. Here, the retuned cloned object
  * will also have all its attributes cloned.
  */
 function cloneObject()
 {
     $cloned = new Stand();
     $cloned->setIdStand($this->idStand);
     $cloned->setIdArtesano($this->idArtesano);
     $cloned->setReservado($this->reservado);
     return $cloned;
 }