Beispiel #1
0
    function perfil($id_lider)
    {
        //        $id_lider=4;
        $servicio = new Servicios();
        if ($servicio->validador($id_lider) != 0) {
            $persona = new DAOPersona();
            $daolider = new DAOLider();
            $daopuesto = new DAOPuestoVotacion();
            $puesto = $daopuesto->muestraPuestoVotacion($id_lider);
            $user = $_SESSION['user'];
            $persona = $persona->consultar($id_lider);
            $tipo = $_SESSION['tipo'];
            if ($tipo == 1) {
                $votos = $daolider->TotalVotos($user, $id_lider);
            }
            if ($tipo == 2) {
                $daocandidato = new DAOCandidato();
                $id_candidato = $daocandidato->consultarIdCandidato($user);
                $votos = $daolider->TotalVotos($id_candidato[0], $user);
            }
            echo '<div class="content-wrapper">
                <!-- Content Header (Page header) -->
                
              
      <!-- Content Wrapper. Contains page content -->
             <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            Perfil
          </h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Inicio</a></li>
            
            <li class="active">Perfil</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">

          <div class="row">
            <div class="col-md-3">

              <!-- Profile Image -->
              <div class="box box-primary">
                <div class="box-body box-profile">
                  <img class="profile-user-img img-responsive img-circle" src= ' . $servicio->mostrarFoto($_SESSION['user']) . ' alt="User profile picture">
                  <h3 class="profile-username text-center">' . $persona->getNombre() . ' ' . $persona->getApellido() . '</h3>
                  
                   <p class="text-muted text-center">LIDER</p>

                  <ul class="list-group list-group-unbordered">
                    <li class="list-group-item">
                      <b>Votación Total </b> <a class="pull-right">' . $votos . '</a>
                    </li>
                    <li class="list-group-item">
                      <b>Departamento</b> <a class="pull-right">' . $puesto->getMunicipio() . '</a>
                    </li>
                    <li class="list-group-item">
                      <b>Municipio</b> <a class="pull-right">' . $puesto->getPuesto() . '</a>
                    </li>
                  </ul>

                  <a href="#" class="btn btn-primary btn-block"><b>Votantes</b></a>
                </div><!-- /.box-body -->
              </div><!-- /.box -->


            </div><!-- /.col -->
            <div class="col-md-9">
              <div class="nav-tabs-custom">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#settings" data-toggle="tab">Datos del Perfil</a></li>
                </ul>
                <div class="tab-content">


                  <div class="active tab-pane" id="settings">
                    <form class="form-horizontal">
                      <div class="form-group">
                        <label for="inputName" class="col-sm-2 control-label">Cedula</label>
                        <div class="col-sm-10">
                          <input type="email" class="form-control" id="cedula" placeholder="' . $persona->getCedula() . '">
                        </div>
                      </div>
                      <div class="form-group">
                        <label for="inputEmail" class="col-sm-2 control-label">Nombre</label>
                        <div class="col-sm-10">
                          <input type="email" class="form-control" id="mbreno" placeholder="' . $persona->getNombre() . '">
                        </div>
                      </div>
                      <div class="form-group">
                        <label for="inputName" class="col-sm-2 control-label">Apellido</label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" id="apellido" placeholder="' . $persona->getApellido() . '">
                        </div>
                      </div>
                        <div class="form-group">
                        <label for="inputName" class="col-sm-2 control-label">Telefono</label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" id="telefono" placeholder="' . $persona->getTelefono() . '">
                        </div>
                      </div>
                        <div class="form-group">
                        <label for="inputName" class="col-sm-2 control-label">Celular</label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" id="celular" placeholder="' . $persona->getCelular() . '">
                        </div>
                      </div>
                      <div class="form-group">
                        <label for="inputExperience" class="col-sm-2 control-label">Direción</label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" id="direccion" placeholder="' . $persona->getDireccion() . '">
                        </div>
                      </div>
                     <div>
                        <a href="/puyaOjo/pages/profile.php?cedula=4"> Modificar </a>
                        </div>
                      <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                          <button type="submit"  class="btn btn-danger">Guardar Datos</button>
                        </div>
                      </div>
                    </form>
                  </div><!-- /.tab-pane -->
                </div><!-- /.tab-content -->
              </div><!-- /.nav-tabs-custom -->
            </div><!-- /.col -->
          </div><!-- /.row -->

        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->';
        } else {
        }
    }
Beispiel #2
0
                                                        </div>
                                                    </div>
                                                </a>
                                            </li><!-- end task item -->
                                        </ul>
                                    </li>
                                    <li class="footer">
                                        <a href="#">View all tasks</a>
                                    </li>
                                </ul>
                            </li>
                            <!-- User Account: style can be found in dropdown.less -->
                            <li class="dropdown user user-menu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    <img src= <?php 
echo $servicio->mostrarFoto($_SESSION['user']);
?>
 class="user-image" alt="User Image">
                                    <span class="hidden-xs"><?php 
echo $name . " " . $lastname;
?>
</span>
                                </a>
                                <ul class="dropdown-menu">
                                    <!-- User image -->
                                    <li class="user-header">
                                        <img src= <?php 
echo $servicio->mostrarFoto($_SESSION['user']);
?>
 class="img-circle" alt="User Image">
                                        <p>
Beispiel #3
0
    function cabecera()
    {
        $user = $_SESSION['user'];
        $name = $_SESSION['name'];
        $tipo = $_SESSION['tipo'];
        $aspiracion = $_SESSION['aspiracion'];
        $lastname = $_SESSION['lastname'];
        $elements = new ElementHTML();
        $idiom = new Idiom();
        $daolider = new DAOLider();
        $servicio = new Servicios();
        echo '<header class="main-header">
                <!-- Logo -->
                <a href="../index.php" class="logo">
                    <!-- mini logo for sidebar mini 50x50 pixels -->
                    <span class="logo-mini"><b>C</b>E</span>
                    <!-- logo for regular state and mobile devices -->
                    <span class="logo-lg"><b>Census</b>Electoral</span>
                </a>
                <!-- Header Navbar: style can be found in header.less -->
                <nav class="navbar navbar-static-top" role="navigation">
                    <!-- Sidebar toggle button-->
                    <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                        <span class="sr-only">Toggle navigation</span>
                    </a>
                    <!-- Navbar Right Menu -->
                    <div class="navbar-custom-menu">
                        <ul class="nav navbar-nav">
                            <!-- Messages: style can be found in dropdown.less-->
                            <li class="dropdown messages-menu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    <i class="fa fa-user-plus"></i>
                                    <span class="label label-success">4</span>
                                </a>
                                <ul class="dropdown-menu">
                                    <li class="header">You have 4 messages</li>
                                    <li>
                                        <!-- inner menu: contains the actual data -->
                                        <ul class="menu">
                                            <li><!-- start message -->
                                                <a href="#">
                                                    <div class="pull-left">
                                                        <img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
                                                    </div>
                                                    <h4>
                                                        Support Team
                                                        <small><i class="fa fa-clock-o"></i> 5 mins</small>
                                                    </h4>
                                                    <p>Why not buy a new awesome theme?</p>
                                                </a>
                                            </li><!-- end message -->
                                            <li>
                                                <a href="#">
                                                    <div class="pull-left">
                                                        <img src="../dist/img/user3-128x128.jpg" class="img-circle" alt="User Image">
                                                    </div>
                                                    <h4>
                                                        AdminLTE Design Team
                                                        <small><i class="fa fa-clock-o"></i> 2 hours</small>
                                                    </h4>
                                                    <p>Why not buy a new awesome theme?</p>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#">
                                                    <div class="pull-left">
                                                        <img src="dist/img/user4-128x128.jpg" class="img-circle" alt="User Image">
                                                    </div>
                                                    <h4>
                                                        Developers
                                                        <small><i class="fa fa-clock-o"></i> Today</small>
                                                    </h4>
                                                    <p>Why not buy a new awesome theme?</p>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#">
                                                    <div class="pull-left">
                                                        <img src="dist/img/user3-128x128.jpg" class="img-circle" alt="User Image">
                                                    </div>
                                                    <h4>
                                                        Sales Department
                                                        <small><i class="fa fa-clock-o"></i> Yesterday</small>
                                                    </h4>
                                                    <p>Why not buy a new awesome theme?</p>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#">
                                                    <div class="pull-left">
                                                        <img src="dist/img/user4-128x128.jpg" class="img-circle" alt="User Image">
                                                    </div>
                                                    <h4>
                                                        Reviewers
                                                        <small><i class="fa fa-clock-o"></i> 2 days</small>
                                                    </h4>
                                                    <p>Why not buy a new awesome theme?</p>
                                                </a>
                                            </li>
                                        </ul>
                                    </li>
                                    <li class="footer"><a href="#">See All Messages</a></li>
                                </ul>
                            </li>
                            <!-- Tasks: style can be found in dropdown.less -->
                            <li class="dropdown tasks-menu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    <i class="fa fa-flag-o"></i>
                                    <span class="label label-danger">9</span>
                                </a>
                                <ul class="dropdown-menu">
                                    <li class="header">You have 9 tasks</li>
                                    <li>
                                        <!-- inner menu: contains the actual data -->
                                        <ul class="menu">
                                            <li><!-- Task item -->
                                                <a href="#">
                                                    <h3>
                                                        Design some buttons
                                                        <small class="pull-right">20%</small>
                                                    </h3>
                                                    <div class="progress xs">
                                                        <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                            <span class="sr-only">20% Complete</span>
                                                        </div>
                                                    </div>
                                                </a>
                                            </li><!-- end task item -->
                                            <li><!-- Task item -->
                                                <a href="#">
                                                    <h3>
                                                        Create a nice theme
                                                        <small class="pull-right">40%</small>
                                                    </h3>
                                                    <div class="progress xs">
                                                        <div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                            <span class="sr-only">40% Complete</span>
                                                        </div>
                                                    </div>
                                                </a>
                                            </li><!-- end task item -->
                                            <li><!-- Task item -->
                                                <a href="#">
                                                    <h3>
                                                        Some task I need to do
                                                        <small class="pull-right">60%</small>
                                                    </h3>
                                                    <div class="progress xs">
                                                        <div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                            <span class="sr-only">60% Complete</span>
                                                        </div>
                                                    </div>
                                                </a>
                                            </li><!-- end task item -->
                                            <li><!-- Task item -->
                                                <a href="#">
                                                    <h3>
                                                        Make beautiful transitions
                                                        <small class="pull-right">80%</small>
                                                    </h3>
                                                    <div class="progress xs">
                                                        <div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                            <span class="sr-only">80% Complete</span>
                                                        </div>
                                                    </div>
                                                </a>
                                            </li><!-- end task item -->
                                        </ul>
                                    </li>
                                    <li class="footer">
                                        <a href="#">View all tasks</a>
                                    </li>
                                </ul>
                            </li>
                            <!-- User Account: style can be found in dropdown.less -->
                            <li class="dropdown user user-menu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    <img src=';
        echo $servicio->mostrarFoto($user);
        echo 'class="user-image" alt="User Image">
                                    <span class="hidden-xs">';
        echo $name . " " . $lastname;
        echo '</span>
                                </a>
                                <ul class="dropdown-menu">
                                    <!-- User image -->
                                    <li class="user-header">
                                        <img src=';
        echo $servicio->mostrarFoto($_SESSION['user']);
        echo 'class="img-circle" alt="User Image">
                                        <p>';
        echo $name . " " . $lastname;
        echo '<br>';
        echo $aspiracion;
        echo '<small>2016-2020</small>
                                        </p>
                                    </li>
                                    <!-- Menu Body -->
                                    <li class="user-body">
                                        <div class="col-xs-4 text-center">
                                            <a href="#">Followers</a>
                                        </div>
                                        <div class="col-xs-4 text-center">
                                            <a href="#">Sales</a>
                                        </div>
                                        <div class="col-xs-4 text-center">
                                            <a href="#">Friends</a>
                                        </div>
                                    </li>
                                    <!-- Menu Footer-->
                                    <li class="user-footer">
                                        <div class="pull-left">
                                            <a href="profile.php" class="btn btn-default btn-flat">Perfil</a>
                                        </div>
                                        <div class="pull-right">
                                            <a href="../inc/log_out.php" class="btn btn-default btn-flat">';
        echo $idiom->getBtn_close();
        echo '</a>
                                        </div>
                                    </li>
                                </ul>
                            </li>
                            <!-- Control Sidebar Toggle Button -->
                            <li>
                                <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                            </li>
                        </ul>
                    </div>

                </nav>
            </header>';
    }