Exemplo n.º 1
0
 public function updateAction()
 {
     $criteria = new Criteria("person");
     $person = PersonData::getById($_POST["id"]);
     $criteria->update(array("no" => "\"{$_POST['no']}\"", "name" => "\"{$_POST['name']}\"", "lastname" => "\"{$_POST['lastname']}\"", "job" => "\"{$_POST['job']}\"", "phone1" => "\"{$_POST['phone1']}\"", "phone2" => "\"{$_POST['phone2']}\"", "address1" => "\"{$_POST['address1']}\"", "address2" => "\"{$_POST['address2']}\"", "email1" => "\"{$_POST['email1']}\"", "email2" => "\"{$_POST['email2']}\"", "team_id" => "\"{$_POST['team_id']}\"", "category_id" => "\"{$_POST['category_id']}\""), "id=" . $_POST["id"]);
     Core::redir("./?r=index/people");
 }
Exemplo n.º 2
0
        echo $product->id;
        ?>
" class="btn btn-danger"><i class="glyphicon glyphicon-remove"></i> Cancelar</a></td>
</tr>

<?php 
    }
    ?>
</table>
<form method="post" class="form-horizontal" id="processsell" action="index.php?view=processsell">
<h2>Resumen</h2>
<div class="form-group">
    <label for="inputEmail1" class="col-lg-2 control-label">Cliente</label>
    <div class="col-lg-10">
    <?php 
    $clients = PersonData::getClients();
    ?>
    <select name="client_id" class="form-control">
    <option value="">-- NINGUNO --</option>
    <?php 
    foreach ($clients as $client) {
        ?>
    	<option value="<?php 
        echo $client->id;
        ?>
"><?php 
        echo $client->name . " " . $client->lastname;
        ?>
</option>
    <?php 
    }
Exemplo n.º 3
0
<?php

$persons = PersonData::getAll();
?>
      <div class="page-content">

        <!-- Header Bar -->
<?php 
Action::load("header");
?>
        <!-- End Header Bar -->

          <div class="row">
            <div class="col-lg-12">
<a href="./?r=team/newclient" class="btn btn-default pull-right">Agregar Persona</a>
            <h1>Personas</h1>
<?php 
if (count($persons) == 0) {
    ?>
  <p class="alert alert-danger">No hay personas</p>
<?php 
}
?>
              <div class="widget">
                <div class="widget-title">
                  <i class="fa fa-th-list"></i> Personas
                </div>
                <div class="widget-body no-padding">

                  <div class="table-responsive">
<?php 
Exemplo n.º 4
0
<?php

if (count($_POST) > 0) {
    $user = PersonData::getById($_POST["user_id"]);
    $user->name = $_POST["name"];
    $user->lastname = $_POST["lastname"];
    $user->address1 = $_POST["address1"];
    $user->email1 = $_POST["email1"];
    $user->phone1 = $_POST["phone1"];
    $user->update_client();
    print "<script>window.location='index.php?view=clients';</script>";
}
Exemplo n.º 5
0
<?php

include "../core/autoload.php";
include "../core/modules/index/model/PersonData.php";
require_once '../PhpWord/Autoloader.php';
use PhpOffice\PhpWord\Autoloader;
use PhpOffice\PhpWord\Settings;
Autoloader::register();
$word = new PhpOffice\PhpWord\PhpWord();
$clients = PersonData::getProviders();
$section1 = $word->AddSection();
$section1->addText("PROVEEDORES", array("size" => 22, "bold" => true, "align" => "right"));
$styleTable = array('borderSize' => 6, 'borderColor' => '888888', 'cellMargin' => 40);
$styleFirstRow = array('borderBottomColor' => '0000FF', 'bgColor' => 'AAAAAA');
$table1 = $section1->addTable("table1");
$table1->addRow();
$table1->addCell()->addText("Nombre");
$table1->addCell()->addText("Direccion");
$table1->addCell()->addText("Email");
$table1->addCell()->addText("Telefono");
foreach ($clients as $client) {
    $table1->addRow();
    $table1->addCell(5000)->addText($client->name . " " . $client->lastname);
    $table1->addCell(2500)->addText($client->address1);
    $table1->addCell(2000)->addText($client->email1);
    $table1->addCell(2000)->addText($client->phone1);
}
$word->addTableStyle('table1', $styleTable, $styleFirstRow);
/// datos bancarios
$filename = "providers-" . time() . ".docx";
#$word->setReadDataOnly(true);
Exemplo n.º 6
0
<?php

$user = PersonData::getById($_GET["id"]);
?>
<div class="row">
	<div class="col-md-12">
	<h1>Editar Cliente</h1>
	<br>
		<form class="form-horizontal" method="post" id="addproduct" action="index.php?view=updateclient" role="form">


  <div class="form-group">
    <label for="inputEmail1" class="col-lg-2 control-label">Nombre*</label>
    <div class="col-md-6">
      <input type="text" name="name" value="<?php 
echo $user->name;
?>
" class="form-control" id="name" placeholder="Nombre">
    </div>
  </div>
  <div class="form-group">
    <label for="inputEmail1" class="col-lg-2 control-label">Apellido*</label>
    <div class="col-md-6">
      <input type="text" name="lastname" value="<?php 
echo $user->lastname;
?>
" required class="form-control" id="lastname" placeholder="Apellido">
    </div>
  </div>
  <div class="form-group">
    <label for="inputEmail1" class="col-lg-2 control-label">Direccion*</label>
Exemplo n.º 7
0
<?php

if (count($_POST) > 0) {
    $user = new PersonData();
    $user->name = $_POST["name"];
    $user->lastname = $_POST["lastname"];
    $user->address1 = $_POST["address1"];
    $user->email1 = $_POST["email1"];
    $user->phone1 = $_POST["phone1"];
    $user->add_provider();
    print "<script>window.location='index.php?view=providers';</script>";
}
Exemplo n.º 8
0
<?php

if (count($_POST) > 0) {
    $user = new PersonData();
    $user->name = $_POST["name"];
    $user->lastname = $_POST["lastname"];
    $user->address1 = $_POST["address1"];
    $user->email1 = $_POST["email1"];
    $user->phone1 = $_POST["phone1"];
    $user->add_client();
    print "<script>window.location='index.php?view=clients';</script>";
}
Exemplo n.º 9
0
              <p>Clientes</p>
            </div>
            <div class="icon">
              <i class="ion ion-stats-bars"></i>
            </div>
            <a href="./?view=clients" class="small-box-footer">Ver mas <i class="fa fa-arrow-circle-right"></i></a>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-yellow">
            <div class="inner">
              <h3><?php 
echo count(PersonData::getProviders());
?>
</h3>

              <p>Proveedores</p>
            </div>
            <div class="icon">
              <i class="ion ion-person-add"></i>
            </div>
            <a href="./?view=providers" class="small-box-footer">Ver mas <i class="fa fa-arrow-circle-right"></i></a>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-red">
Exemplo n.º 10
0
<?php

$client = PersonData::getById($_GET["id"]);
$client->del();
Core::redir("./index.php?view=providers");
Exemplo n.º 11
0
 public function getPerson()
 {
     return PersonData::getById($this->person_id);
 }
Exemplo n.º 12
0
	<div class="col-md-12">
<div class="btn-group pull-right">
	<a href="index.php?view=newclient" class="btn btn-default"><i class='fa fa-smile-o'></i> Nuevo Cliente</a>
<div class="btn-group pull-right">
  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
    <i class="fa fa-download"></i> Descargar <span class="caret"></span>
  </button>
  <ul class="dropdown-menu" role="menu">
    <li><a href="report/clients-word.php">Word 2007 (.docx)</a></li>
  </ul>
</div>
</div>
		<h1>Directorio de Clientes</h1>
<br>
		<?php 
$users = PersonData::getClients();
if (count($users) > 0) {
    // si hay usuarios
    ?>

			<table class="table table-bordered table-hover">
			<thead>
			<th>Nombre completo</th>
			<th>Direccion</th>
			<th>Email</th>
			<th>Telefono</th>
			<th></th>
			</thead>
			<?php 
    foreach ($users as $user) {
        ?>
Exemplo n.º 13
0
	<div class="col-md-12">
<div class="btn-group pull-right">
	<a href="index.php?view=newprovider" class="btn btn-default"><i class='fa fa-truck'></i> Nuevo Proveedor</a>
<div class="btn-group pull-right">
  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
    <i class="fa fa-download"></i> Descargar <span class="caret"></span>
  </button>
  <ul class="dropdown-menu" role="menu">
    <li><a href="report/providers-word.php">Word 2007 (.docx)</a></li>
  </ul>
</div>
</div>
		<h1>Directorio de Proveedores</h1>
<br>
		<?php 
$users = PersonData::getProviders();
if (count($users) > 0) {
    // si hay usuarios
    ?>

			<table class="table table-bordered table-hover">
			<thead>
			<th>Nombre completo</th>
			<th>Direccion</th>
			<th>Email</th>
			<th>Telefono</th>
			<th></th>
			</thead>
			<?php 
    foreach ($users as $user) {
        ?>
Exemplo n.º 14
0
      <div class="page-content">

        <!-- Header Bar -->
<?php 
$person = PersonData::getById($_GET["id"]);
$teams = TeamData::getAll();
$categories = CategoryData::getAll();
Action::load("header");
?>
        <!-- End Header Bar -->


          <div class="row">
            <div class="col-lg-12">
            <h2><?php 
echo $person->name . " " . $person->lastname;
?>
 <small>Editar</small></h2>
              <div class="widget">
                <div class="widget-title">
                  <i class="fa fa-male"></i> Contacto
                </div>
                <div class="widget-body">
<form class="form-horizontal" role="form" method="post" action="./?r=person/update">
  <div class="form-group">
    <label for="inputEmail1" class="col-lg-2 control-label">Numero</label>
    <div class="col-lg-10">
      <input type="text" name="no" value="<?php 
echo $person->no;
?>
" required class="form-control" id="inputEmail1" placeholder="Numero">