Ejemplo n.º 1
1
<?php

$total = 0;
$pm = PaymethodData::getById($_POST["paymethod_id"]);
$iva = ConfigurationData::getByPreffix("general_iva")->val;
$coin_symbol = ConfigurationData::getByPreffix("general_coin")->val;
$ivatxt = ConfigurationData::getByPreffix("general_iva_txt")->val;
?>
<div class="container">
	<div class="row">

		<div class="col-md-12">
			<?php 
if (!isset($_SESSION["client_id"])) {
    ?>
				<p class="alert alert-danger">Debes registrarte e iniciar sesion para proceder.</p>
			<?php 
}
?>
		</div>
</div>

	<div class="row">

		<div class="col-md-12">
			<?php 
if (isset($_SESSION["cart"]) && count($_SESSION["cart"] > 0)) {
    ?>
		<h2>Confirmacion de compra</h2>
		<h4>Metodo de pago: <b><?php 
    echo $pm->name;
Ejemplo n.º 2
0
<?php

$product = ProductData::getById($_GET["product_id"]);
$url = "storage/products/{$product->image}";
$coin = ConfigurationData::getByPreffix("general_coin")->val;
?>

        <!-- Main Content -->

          <div class="row">
            <div class="col-md-12">
  <!-- Button trigger modal -->
            <h2><?php 
echo $product->name;
?>
 <small>Editar</small></h2>
            <?php 
// print_r($_SESSION);
if (isset($_SESSION["product_updated"])) {
    ?>
              <p class="alert alert-info"><i class="fa fa-check"></i> Producto Actualizado Exitosamente</p>
            <?php 
    unset($_SESSION["product_updated"]);
}
?>
            </div>
            </div>
          <div class="row">
            <div class="col-md-12">
              <div class="panel panel-default">
                <div class="panel-heading">
Ejemplo n.º 3
0
    $buy->coupon_id = isset($_SESSION["coupon"]) ? $_SESSION["coupon"] : "NULL";
    $buy->client_id = $_SESSION["client_id"];
    $buy->paymethod_id = $_POST["paymethod_id"];
    $buy->status_id = 1;
    $b = $buy->add();
    foreach ($_SESSION["cart"] as $c) {
        $p = new BuyProductData();
        $p->buy_id = $b[1];
        $p->product_id = $c["product_id"];
        $p->q = $c["q"];
        $p->add();
    }
    /////////////////////////////////////////////////////////////////////////////////////////////////
    ///////////////////////////////////// Emailing
    $client = ClientData::getById($_SESSION["client_id"]);
    $adminemail = $paypal_business = ConfigurationData::getByPreffix("general_main_email")->val;
    $replymessage = '
<meta content="es-mx" http-equiv="Content-Language" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<body>
<h2>Tienda en Linea</h2>
<h3>Compra Pendiente</h3>
<p><span class="style3"><strong>Estimado ' . $client->getFullname() . '</strong></span></p>
<p>Se a agregado una compra a tu lista de pendientes, te invitamos a seguir el procedimiento de pago correspondiente para recibir tus productos.</p>
<p>Gracias por tu compra.</p>
<hr>
<p>Powered By <a href="http://evilnapsis.com/product/katana/" target="_blank"> Katana PRO</a></p>
</body>';
    $products = BuyProductData::getAllByBuyId($b[1]);
    $data = "";
    $total = 0;
Ejemplo n.º 4
0
<?php

$settings = ConfigurationData::getAll();
$paymethods = PaymethodData::getAll();
?>
        <!-- Main Content -->
          <div class="row">
            <div class="col-md-12">

            <h1>Metodos de Pago</h1>
            <a href="./?view=settings" class="btn btn-default">General</a>
            <a href="./?view=payment_settings" class="btn btn-default">Metodos de Pago</a>
            </div>
            </div>
<br>
          <div class="row">
            <div class="col-md-12">

              <div class="panel panel-default">
                <div class="panel-heading">
                  <i class="fa fa-usd"></i> Metodos de Pago
                </div>
                    <table class="table table-bordered">
                      <tbody>
                      <?php 
foreach ($paymethods as $pay) {
    ?>
                        <tr>
                        <td><?php 
    echo $pay->name;
    ?>
Ejemplo n.º 5
0
<?php

$coin_symbol = ConfigurationData::getByPreffix("general_coin")->val;
$img_default = ConfigurationData::getByPreffix("general_img_default")->val;
$cnt = 0;
$slides = SlideData::getPublics();
$featureds = ProductData::getFeatureds();
?>
<section>
  <div class="container">

  <div class="row">

  <div class="col-md-12">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
        <?php 
if (count($slides) > 0) {
    ?>

    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
      <!-- Indicators -->
      <ol class="carousel-indicators">
<?php 
    foreach ($slides as $s) {
        ?>
        <li data-target="#carousel-example-generic" data-slide-to="<?php 
        echo $cnt;
        ?>
" class="<?php 
        if ($cnt == 0) {
            echo "active";
Ejemplo n.º 6
0
 function ImprovedTable($data)
 {
     $iva = ConfigurationData::getByPreffix("general_iva")->val;
     $iva_txt = ConfigurationData::getByPreffix("general_iva_txt")->val;
     $coin = ConfigurationData::getByPreffix("general_coin")->val;
     $service = BuyData::getByCode($_GET["code"]);
     $products = BuyProductData::getAllByBuyId($service->id);
     $client = ClientData::getById($service->client_id);
     $this->setY(31);
     $this->setX(20);
     $this->setY(31);
     $this->setX(20);
     $this->SetFont('Arial', 'B', 8);
     $this->setY(33);
     $this->setX(20);
     $this->setY(40);
     $this->setX(20);
     $this->SetFont('Arial', 'B', 8);
     //         $this->Cell(0,35,"",1);
     $this->setY(38);
     $this->setX(20);
     $this->Cell(0, 10, " NOMBRE:        " . $client->getFullname());
     $this->setY(43);
     $this->setX(20);
     $this->Cell(0, 10, " DIRECCION:        " . $client->address);
     $this->setY(48);
     $this->setX(20);
     $this->Cell(0, 10, "TEL:      " . $client->phone);
     $this->setY(53);
     $this->setX(20);
     $this->setY(80);
     $this->setX(20);
     $this->SetFont('Arial', '', 14);
     $this->Cell(0, 10, " DETALLES DE LA COMPRA ");
     $this->SetFont('Arial', 'B', 10);
     $starty = 0;
     $total = 0;
     //    $inventary_item = InventaryData::getAllBySII($service->id,$ii->id);
     $this->setY(95 + $starty);
     $this->setX(20);
     //// omito el super trabajo
     ///         $this->Cell(0,10,strtoupper($w->getWork()->name));
     $this->setY(95 + $starty);
     $this->setX(65);
     //         $starty+=5;
     //////////////////////// materiales
     if (count($products)) {
         $starty += 5;
         foreach ($products as $itemx) {
             $item = $itemx->getProduct();
             $mtx = null;
             $this->setY(95 + $starty);
             $this->setX(20);
             $this->Cell(0, 10, strtoupper($itemx->q));
             $this->setX(30);
             $this->Cell(0, 10, strtoupper($item->getUnit()->name));
             $this->setX(50);
             $this->Cell(0, 10, strtoupper($item->name));
             $this->setX(180);
             $this->Cell(0, 10, utf8_decode($coin) . " " . number_format($item->price, 2, ".", ","));
             $total += $itemx->q * $item->price;
             $this->setY(95 + $starty);
             $this->setX(65);
             $starty += 5;
         }
     }
     $starty += 5;
     ///////////////////////////////////////////////////////////// Total
     $this->SetFont('Arial', '', 12);
     $this->setY(125 + $starty);
     $this->setX(20);
     $this->Cell(0, 10, "SubTotal:          " . utf8_decode($coin) . " " . number_format($total * (1 - $iva / 100), 2, ".", ","));
     $starty += 5;
     $this->setY(125 + $starty);
     $this->setX(20);
     $this->Cell(0, 10, "{$iva_txt}:                   " . utf8_decode($coin) . " " . number_format($total * ($iva / 100), 2, ".", ","));
     $starty += 5;
     $this->setY(125 + $starty);
     $this->setX(20);
     $this->Cell(0, 10, "Total:                 " . utf8_decode($coin) . " " . number_format($total, 2, ".", ","));
     /////////////////////////////////////////////////////////////
     ////////////////////////////////////////////////////
 }
Ejemplo n.º 7
0
            if ($check_all_patterns) {
                $patterns[4] = '/\\r/';
                $patterns[5] = '/\\n/';
                $patterns[6] = '/%0a/';
                $patterns[7] = '/%0d/';
            }
            //NOTE: can use str_ireplace as this is case insensitive but only available on PHP version 5.0.
            return preg_replace($patterns, "", strtolower($value));
        }
        $name = clean_input_4email($_POST["name"]);
        $lastname = clean_input_4email($_POST["lastname"]);
        $email = clean_input_4email($_POST["email"]);
        $address = clean_input_4email($_POST["address"]);
        $phone = clean_input_4email($_POST["phone"]);
        //						$message = clean_input_4email($_POST["message"], false);
        $adminemail = ConfigurationData::getByPreffix("general_main_email");
        $replyemail = $adminemail;
        $success_sent_msg = '
<body style="background:#2b2b2b; text-align:center; margin-top:40px">
Registro exitoso.
</body>

';
        $replymessage = '
<meta content="es-mx" http-equiv="Content-Language" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


<body>

<p><span class="style3"><strong>Estimado ' . $name . '</strong></span></p>
Ejemplo n.º 8
0
<div class="row">
<div class="col-md-12">
<h1>Configuracion</h1>

<?php 
$configurations = ConfigurationData::getAll();
?>

<?php 
if (count($configurations) > 0) {
    ?>
<br>
<table class="table table-bordered">
<thead>
	<th>Clave</th>
	<th>Valor</th>
</thead>
<?php 
    foreach ($configurations as $conf) {
        ?>
<tr>
	<td><?php 
        echo $conf->name;
        ?>
</td>
	<td>
		<?php 
        if ($conf->kind == 1) {
            // es boolean
            ?>
			<input type="checkbox" name="<?php 
Ejemplo n.º 9
0
<?php

// print_r($_POST);
if (isset($_SESSION["admin_id"]) && !empty($_POST)) {
    foreach ($_POST as $p => $k) {
        ConfigurationData::updateValFromName($p, $k);
    }
    Core::redir("./?view=settings");
} else {
    Core::redir("./");
}