Beispiel #1
0
function parametroGetAll()
{
    $pms = getTable("parametros", "", "");
    $p = array();
    while ($row = foreachRow($pms)) {
        $p[$row['chave']] = $row['valor'];
    }
    return $p;
}
Beispiel #2
0
function modalidadeNaoExistente($id_delegacao)
{
    $t = getTable('modalidades_nao_existentes', 'id_delegacao = ' . dbInteger($id_delegacao), '');
    $ids = array();
    while ($row = foreachRow($t)) {
        $ids[] = $row['id_modalidade'];
    }
    if (count($ids) == 0) {
        $ids[] = -1;
    }
    return modalidadeGetAll($ids);
}
Beispiel #3
0
function elementoNaoInscritoEmEquipa($id_equipa)
{
    $t = getTable('elementos_equipas_nao_inscritos', 'tipo = \'A\' AND id_equipa = ' . dbInteger($id_equipa), '');
    $ids = array();
    while ($row = foreachRow($t)) {
        $ids[] = $row['id_elemento'];
    }
    if (count($ids) == 0) {
        $ids[] = -1;
    }
    return elementoGetAll($ids);
}
function equipaNaoInscritaEmProva($id_prova, $id_modalidade, $id_delegacao)
{
    $where = 'equipa_id_modalidade = ' . dbInteger($id_modalidade);
    $where .= ' AND id_prova = ' . dbInteger($id_prova);
    if ($id_delegacao != -1) {
        $where .= ' AND id_delegacao = ' . dbInteger($id_delegacao);
    }
    $t = getTable('provas_classificacoes_equipas_nao_inscritos', $where, '');
    $ids = array();
    while ($row = foreachRow($t)) {
        $ids[] = $row['id_equipa'];
    }
    if (count($ids) == 0) {
        $ids[] = -1;
    }
    return equipaGetAll($ids);
}
Beispiel #5
0
?>
">
			<td>
				<label for="ipt_Habilitacoes">Habilitações:</label>
			</td>
			<td colspan="3">
				<input type="text" id="ipt_Habilitacoes" name="habilitacoes" value="<?php 
echo $habilitacoes;
?>
" disabled="disabled" />
			</td>
		</tr>
		
		<tr>
			<td>Modalidades:</td>
			<td>
			<!-- pesquisa em (elementos_equipas_total) pelo id_elemento -->
			<?php 
$elemento_modalidades = elementoModalidades($id_elemento);
while ($row = foreachRow($elemento_modalidades)) {
    echo $row['modalidade_nome'] . "</br>";
}
?>
			</td>
		</tr>
	</table>
</form>
<a href="index.php" class="seta-invertida" style="margin-top:10px;">Voltar</a>
<!-- <h1 class="footer_h1"></h1> -->
<?php 
include rootPath('includes/sijo/master_footer.php', 1);
Beispiel #6
0
</h1>
<table id="tableresults" class="tableclass">
	<tr class="rowHeader">
		<th>ID</th>
		<th>Local</th>
		<th>Data</th>
		<th>Modalidade</th>
		<th title="Minutos (min)">Duração</th>
		<th title="Euros (€)">Preço</th>
		<th title="Lotação (Vendidos/Reservados)">Lotação</th>
		<th></th>
	</tr>
<?php 
$alt = true;
$mods = provaGetByFiltro(-1, -1, null, array('X'));
while ($row = foreachRow($mods)) {
    $alt = !$alt;
    ?>
	<tr class="<?php 
    echo $alt ? 'rowalternative' : '';
    ?>
">
		<td><?php 
    echo $row['id_prova'];
    ?>
</td>
		<td title="<?php 
    echo $row['local_descricao'];
    ?>
"><?php 
    echo $row['local_nome'];
Beispiel #7
0
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <form name="changegr" class="form-horizontal" >
                <fieldset>

                    <!-- Form Name -->
                    <legend>Eliminar Funcionário</legend>
                        
                        <div class="form-group">
                        	<label class="col-sm-3 control-label" for="textinput">Funcionário</label>
                        	<div class="col-sm-4 ">
	                            <select id="cbfuncionario" class="form-control">
		                        <option></option>
		                        <?php 
$user = loginGetAllWithoutAdmin();
while ($us = foreachRow($user)) {
    ?>
		                            <option value="<?php 
    echo $us['id'];
    ?>
"><?php 
    echo $us['name'];
    ?>
</option>
		                            <?php 
}
?>
		                    </select>  
		           	</div> 
		           	<div class="col-sm-3">
	                                <input type="button" onclick="delUser()" class="btn btn-primary" value="Desativar">
Beispiel #8
0
function massaGetById($id)
{
    $t = getTable("pp_massa", "pp_massa_id = " . dbInteger($id), "");
    return foreachRow($t);
}
Beispiel #9
0
<?php

include 'includes/header.php';
?>

<?php 
//dia actual
$date_atual = date('Y-m-d');
$date_mais8 = date("Y-m-d", strtotime($date_atual . ' + 8 days'));
$textmail = '<html><body>';
$table = encomendasGetByFiltro("pp_enc_datedone >= " . dbString($date_atual) . " AND pp_enc_datedone <= " . dbString($date_mais8) . " AND pp_enc_datalevantamento is NULL AND pp_enc_enable = 1", "pp_enc_datedone");
while ($row = foreachRow($table)) {
    $textmail .= '<h2 style="color:blue"> Encomenda Nº ' . $row['pp_enc_id'] . '</h2>';
    $textmail .= '<b>Data do levantamento da encomenda:</b> ' . $row['pp_enc_datedone'] . '<br/>';
    $textmail .= '<b>Nome do cliente:</b> ' . $row['pp_enc_clientname'] . '<br/>';
    $textmail .= '<b>Contacto do cliente:</b> ' . $row['pp_enc_clientcontact'] . '<br/>';
    $textmail .= '<b>Data de criação da encomenda:</b> ' . $row['pp_enc_dateenc'] . '<br/>';
    if ($row['pp_enc_idbolonosso'] == '') {
        $textmail .= '<b>Fez a selecção através de um bolo nosso:</b> Não<br/>';
    } else {
        $textmail .= '<b>Fez a selecção através de um bolo nosso:</b> Sim<br/>';
        $bolonosso = boloGetById($row['pp_enc_idbolonosso']);
        //mail
        $textmail .= '<img height="150" width="250" src="' . $bolonosso['pp_bolo_urlimage'] . '"/><br/>';
    }
    $textmail .= '<h4 style="color:green">Composição:</h4>';
    if ($row['pp_enc_coberturaid'] == '') {
        $textmail .= '<b>Cobertura:</b> ' . $row['pp_enc_coberturaoutra'] . '<br/>';
    } else {
        $data_cob = coberturaGetById($row['pp_enc_coberturaid']);
        $textmail .= '<b>Cobertura:</b> ' . $data_cob['pp_cobertura_designacao'] . '<br/>';
Beispiel #10
0
function reparadorGetById($id)
{
    $t = getTable("reparador", "rep_id = {$id}", "");
    return foreachRow($t);
}
Beispiel #11
0
function modifBolosGetById($id)
{
    $t = getTable("pp_modif_bolos", "pp_modif_id = " . dbInteger($id), "");
    return foreachRow($t);
}
Beispiel #12
0
        break;
    case "delegacoes":
        switch ($output) {
            case "xml":
                $xml = '<?xml version="1.0" encoding="ISO-8859-1" ?>';
                $xml .= '<countries>';
                $delegacoes = delegacaoGetByFiltro(-1, null, array('X'));
                while ($country = foreachRow($delegacoes)) {
                    $xml .= '<country>';
                    $xml .= '<id>' . $country['id_pais'] . '</id>';
                    $xml .= '<name>' . $country['pais_nome'] . '</name>';
                    $xml .= '<responsible>' . $country['nome_responsavel'] . '</responsible>';
                    $xml .= '<average_age>' . $country['media_idade'] . '</average_age>';
                    $xml .= '<medals_gold>' . $country['ouro'] . '</medals_gold>';
                    $xml .= '<medals_silver>' . $country['prata'] . '</medals_silver>';
                    $xml .= '<medals_bronze>' . $country['bronze'] . '</medals_bronze>';
                    $xml .= '</country>';
                }
                $xml .= '</countries>';
                echo $xml;
                break;
            case "json":
                $delegacoes = delegacaoGetByFiltro(-1, null, array('X'));
                while ($a = foreachRow($delegacoes)) {
                    $x[] = array('id_delegacao' => $a['id_delegacao'], 'id_pais' => $a['id_pais'], 'pais_nome' => utf8_encode($a['pais_nome']), 'nome_responsavel' => utf8_encode($a['nome_responsavel']), 'media_idade' => $a['media_idade'], 'ouro' => $a['ouro'], 'prata' => $a['prata'], 'bronze' => $a['bronze']);
                }
                echo ujson_encode($x);
                break;
        }
}
closeDataBase();
Beispiel #13
0
        <!-- Loading Screen -->
        
        <div u="loading" style="position: absolute; top: 0px; left: 0px;">
            <div style="filter: alpha(opacity=70); opacity:0.7; position: absolute; display: block;
                background-color: #000000; top: 0px; left: 0px;width: 100%;height:100%;">
            </div>
            <div style="position: absolute; display: block; background: url(images/loading2.gif) no-repeat center center;
                top: 0px; left: 0px;width: 100%;height:100%;">
            </div>
        </div>

        <!-- Slides Container -->
        <div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 800px; height: 550px; overflow: hidden;">
        	
        	<?php 
    while ($bolo = foreachRow($table)) {
        ?>
                    <div><img u="image" src="<?php 
        echo $bolo['pp_bolo_urlimage'];
        ?>
"/></div>
                    <?php 
    }
    ?>
        	
        </div>
        
        <!--#region Bullet Navigator Skin Begin -->
        <!-- Help: http://www.jssor.com/development/slider-with-bullet-navigator-jquery.html -->
        <style>
            /* jssor slider bullet navigator skin 05 css */
Beispiel #14
0
function gregGetLastNumberGr($year)
{
    $t = getNumberGr("grep", "gr_number LIKE '%" . $year . "-%'", "gr_number", "1", "gr_number", "DESC");
    return foreachRow($t);
}
Beispiel #15
0
function coberturaGetById($id)
{
    $t = getTable("pp_cobertura", "pp_cobertura_id = " . dbInteger($id), "");
    return foreachRow($t);
}
Beispiel #16
0
</b>
		</td>
		<td>
			<form action="modalidades_paises.php" method="GET">
				<input type="hidden" name="id_modalidade" value="<?php 
    echo $modalidade_linha['id_modalidade'];
    ?>
" />
				<input type="image" src="/pw606/img/funnel_add.png" title="Filtrar" onsubmit="submit-form();">
			</form>
		</td>
	</tr>
<?php 
    $alt = true;
    $equipas = equipasPorModalidade($modalidade_linha['id_modalidade'], null, array('X'));
    while ($row = foreachRow($equipas)) {
        $alt = !$alt;
        ?>
	<tr class="<?php 
        echo $alt ? "rowalternative" : "";
        ?>
">
		<td><?php 
        echo $row['id_equipa'];
        ?>
</td>
		<td>
		<!-- imagem do país -->
			<img src="/pw606/img/countries/16/<?php 
        echo $row['id_pais'];
        ?>
Beispiel #17
0
function viewBoloGetById($id)
{
    $t = getTable("view_nossobolos", "pp_bolo_id = " . dbInteger($id), "");
    return foreachRow($t);
}
Beispiel #18
0
function loginGet($id)
{
    $t = getTable("users", "us_id = {$id}", "");
    return foreachRow($t);
}
Beispiel #19
0
function visitanteGetByEmail($email)
{
    $t = getTable("visitantes", "email = " . dbString($email), "");
    return foreachRow($t);
}
Beispiel #20
0
<?php

require_once '../../includes/utils.php';
include_once rootPath('includes/sijo/html_header.php', 1);
include_once rootPath('includes/sijo/master_header.php', 1);
$_POST['tipo'] = substr($_POST['tipo'], 0, 1) == 'C' ? 'C' : 'R';
$b = bilheteGetByFiltro($current_user['id_visitante'], null, array('X'));
$local = localGet($_POST['id_local']);
$x = array();
while ($a = foreachRow($b)) {
    $x[] = array('id_bilhete' => $a['id_bilhete'], 'acontecmento' => $a['acontecimento'], 'acontecimento_tipo' => $a['acontecimento_tipo'], 'tipo_descricao' => $a['tipo_descricao'], 'id_entidade' => $a['id_entidade'], 'acontecimento_data' => strtotime($a['acontecimento_data']), 'acontecimento_dataString' => $a['acontecimento_data'], 'acontecimento_duracao' => $a['acontecimento_duracao'] * 60, 'latitude' => $a['latitude'], 'longitude' => $a['longitude'], 'acontecimento_designacao' => utf8_encode($a['acontecimento_designacao']));
}
?>
<h1 class="header_h1"><?php 
echo $_POST['tipo'] == 'C' ? 'Compra' : 'Reserva';
?>
 de Bilhete</h1>
<form action="buy_db.php" method="post">
	<table>
		<tr>
			<td>
				<label><?php 
echo $_POST['acontecimento'] == 'E' ? 'Evento' : 'Prova';
?>
:</label>
			</td>
			<td>
				<input type="text" value="<?php 
echo $_POST['nome'];
?>
" readonly="readonly" />
Beispiel #21
0
function recheioGetById($id)
{
    $t = getTable("pp_recheio", "pp_recheio_id = " . dbInteger($id), "");
    return foreachRow($t);
}
Beispiel #22
0
function localGet($id)
{
    $t = getTable("locais", "id_local = " . dbInteger($id), "");
    return foreachRow($t);
}
Beispiel #23
0
function encomendasGetById($id)
{
    $t = getTable("pp_encomendas", "pp_enc_id = " . dbInteger($id), "");
    return foreachRow($t);
}
Beispiel #24
0
function provaGet($id)
{
    $t = getTable('provas_total', 'id_prova = ' . dbInteger($id), '');
    return foreachRow($t);
}
Beispiel #25
0
<h2>Elementos Inscritos</h2>
<table id="tblinscritos" class="tableclass">
	<tr>
		<th>ID</th>
		<th>Inscricao</th>
		<th>Atleta</th>
		<th>Nome</th>
		<th>Sexo</th>
		<th>Nascimento</th>
		<th></th>
	</tr>
<?php 
$elementos = elementoEquipaGetByFiltro(-1, $id_equipa, -1, null, array('X'));
$delegacao = -1;
$alt = false;
while ($row = foreachRow($elementos)) {
    $alt = !$alt;
    if ($delegacao !== $row['id_delegacao']) {
        $delegacao = $row['id_delegacao'];
        $alt = false;
        ?>
	<tr class="rowgroup">
		<td colspan="7">
			<img src="/pw606/img/countries/16/<?php 
        echo $row['id_pais'];
        ?>
.png" />
			<b><?php 
        echo $row['pais_nome'];
        ?>
<b>
Beispiel #26
0
	                        <div class="form-group" id="recheionova" style="display: none">
	                            <label class="col-sm-2 control-label" for="textinput" ></label>
	                            <div class="col-sm-10">
	                                <input type="text" name="novorecheio" id="novorecheio" class="form-control" maxlength="79"/>                            
	                            </div>                            
	                        </div>
	                        
	                        <!--Massa-->
	                        <div class="form-group">
	                            <label class="col-sm-2 control-label" for="textinput" >Massa</label>
	                            <div class="col-sm-10">
	                                <select id="cbmassa" class="form-control">
			                        <option></option>
			                        <?php 
$massa = massaGetAll();
while ($ma = foreachRow($massa)) {
    if ($data['pp_bolo_massaid'] == $ma['pp_massa_id']) {
        ?>
			                            	<option value="<?php 
        echo $ma['pp_massa_id'];
        ?>
" selected><?php 
        echo $ma['pp_massa_designacao'];
        ?>
</option>
			                            	<?php 
    } else {
        ?>
			                            	<option value="<?php 
        echo $ma['pp_massa_id'];
        ?>
Beispiel #27
0
	<tr>
		<th>ID</th>
		<th>Inscrição</th>
		<th>Classificação</th>
		<th>Nome</th>
		<th>País</th>
		<th></th>
	</tr>
<?php 
if ($prova_modalidade_tipo == 'C') {
    $entidades = provaClassificacaoEquipaGetByFiltro($id_prova, null, array('X'));
} else {
    $entidades = provaClassificacaoElementoGetByFiltro($id_prova, null, array('X'));
}
$alt = true;
while ($row = foreachRow($entidades)) {
    $alt = !$alt;
    ?>
	<tr class="<?php 
    echo $alt ? "rowalternative" : "";
    ?>
">
<?php 
    if ($prova_modalidade_tipo == 'C') {
        // ENTIDADE COLECTIVA
        ?>
		<td><?php 
        echo $row['id_classificacao'];
        ?>
</td>
		<td>
Beispiel #28
0
        				$texto = "SMS não entregue";
        				break;
        			default:
        				$texto = "Verificar script da noite";
        				break;
        		}*/
    }
}
unset($where);
unset($table);
unset($data);
$textmail = '<html><body>';
//$titulo = "Indiferenciado";
//$numerowhile = 0;
$tablesection = sectionGetAll();
while ($sec = foreachRow($tablesection)) {
    $titulo = $sec['sec_name'];
    $numerowhile = $sec['sec_id'];
    $where = 'date_in  >= ' . dbString($date_menos15) . ' AND date_torep IS NULL AND date_tocliente IS NULL AND id_section = ' . $numerowhile;
    $table = grepGetByFiltro($where, 'date_in');
    $textmail .= '<h2>' . $titulo . '</h2><br/>';
    $textmail .= 'Reparação pendentes <= a 15 dias que ainda não foram levantadas pelo reparador: <br/>';
    if (mysql_num_rows($table) > 0) {
        while ($data = mysql_fetch_array($table)) {
            //aqui vou ir buscar o numero do fornecedor
            $reparador = '';
            if ($data['rep_id'] > 0) {
                $data_rep = reparadorGetById($data['rep_id']);
                $reparador = $data_rep['rep_name'];
            } else {
                $reparador = 'Não foi enviado mail ao reparador ainda';
Beispiel #29
0
function equipaGet($id)
{
    $t = getTable('equipas_total', 'id_equipa = ' . dbInteger($id), '');
    return foreachRow($t);
}
Beispiel #30
0
function delegacaoGetByUser($user)
{
    $t = getTable("delegacoes_total", "login = "******"");
    return foreachRow($t);
}