<?php include '../../concha.php';?>
<!DOCTYPE html>
<html lang="es">
<head>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta name="description" content="Panel de Administracion">
  <meta name="author" content="<?php echo $nombresitio ?>">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>Panel de Socios <?php echo $nombresitio ?></title>
  <!-- plugins:css -->
  <link rel="stylesheet" href="vendors/mdi/css/materialdesignicons.min.css">
  <link rel="stylesheet" href="vendors/base/vendor.bundle.base.css">
  <!-- endinject -->
  <!-- plugin css for this page -->
  <link rel="stylesheet" href="vendors/datatables.net-bs4/dataTables.bootstrap4.css">
  <!-- End plugin css for this page -->
  <!-- inject:css -->
  <link rel="stylesheet" href="css/style.css">
  <!-- endinject -->
  <link rel="shortcut icon" href="<?php echo $dom ?>/icono.ico" />
  <style>

        .btn-primary {
          background-color:<?php echo $d_color_fondo_menu ?>;
          border:0;
          letter-spacing:1px;
          font-weight:600;
        }
    
        .mdi{
            color:<?php echo $d_color_fondo_menu ?>;
            
        }
       .svg path {
         
            fill: <?php echo $d_color_fondo_menu ?>;
              
                
            }
    
                .svg:hover path{
        
                fill: #FFFFFF;

                }
        
    </style>
</head>
<body>
  <div class="container-scroller">
    <!-- partial:partials/_navbar.html -->
     <nav class="navbar col-lg-12 col-12 p-0 fixed-top d-flex flex-row">
            <div class="navbar-brand-wrapper d-flex justify-content-center">
        <div class="navbar-brand-inner-wrapper d-flex justify-content-between align-items-center w-100">  
          <a class="navbar-brand brand-logo" href="index.php"><img src="<?php echo $logo_C?>" alt="logo"/></a>
          <a class="navbar-brand brand-logo-mini" href="index.php"><img src="<?php echo $dom ?>/icono.ico" alt="logo"/></a>
          <button class="navbar-toggler navbar-toggler align-self-center" type="button" data-toggle="minimize">
            <span class="mdi mdi-sort-variant" style="color:#fff;"></span>
          </button>
        </div>  
      </div>
      <div class="navbar-menu-wrapper d-none align-items-center justify-content-end">
        <ul class="navbar-nav mr-lg-4 w-100">
          <li class="nav-item nav-search d-none d-lg-block w-100">
            <div class="input-group">
              <div class="input-group-prepend">
                <span class="input-group-text" id="search">
                  <i class="mdi mdi-magnify"></i>
                </span>
              </div>
              <input type="text" class="form-control" placeholder="Buscar Socio" aria-label="search" aria-describedby="search">
            </div>
          </li>
        </ul>
        <ul class="navbar-nav navbar-nav-right">
          <li class="nav-item dropdown mr-1">
            <a class="nav-link count-indicator dropdown-toggle d-flex justify-content-center align-items-center" id="messageDropdown" href="#" data-toggle="dropdown">
              <i class="mdi mdi-message-text mx-0"></i>
              <span class="count"></span>
            </a>
            <div class="dropdown-menu dropdown-menu-right navbar-dropdown" aria-labelledby="messageDropdown">
              <p class="mb-0 font-weight-normal float-left dropdown-header">Mensajes</p>
              <a class="dropdown-item">
                <div class="item-thumbnail">
                    <img src="images/faces/face4.jpg" alt="image" class="profile-pic">
                </div>
                <div class="item-content flex-grow">
                  <h6 class="ellipsis font-weight-normal">David Grey
                  </h6>
                  <p class="font-weight-light small-text text-muted mb-0">
                    The meeting is cancelled
                  </p>
                </div>
              </a>
              <a class="dropdown-item">
                <div class="item-thumbnail">
                    <img src="images/faces/face2.jpg" alt="image" class="profile-pic">
                </div>
                <div class="item-content flex-grow">
                  <h6 class="ellipsis font-weight-normal">Tim Cook
                  </h6>
                  <p class="font-weight-light small-text text-muted mb-0">
                    New product launch
                  </p>
                </div>
              </a>
              <a class="dropdown-item">
                <div class="item-thumbnail">
                    <img src="images/faces/face3.jpg" alt="image" class="profile-pic">
                </div>
                <div class="item-content flex-grow">
                  <h6 class="ellipsis font-weight-normal"> Johnson
                  </h6>
                  <p class="font-weight-light small-text text-muted mb-0">
                    Upcoming board meeting
                  </p>
                </div>
              </a>
            </div>
          </li>
          <li class="nav-item dropdown mr-4">
            <a class="nav-link count-indicator dropdown-toggle d-flex align-items-center justify-content-center notification-dropdown" id="notificationDropdown" href="#" data-toggle="dropdown">
              <i class="mdi mdi-bell mx-0"></i>
              <span class="count"></span>
            </a>
            <div class="dropdown-menu dropdown-menu-right navbar-dropdown" aria-labelledby="notificationDropdown">
              <p class="mb-0 font-weight-normal float-left dropdown-header">Notifications</p>
              <a class="dropdown-item">
                <div class="item-thumbnail">
                  <div class="item-icon bg-success">
                    <i class="mdi mdi-information mx-0"></i>
                  </div>
                </div>
                <div class="item-content">
                  <h6 class="font-weight-normal">Application Error</h6>
                  <p class="font-weight-light small-text mb-0 text-muted">
                    Just now
                  </p>
                </div>
              </a>
              <a class="dropdown-item">
                <div class="item-thumbnail">
                  <div class="item-icon bg-warning">
                    <i class="mdi mdi-settings mx-0"></i>
                  </div>
                </div>
                <div class="item-content">
                  <h6 class="font-weight-normal">Settings</h6>
                  <p class="font-weight-light small-text mb-0 text-muted">
                    Private message
                  </p>
                </div>
              </a>
              <a class="dropdown-item">
                <div class="item-thumbnail">
                  <div class="item-icon bg-info">
                    <i class="mdi mdi-account-box mx-0"></i>
                  </div>
                </div>
                <div class="item-content">
                  <h6 class="font-weight-normal">New user registration</h6>
                  <p class="font-weight-light small-text mb-0 text-muted">
                    2 days ago
                  </p>
                </div>
              </a>
            </div>
          </li>
          <li class="nav-item nav-profile dropdown" style="display:none !important;">
            <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" id="profileDropdown">
              <img src="images/faces/face5.jpg" alt="profile"/>
              <span class="nav-profile-name">Louis Barnett</span>
            </a>
            <div class="dropdown-menu dropdown-menu-right navbar-dropdown" aria-labelledby="profileDropdown">
              <a class="dropdown-item">
                <i class="mdi mdi-settings text-primary"></i>
                Settings
              </a>
              <a class="dropdown-item">
                <i class="mdi mdi-logout text-primary"></i>
                Logout
              </a>
            </div>
          </li>
        </ul>
        <button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button" data-toggle="offcanvas">
          <span class="mdi mdi-menu"></span>
        </button>
      </div>
    </nav>
    <!-- partial -->
    <div class="container-fluid page-body-wrapper">
      <!-- partial:partials/_sidebar.html -->
      <nav class="sidebar sidebar-offcanvas" id="sidebar">
        <ul class="nav">
            <li class="nav-item">
                <a class="nav-link" href="index.php">
                    <i class="mdi mdi-home menu-icon"></i>
                    <span class="menu-title">Inicio</span>
                </a>
            </li>
            
            <li class="nav-item">
                <a class="nav-link" href="socio.php">
                    <i class="mdi mdi-account menu-icon"></i>
                    <span class="menu-title">Socios</span>
                </a>
            </li>
          <!--li class="nav-item">
            <a class="nav-link" data-toggle="collapse" href="#ui-basic" aria-expanded="false" aria-controls="ui-basic">
              <i class="mdi mdi-circle-outline menu-icon"></i>
              <span class="menu-title">UI Elements</span>
              <i class="menu-arrow"></i>
            </a>
            <div class="collapse" id="ui-basic">
              <ul class="nav flex-column sub-menu">
                <li class="nav-item"> <a class="nav-link" href="pages/ui-features/buttons.html">Buttons</a></li>
                <li class="nav-item"> <a class="nav-link" href="pages/ui-features/typography.html">Typography</a></li>
              </ul>
            </div>
          </li-->
          <!--li class="nav-item">
            <a class="nav-link" href="pages/forms/basic_elements.html">
              <i class="mdi mdi-view-headline menu-icon"></i>
              <span class="menu-title">Form elements</span>
            </a>
          </li-->
          <!--li class="nav-item">
            <a class="nav-link" href="pages/charts/chartjs.html">
              <i class="mdi mdi-chart-pie menu-icon"></i>
              <span class="menu-title">Charts</span>
            </a>
          </li-->
          <!--li class="nav-item">
            <a class="nav-link" href="pages/tables/basic-table.html">
              <i class="mdi mdi-grid-large menu-icon"></i>
              <span class="menu-title">Tables</span>
            </a>
          </li-->
          <!--li class="nav-item">
            <a class="nav-link" href="pages/icons/mdi.html">
              <i class="mdi mdi-emoticon menu-icon"></i>
              <span class="menu-title">Icons</span>
            </a>
          </li-->
          <!--li class="nav-item">
            <a class="nav-link" data-toggle="collapse" href="#auth" aria-expanded="false" aria-controls="auth">
              <i class="mdi mdi-account menu-icon"></i>
              <span class="menu-title">User Pages</span>
              <i class="menu-arrow"></i>
            </a>
            <div class="collapse" id="auth">
              <ul class="nav flex-column sub-menu">
                <li class="nav-item"> <a class="nav-link" href="pages/samples/login.html"> Login </a></li>
                <li class="nav-item"> <a class="nav-link" href="pages/samples/login-2.html"> Login 2 </a></li>
                <li class="nav-item"> <a class="nav-link" href="pages/samples/register.html"> Register </a></li>
                <li class="nav-item"> <a class="nav-link" href="pages/samples/register-2.html"> Register 2 </a></li>
                <li class="nav-item"> <a class="nav-link" href="pages/samples/lock-screen.html"> Lockscreen </a></li>
              </ul>
            </div>
          </li-->
          <!--li class="nav-item">
            <a class="nav-link" href="documentation/documentation.html">
              <i class="mdi mdi-file-document-box-outline menu-icon"></i>
              <span class="menu-title">Documentation</span>
            </a>
          </li-->
        </ul>
      </nav>
      <!-- partial -->
      <div class="main-panel">
        <div class="content-wrapper">
          <div class="row">
            <div class="col-md-12 grid-margin">
              <div class="d-flex justify-content-between flex-wrap">
                <div class="d-flex align-items-end flex-wrap">
                  <div class="mr-md-3 mr-xl-5">
                    
                  </div>
                  <div class="d-none">
                    <i class="mdi mdi-home text-muted hover-cursor"></i>
                    <p class="text-muted mb-0 hover-cursor">&nbsp;/&nbsp;Dashboard&nbsp;/&nbsp;</p>
                    <p class="text-primary mb-0 hover-cursor">Analytics</p>
                  </div>
                </div>
                <div class="d-none justify-content-between align-items-end flex-wrap">
                  <button type="button" class="btn btn-light bg-white btn-icon mr-3 d-none d-md-block ">
                    <i class="mdi mdi-download text-muted"></i>
                  </button>
                  <button type="button" class="btn btn-light bg-white btn-icon mr-3 mt-2 mt-xl-0">
                    <i class="mdi mdi-clock-outline text-muted"></i>
                  </button>
                  <button type="button" class="btn btn-light bg-white btn-icon mr-3 mt-2 mt-xl-0">
                    <i class="mdi mdi-plus text-muted"></i>
                  </button>
                  <button class="btn btn-primary mt-2 mt-xl-0">Download report</button>
                </div>
              </div>
            </div>
          </div>
            
            
         
            
          <div class="row">
              
            <div class="col-md-12 stretch-card">               
              <div class="card">
                <div class="card-body">
                  <h4 class="card-title">Socio</h4>
                  <p class="card-description">
                    Detalle completo del socio.
                  </p>
                    
                    <div class="container-fluid " >
                   
                     <div class="row mb-3">   
                         
                         <div class="col-12 text-center">
                                         <p>
                            <?php 
                                
                            $ID = (int)$_POST["ID"];                          
                            $nombre = $_POST['nombre']; 
                            $email = $_POST['email']; 
                            $direccion = $_POST['direccion']; 
                            $telefono = $_POST['telefono']; 
                            $valor_cuota = $_POST['valor_cuota']; 
                            $baja = $_POST['baja']; 
                            $categoria_socio = $_POST['categoria_socio'];
                            $precios_especial = $_POST['precios_especial'];
                            $ID_cuota = $_POST['plan'];
                            $ID_sub_socio = $_POST['ID_sub_socio']; 
                            
                            if ($ID_cuota != ''){
                              
                              $sql4 ="SELECT * FROM `cuota` WHERE ID = '$ID_cuota' LIMIT 1 ";
                              $consulta4 = mysql_query ($sql4);
                              while ($row4 = mysql_fetch_array($consulta4)) {
                                             
                              $ID_cuota = $row4["ID"]; 
                              $nombre_plan = $row4["nombre"];
                              $valor_cuota2 = $row4["valor_cuota"];
                              }
                              mysql_free_result($consulta4);

                                            mysql_connect("$host","$usuario","$contra");
                            $sql2="UPDATE `socios` SET `valor_cuota` = '$valor_cuota2' WHERE `ID` = '$ID' ";    
                            mysql_db_query("$basedatos",$sql2);

                            } else {
                              
                            mysql_connect("$host","$usuario","$contra");
                            $sql2="UPDATE `socios` SET `valor_cuota` = '$valor_cuota' WHERE `ID` = '$ID' ";
                            mysql_db_query("$basedatos",$sql2);

                            }
                                
                            mysql_connect("$host","$usuario","$contra");
                            $sql2="UPDATE `socios` SET `nombre` = '$nombre' WHERE `ID` = '$ID' ";    
                            mysql_db_query("$basedatos",$sql2);
                                                            
                            mysql_connect("$host","$usuario","$contra");    
                            $sql2="UPDATE `socios` SET `email` = '$email' WHERE `ID` = '$ID' ";
                            mysql_db_query("$basedatos",$sql2);
                              
                            mysql_connect("$host","$usuario","$contra");
                            $sql2="UPDATE `socios` SET `telefono` = '$telefono' WHERE `ID` = '$ID' ";
                            mysql_db_query("$basedatos",$sql2);
                                
                            mysql_connect("$host","$usuario","$contra");
                            $sql2="UPDATE `socios` SET `direccion` = '$direccion' WHERE `ID` = '$ID' ";
                            mysql_db_query("$basedatos",$sql2);
                                                          
                            mysql_connect("$host","$usuario","$contra");
                            $sql2="UPDATE `socios` SET `categoria_socio` = '$categoria_socio' WHERE `ID` = '$ID' ";
                            mysql_db_query("$basedatos",$sql2);
                                
                            mysql_connect("$host","$usuario","$contra");
                            $sql2="UPDATE `socios` SET `precios_especial` = '$precios_especial' WHERE `ID` = '$ID' ";
                            mysql_db_query("$basedatos",$sql2);
                            
                            mysql_connect("$host","$usuario","$contra");
                            $sql2="UPDATE `socios` SET `plan` = '$ID_cuota' WHERE `ID` = '$ID' ";
                            mysql_db_query("$basedatos",$sql2);

                            mysql_connect("$host","$usuario","$contra");
                            $sql2="UPDATE `socios` SET `ID_sub_socio` = '$ID_sub_socio' WHERE `ID` = '$ID' ";
                            mysql_db_query("$basedatos",$sql2);

                            if ($ID_sub_socio !== 0) { 

                              mysql_connect("$host","$usuario","$contra");
                              $sql2="UPDATE `socios` SET `valor_cuota` = 0 WHERE `ID` = '$ID' ";
                              mysql_db_query("$basedatos",$sql2);

                            }else{ }

                            
                            
                            ?>


                            </p>


                            <p>DATOS DE CONTACTO ACTUALIZADOS</p>
                         
                      
                         </div>
                         
            
                         
<div class="col-12 text-center"><a class="btn btn-primary" href="socio.php?ID=<? echo $ID ?>">VOLVER</a>
</div>


   

                    </div> 
                      </div>  
                </div>
              </div>
            </div>
              
          </div>
        </div>
        <!-- content-wrapper ends -->
        <!-- partial:partials/_footer.html -->
        <footer class="footer">
          <div class="d-sm-flex justify-content-center justify-content-sm-between">
            <span class="text-muted text-center text-sm-left d-block d-sm-inline-block">Copyright © 2019 <a href="https://www.radiosnet.com.ar/" target="_blank">RadiosNet</a>.</span>
            <span class="d-none float-none float-sm-right  mt-1 mt-sm-0 text-center">Hand-crafted & made with <i class="mdi mdi-heart text-danger"></i></span>
          </div>
        </footer>
        <!-- partial -->
      </div>
      <!-- main-panel ends -->
    </div>
    <!-- page-body-wrapper ends -->
  </div>
  <!-- container-scroller -->

  <!-- plugins:js -->
  <script src="vendors/base/vendor.bundle.base.js"></script>
  <!-- endinject -->
  <!-- Plugin js for this page-->
  <script src="vendors/chart.js/Chart.min.js"></script>
  <script src="vendors/datatables.net/jquery.dataTables.js"></script>
  <script src="vendors/datatables.net-bs4/dataTables.bootstrap4.js"></script>
  <!-- End plugin js for this page-->
  <!-- inject:js -->
  <script src="js/off-canvas.js"></script>
  <script src="js/hoverable-collapse.js"></script>
  <script src="js/template.js"></script>
  <!-- endinject -->
  <!-- Custom js for this page-->
  <script src="js/dashboard.js"></script>
  <script src="js/data-table.js"></script>
  <script src="js/jquery.dataTables.js"></script>
  <script src="js/dataTables.bootstrap4.js"></script>
  <!-- End custom js for this page-->
</body>

</html>

