Exemplo n.º 1
0
<?php

require_once "../../../controller/autoload.inc";
$db = new view\user\model\DBUser();
$user = $db->selectCdById($_POST['id'])[0];
?>
<div class="row">
    <form id="editCD">
        <div class="col-md-12 urlForm" data-url="controller/user.update.php">
            <fieldset>
                <div class="row">
                    <div class="">
                        <label for="inputEmail" class="col-lg-2 control-label">Nome do Cantor</label>
                        <div class="col-lg-10">
                            <input type="text" name='name' class="form-control" value="<?php 
echo $user['name'];
?>
"  id="inputEmail" placeholder="Nome do Cantor">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <label for="pass1" class="col-lg-2 control-label">Tipo Senha 1</label>
                    <div class="col-lg-10">
                        <input type="password" name='pass1' class="form-control" value=""  id="pass1" placeholder="tipo senha 1">
                    </div>
                </div>
                <div class="row">
                    <label for="pass2" class="col-lg-2 control-label">Tipo Senha 2</label>
                    <div class="col-lg-10">
                        <input type="password" name='pass2' class="form-control" value=""  id="pass2" placeholder="tipo senha 2">
Exemplo n.º 2
0
<?php

require_once "../../controller/autoload.inc";
include "../add-on/header.php";
$db = new view\user\model\DBUser();
?>
    <div class="container">
        <div class="row">
            <div class="col-md-8 col-md-offset-2">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="col-md-2">
                                    <a href="../dashboard/index.php" class="btn btn-default btn-fab btn-raised mdi-navigation-arrow-back"></a>
                                </div>
                                <div class="col-md-8">
                                    <h1 class="text-center text-capitalize">Usuários</h1>
                                </div>
                                <div class="col-md-2">
                                    <a href="javascript:void(0)" class="btn btn-success btn-fab btn-raised mdi-content-add fn" data-title="Criando Usuário..." data-url="pages/add.usuario.php" data-toggle="modal" data-target="#myModal"></a>
                                </div>
                            </div>
                        </div>
                        <div class="row margin-top-60">
                            <div class="col-md-12">
                                <div class="list-group">
                                    <!-- inicio de modelo -->
                                    <?php 
foreach ($db->getAll() as $k) {
    ?>
Exemplo n.º 3
0
<?php

require_once "../../../controller/autoload.inc";
$db = new view\user\model\DBUser();
$fn = new controller\functions();
if (empty($_POST)) {
    exit;
}
$_POST['pass1'] = $fn->segPassEncript($_POST['pass1']);
$_POST['pass2'] = $fn->segPassEncript($_POST['pass2']);
$db->insertUser($fn->prepareArrayDoublePointer($_POST, false));
// vai retornar a quantidade de linhas afetadas
Exemplo n.º 4
0
<?php

require_once "../../../controller/autoload.inc";
$db = new view\user\model\DBUser();
if (empty($_POST)) {
    exit;
}
$file = $db->deleteUser($_POST['id_user']);
Exemplo n.º 5
0
<?php

require_once "../../../controller/autoload.inc";
$db = new view\user\model\DBUser();
$fn = new controller\functions();
if (empty($_POST)) {
    exit;
}
//var_dump($fn->prepareArrayDoublePointer($_POST, false));
$user = $_POST['id_user'];
unset($_POST['id_user']);
$_POST['pass1'] = $fn->segPassEncript($_POST['pass1']);
$_POST['pass2'] = $fn->segPassEncript($_POST['pass2']);
$db->updateCD($fn->prepareArrayDoublePointer($_POST, false), $user);
// vai retornar a quantidade de linhas afetadas