/** * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this Usuario is new, it will return * an empty collection; or if this Usuario has previously * been saved, it will retrieve related Solicituds from storage. * * This method is protected by default in order to keep the public * api reasonable. You can provide public methods for those you * actually need in Usuario. * * @param Criteria $criteria optional Criteria object to narrow the query * @param PropelPDO $con optional connection object * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN) * @return PropelCollection|array Solicitud[] List of Solicitud objects */ public function getSolicitudsJoinSolicitud_estado($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $query = SolicitudQuery::create(null, $criteria); $query->joinWith('Solicitud_estado', $join_behavior); return $this->getSolicituds($query, $con); }
foreach ($audiolibros as $reg) { //if(!array_key_exists($reg->getId(), $arr)){ //$arr[$reg->getId()] = ""; $listaaudios .= "<li>" . $reg->getNombre() . "</li>"; //$options .= "<option value = '".$reg->getId()."'>".$reg->getNombre()."</option> "; //$options .= "<option value = '".$reg->getId()."'>".$reg->getNombre()."</option> "; //$options .= "<option value = '".$reg->getId()."'>".$reg->getNombre()."</option> "; // } //echo $listaLibros; //$listaLibros = ""; //$libros = LibroQuery::create()->find(); $comentario = ComentarioQuery::create()->find(); //$comenta = ComentarioQuery::create()->findOneById(2); $idSoli = $_GET['id']; $solicitud = SolicitudQuery::create()->findOneById($idSoli); ?> <div class="wrappers"> <div class="content-wrappers"> <section class="content"> <div class="row"> <div class="col-md-3"> <!-- Profile Image --> <div class="box box-primary"> <div class="box-body box-profile"> <div class='form-group margin-bottom-none'> <?php if ($libro->getEstado() == NULL || $libro->getEstado() == "p") { echo '<div style="color: red;">Libro pendiente de verificacion.</div>' . '<button class="btn btn-block btn-success btn-xs" onclick = "verificar_libro()">Marcar libro como verificado</button>'; } if ($_SESSION['userid'] == ID_ADMIN_USER) {
<table id="lista_clasif" class="table table-bordered table-striped"> <thead> <tr> <th>Usuario</th> <th>Libro</th> <th>Texto corto</th> <th>Texto largo</th> <th>Postularse</th> </tr> </thead> <tbody> <?php if ($clasificados != null) { foreach ($clasificados as $reg) { // if (SolicitudQuery::create()->filterById_usuario_solicitante($_SESSION['userid'])->filterById_libro($reg->getId_libro)->find()->count() == 0) { echo "<tr>\n <td>" . $reg->getLibro()->getUsuarioRelatedById_usuario()->getNombre() . "</td>\n <td>" . $reg->getLibro()->getNombre() . "</td>\n <td>" . $reg->getTexto_corto() . "</td>\n <td>" . $reg->getTexto_largo() . "</td>\n <td><a onclick = 'solicitarcolaborar(\"" . $reg->getId() . "\");'><i class='fa fa-fw fa-user-plus'></i></a></td>\n </tr>"; } } } /*else{ echo "<tr> <td>No se encontraron registros</td> <td></td> <td></td> <td></td> <td></td> </tr>"; }*/ ?>
/** * Removes this object from datastore and sets delete attribute. * * @param PropelPDO $con * @return void * @throws PropelException * @see BaseObject::setDeleted() * @see BaseObject::isDeleted() */ public function delete(PropelPDO $con = null) { if ($this->isDeleted()) { throw new PropelException("This object has already been deleted."); } if ($con === null) { $con = Propel::getConnection(SolicitudPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } $con->beginTransaction(); try { $deleteQuery = SolicitudQuery::create()->filterByPrimaryKey($this->getPrimaryKey()); $ret = $this->preDelete($con); if ($ret) { $deleteQuery->delete($con); $this->postDelete($con); $con->commit(); $this->setDeleted(true); } else { $con->commit(); } } catch (Exception $e) { $con->rollBack(); throw $e; } }