HEX
Server: Apache
System: Linux clpupre 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64
User: undanet (1000)
PHP: 7.4.3
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/undanet/www//PortalEmpleo/src/Views/DetalleConvocatoriaView.php
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>

<?php
	$_SERVER['HTTPS'] = $_SERVER['HTTPS'] == 'off' ? '' : $_SERVER['HTTPS'];
	$root = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/';
	$rootwp = "";
	$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
     
	

	$idCandidatoWP = $data['candidatoWP'];
	$datares = array();
	if ( isset( $data['resoluciones'] ) ){
		for ( $i = 0; $i < count( $data['resoluciones'] ); $i++ ) {
			if ($data['resoluciones'][$i]->getVisible())
				array_push(	$datares, $data['resoluciones'][$i] );
		} 
		
	}

	$datalconvocatorias = $data['lconvocatorias'];

	$data = $data['convocatoria'];
	
	
	const CODIGO_ESTADO_ABIERTA = 1;
?>
    
	<div class="wrap-content" ng-app="">
		<table border="0">
			<tbody>
				<tr>
					<td>
                    <?php
                      echo '<label for="txtReferencia">' . __('Reference', 'panoramic_child') . ':</label></td>';
                    ?>
					


					</td>
					<td>
						<?php
							if(isset($data) && is_object($data))
							{
								echo '<input type="text" name="txtReferencia" id="txtReferencia" value="' . $data->getReferencia() . '" disabled>';
							}
							else
							{
								echo '<input type="text" name="txtReferencia" id="txtReferencia" disabled>';
							}
						?>
					</td>
				</tr>
				<?php if( pll_current_language() == 'es') { ?>
					<tr>
						<td>

						<?php
						  echo '<label for="txtDescripcion">' . __('Description', 'panoramic_child') . ':</label></td>';
						?>
							
						</td>
						<td>
							<?php
								if(isset($data) && is_object($data))
								{
									echo '<input type="text" name="txtDescripcion" id="txtDescripcion" value="' . $data->getDescripcion() . '" disabled>';
								}
								else
								{
									echo '<input type="text" name="txtDescripcion" id="txtDescripcion" disabled>';
								}
							?>
						</td>
					</tr>
				<?php } else { ?>
				<tr>
					<td>

					<?php
                      echo '<label for="txtDescripcionen">' . __('Description', 'panoramic_child') . ':</label></td>';
                    ?>
						
					</td>
					<td>
						<?php
							if(isset($data) && is_object($data))
							{
								echo '<input type="text" name="txtDescripcionen" id="txtDescripcionen" value="' . $data->getDescripcionEn() . '" disabled>';
							}
							else
							{
								echo '<input type="text" name="txtDescripcionen" id="txtDescripcionen" disabled>';
							}
						?>
					</td>
				</tr>
				<?php } ?>
			  	<tr>
					<td>

					<?php
                      echo '<label for="txtReferencia">' . __('Job', 'panoramic_child') . ':</label></td>';
                    ?>
						
					</td>
					<td>
						<?php
							if(isset($data) && is_object($data))
							{
								echo '<input type="text" name="txtPuestoTrabajo" id="txtPuestoTrabajo" value="' . $data->getPuestoTrabajo() . '" disabled>';
							}
							else
							{
								echo '<input type="text" name="txtPuestoTrabajo" id="txtPuestoTrabajo" disabled>';
							}
						?>
					</td>
			  	</tr>
			  	<tr>
					<td>

					<?php
                      echo '<label for="txtReferencia">' . __('Center', 'panoramic_child') . ':</label></td>';
                    ?>
						
					</td>
					<td>
						<?php
							if(isset($data) && is_object($data))
							{
								echo '<input type="text" name="txtCentro" id="txtCentro" value="' . $data->getCentro() . '" disabled>';
							}
							else
							{
								echo '<input type="text" name="txtCentro" id="txtCentro" disabled>';
							}
						?>
					</td>
			  	</tr>
			  	<tr>
					<td>

					<?php
                      echo '<label for="txtReferencia">' . __('Start Date', 'panoramic_child') . ':</label></td>';
                    ?>

						
					</td>
					<td>
						<?php
							if(isset($data) && is_object($data))
							{
								echo '<input type="hidden" name="dtFechaInicio" id="dtFechaInicio" value="' . 
								$data->getFechaInicio()->format('Y-m-d') . '" required>';
								echo '<input type="date" name="dtFechaInicio" id="dtFechaInicio" value="' . 
								$data->getFechaInicio()->format('Y-m-d') . '" disabled="true">';
							}
							else
							{
								echo '<input type="date" name="dtFechaInicio" id="dtFechaInicio" value="'. date("d-m-Y\TH-i") . '">';
							}
						?>
					</td>
			  	</tr>
			  	<tr>
					<td>

					<?php
                      echo '<label for="txtReferencia">' . __('End Date', 'panoramic_child') . ':</label></td>';
                    ?>

					</td>
					<td>
						<?php
							if(isset($data) && is_object($data))
							{
								if($data->getFechaFin()->format('Y-m-d')<date("Y-m-d"))
								{
									echo '<input type="hidden" name="dtFechaFin" id="dtFechaFin" value="' . 
									$data->getFechaFin()->format('Y-m-d') . '" required>';
								}
								echo '<input type="date" name="dtFechaFin" id="dtFechaFin" value="' . 
								$data->getFechaFin()->format('Y-m-d') . '"';
								echo ' disabled>';
							}
							else
							{
								echo '<input type="date" name="dtFechaFin" id="dtFechaFin" value="'. date("d-m-Y\TH-i") . '" disabled>';
							}

							echo '<input type="date" name="dtFechaUltimaActualizacion" id="dtFechaUltimaActualizacion" value="'. date("Y-m-d") . '" hidden="true" disabled>';
						?>
					</td>
			  	</tr>
				<tr>
					<td>



					<?php
                      echo '<label for="txtReferencia">' . __('PDF General Bases', 'panoramic_child') . ':</label></td>';
                    ?>
						
					</td>
					<td>
						<?php
							if(isset($data) && is_object($data))
							{
								//echo '<a href="' . $data->getRutaarchivoconvocatoria() . '" target="_blank">' . $data->getRutaarchivoconvocatoria()  . '</a>';
								echo '<a href="' . $root . 'descargaC/?ref=' . $data->getReferencia() . '&file=' . basename($data->getRutaarchivoconvocatoria()) . '" target="_blank">' . basename($data->getRutaarchivoconvocatoria())  . '</a>';
							}
						?>
					</td>
				</tr>
				<?php if(isset($data) && is_object($data) && $data->getRutaarchivoespecifico() != null) { ?>
				<tr>
					<td>

					<?php
                      echo '<label for="txtReferencia">' . __('PDF Specific Bases', 'panoramic_child') . ':</label></td>';
                    ?>
						
					</td>
					<td>
						<?php
							if(isset($data) && is_object($data))
							{
								echo '<a href="' . $root . 'descargaC/?ref=' . $data->getReferencia() . '&file=' . basename($data->getRutaarchivoespecifico()) . '" target="_blank">' . basename($data->getRutaarchivoespecifico())  . '</a>';
							}
						?>
					</td>
				</tr>
				<?php } ?>




				<tr>
					<td>

					<?php
                      echo '<label for="txtReferencia">' . __('Requirements Resolution PDF', 'panoramic_child') . ':</label></td>';
                    ?>
						
					</td>
					<td>
						<?php
							if(isset($data) && is_object($data))
							{
								//echo '<a href="' . $data->getRutaarchivorequisitos() . '" target="_blank">' . $data->getRutaarchivorequisitos()  . '</a>';
								echo '<a href="' . $root . 'descargaC/?ref=' . $data->getReferencia() . '&file=' . basename($data->getRutaarchivorequisitos()) . '" target="_blank">' . basename($data->getRutaarchivorequisitos())  . '</a>';
							}
						?>
					</td>
				</tr>
                <?php if(isset($data) && is_object($data) && $data->getRutaarchivoexamen() != null) { ?>
                    <tr>
                        <td>

                            <?php
                            echo '<label for="txtReferencia">' . __('Exam Resolution pdf', 'panoramic_child') . ':</label></td>';
                            ?>

                        </td>
                        <td>
                            <?php
                            if(isset($data) && is_object($data))
                            {
                                echo '<a href="' . $root . 'descargaC/?ref=' . $data->getReferencia() . '&file=' . basename($data->getRutaarchivoexamen()) . '" target="_blank">' . basename($data->getRutaarchivoexamen())  . '</a>';
                            }
                            ?>
                        </td>
                    </tr>
                <?php } ?>
				<tr>
					<td>

					<?php
                      echo '<label for="txtReferencia">' . __('End Resolution PDF', 'panoramic_child') . ':</label></td>';
                    ?>

					</td>
					<td>
						<?php
							if(isset($data) && is_object($data))
							{
								//echo '<a href="' . $data->getRutaarchivoresolucionfinal() . '" target="_blank">' . $data->getRutaarchivoresolucionfinal()  . '</a>';
								echo '<a href="' . $root . 'descargaC/?ref=' . $data->getReferencia() . '&file=' . basename($data->getRutaarchivoresolucionfinal()) . '" target="_blank">' . basename($data->getRutaarchivoresolucionfinal())  . '</a>';
							}
						?>
					</td>
				</tr>
			  	</tr>
			  	<tr>
					<td><label for="txtWeb">Web:</label></td>
					<td>



						<?php
							if(isset($data) && is_object($data))
							{
								echo '<input type="text" name="txtWeb" id="txtWeb" value="' . $data->getUrlweb() . '" disabled>';
							}
							else
							{
								echo '<input type="text" name="txtWeb" id="txtWeb" disabled>';
							}
						?>
					</td>
				</tr>
				<tr>
					<td>
					
					<?php
                      echo '<label for="txtReferencia">' . __('State', 'panoramic_child') . ':</label></td>';
                    ?>

					</td>
					<td>
						<?php
							if(isset($data) && is_object($data))
							{
								echo '<input type="text" name="txtEstado" id="txtEstado" value="' . ($data->getCodigoestadoconvocatoria())->getEstado() . '" disabled>';
							}
							else
							{
								echo '<input type="text" name="txtEstado" id="txtEstado" disabled>';
							}
						?>		
					</td>
				</tr>
		</tbody>
		</table>
			<?php if( isset($datares) && $datares != null ) { ?>		
				<h2> <?php echo __('Extraordinary Resolutions', 'panoramic_child'); ?> </h2>
				<table>
						<?php 
						if(isset($datares))
						{
							for ( $i = 0; $i < count($datares); $i++ ) {
									echo '<tr><td>' . $datares[$i]->getDescripcion() . '</td><td>' . $datares[$i]->getFecharesolucion()->format('d/m/Y') . '</td><td><a href="' . $root . 'descargaC/?ref=' . $data->getReferencia() . '&file=' . basename($datares[$i]->getRutaficheroresolucion()) . '" target="_self">' . basename($datares[$i]->getRutaficheroresolucion())  . '</a></td></tr>';
							} 
						}
						?>
				</table>	
			<?php } ?>				
		<script language="javascript">
			function listar() {
				history.back();
			}		
		</script>

        <form method="post" name="frmConvocatoria" id="frmConvocatoria" action="<?php echo $actual_link?>">
		<?php


			echo '<input type="button" id="btnVolver" name="btnVolver" value="' . __('Back', 'panoramic_child') . '" onClick="listar();">';

			

			if(isset($data) && is_object($data))
			{
				if(isset($idCandidatoWP) && $idCandidatoWP!=null && is_numeric($idCandidatoWP) && ($data->getCodigoestadoconvocatoria())->getIdestadoconvocatoria()==CODIGO_ESTADO_ABIERTA)
				{
				
					if ( isset($datalconvocatorias) && yaEstaInscrito( $datalconvocatorias, $data->getIdconvocatoria() ) ) {
						
						echo '<span style="margin-left: 25px;font-weight: 500;color: #006489;">' .  __('You are already registered in this call', 'panoramic_child') . '</span>';
						
					}  else {
					
						echo '<input type="hidden" name="convReferencia" id="convReferencia" value="' . $data->getReferencia() . '">';

						
						echo '<button type="submit" id="btnInscribirse" name="accionConvocatoria" value="Register" class="margenes_laterales_4">' . __('Sign up for job offer', 'panoramic_child') . '</button>';
						
					}
					
				}
				else if((!isset($idCandidatoWP) || $idCandidatoWP==null) && ($data->getCodigoestadoconvocatoria())->getIdestadoconvocatoria()==CODIGO_ESTADO_ABIERTA)
				{
						echo '<div class="fondo_color" style="margin-top:1.5em;"><span>' . __('To sign up for any call you must register first at our employment portal. You can do it in the', 'panoramic_child') . '  '.' <a href="' . $root . __('en/login-2/', 'panoramic_child') . '" target="_self"><u>' . __('following link', 'panoramic_child') .' </u></a> ' . __('. Once you are registered, you can sign up for the call you want, accessing the call and selecting', 'panoramic_child') . ' "' . __('Sign up for job offer', 'panoramic_child') . '." </span></div>';
				}
			}
		?>
		</form>
	</div>