<?php include "../../includes/inc.main.php"; $ID = $_GET['id']; $Edit = new GeolocationCountry($ID); $Data = $Edit->GetData(); ValidateID($Data); $Head->setTitle($Menu->GetTitle()); $Head->setHead(); include '../../includes/inc.top.php'; ?> <?php echo insertElement("hidden", "action", 'update'); ?> <?php echo insertElement("hidden", "id", $ID); ?> <div class="box animated fadeIn"> <div class="box-header flex-justify-center"> <div class="col-lg-8 col-sm-12"> <div class="innerContainer"> <h4 class="subTitleB"><i class="fa fa-plus-circle"></i> Complete los campos para agregar un nuevo país</h4> <div class="row form-group inline-form-custom-2"> <div class="col-xs-12 col-sm-6 inner"> <label>Título</label> <?php echo insertElement('text', 'title', $Data['title'], 'form-control', 'placeholder="Ingrese un Título" validateEmpty="Ingrese un título." validateFromFile="../../library/processes/proc.common.php///El título ya existe///action:=validate///actualtitle:=' . $Data['title'] . '///object:=GeolocationCountry"'); ?> </div> </div><!-- inline-form --> <hr>
public function MakeRegs($Mode = "List") { $Rows = $this->GetRegs(); //echo $this->lastQuery(); foreach ($Rows as $Row) { $Row = new GeolocationCountry($Row['country_id']); $ID = $Row->ID; $Provinces = $Row->GetProvinces(); $ProvincesHTML = ''; foreach ($Provinces as $Province) { $ProvincesHTML .= '<span class="label label-success">' . $Province['title'] . '</span> '; } if (!$ProvincesHTML) { $ProvincesHTML = 'Ninguna'; } $Actions = '<span class="roundItemActionsGroup"><a href="edit.php?id=' . $ID . '"><button type="button" class="btn btnBlue"><i class="fa fa-pencil"></i></button></a>'; if ($Row->Data['status'] == "A") { $Actions .= '<a class="deleteElement" process="../../library/processes/proc.common.php" id="delete_' . $ID . '"><button type="button" class="btn btnRed"><i class="fa fa-trash"></i></button></a>'; } else { $Actions .= '<a class="activateElement" process="../../library/processes/proc.common.php" id="activate_' . $ID . '"><button type="button" class="btn btnGreen"><i class="fa fa-check-circle"></i></button></a>'; } $Actions .= '</span>'; switch (strtolower($Mode)) { case "list": $Row->Data['title'] = $Row->Data['title']; $RowBackground = $i % 2 == 0 ? '' : ' listRow2 '; $Regs .= '<div class="row listRow' . $RowBackground . '" id="row_' . $ID . '" title="' . $Row->Data['title'] . '"> <div class="col-lg-4 col-md-4 col-sm-10 col-xs-10"> <div class="listRowInner"> <span class="smallTitle">Título</span> <span class="listTextStrong">' . $Row->Data['title'] . '</span> </div> </div> <div class="col-lg-6 col-md-6 col-sm-6 hideMobile990"> <div class="listRowInner"> <span class="smallTitle">Provincias</span> <span class="listTextStrong"> ' . $ProvincesHTML . ' </span> </div> </div> <div class="col-lg-2 col-md-2 col-sm-2 hideMobile990"></div> <div class="listActions flex-justify-center Hidden"> <div>' . $Actions . '</div> </div> </div>'; break; case "grid": $Regs .= '<li id="grid_' . $ID . '" class="RoundItemSelect roundItemBig ' . $Restrict . '" title="' . $Row->Data['title'] . '"> <div class="flex-allCenter imgSelector"> <div class="imgSelectorInner"> <img src="' . $Row->Data['image'] . '" alt="' . $Row->Data['title'] . '" class="img-responsive"> <div class="imgSelectorContent"> <div class="roundItemBigActions"> ' . $Actions . ' <span class="roundItemCheckDiv"><a href="#"><button type="button" class="btn roundBtnIconGreen Hidden" name="button"><i class="fa fa-check"></i></button></a></span> </div> </div> </div> <div class="roundItemText"> <p><b>' . $Row->Data['title'] . '</b></p> </div> </div> </li>'; break; } } if (!$Regs) { $Regs .= '<div class="callout callout-info"><h4><i class="icon fa fa-info-circle"></i> No se encontraron países.</h4><p>Puede crear un nuevo grupo haciendo click <a href="new.php">aqui</a>.</p></div>'; } return $Regs; }
<?php include '../../includes/inc.main.php'; $Country = new GeolocationCountry(); $Head->setTitle("Países"); $Head->setIcon($Menu->GetHTMLicon()); $Head->setSubTitle($Menu->GetTitle()); $Head->setHead(); /* Header */ include '../../includes/inc.top.php'; /* Body Content */ // Search List Box $Country->ConfigureSearchRequest(); echo $Country->InsertSearchList(); // Help Modal //include('modal.help.php'); /* Footer */ $Foot->SetScript('../../js/script.searchlist.js'); include '../../includes/inc.bottom.php';