/**
  * Return an array of available items, suitable for dropDownList()
  * @param number $root  ID of root nodes to retrieve
  * @param string $level  The level of tree to retrieve
  * @return array $res  An associate array with key - value
  */
 public static function options($root = 0, $level = NULL)
 {
     $res = [];
     if ($root instanceof self) {
         $res[$root->id] = str_repeat('-', $root->level) . ' ' . $root->title;
         if ($level) {
             foreach ($root->children()->all() as $childRoot) {
                 $res += self::options($childRoot, $level - 1);
             }
         } elseif (is_null($level)) {
             foreach ($root->children()->all() as $childRoot) {
                 $res += self::options($childRoot, NULL);
             }
         }
     } elseif (is_scalar($root)) {
         if ($root == 0) {
             foreach (self::find()->roots()->all() as $rootItem) {
                 if ($level) {
                     $res += self::options($rootItem, $level - 1);
                 } elseif (is_null($level)) {
                     $res += self::options($rootItem, NULL);
                 }
             }
         } else {
             $root = self::find($root);
             if ($root) {
                 $res += self::options($root, $level);
             }
         }
     }
     return $res;
 }
Ejemplo n.º 2
0
 /**
  * Sorting method used for sorting numbers
  *
  * @param number $a
  * @param number $b
  * @return int
  */
 public function numberSort($a, $b)
 {
     $valA = $a->getColumn($this->columnToSort);
     $valB = $b->getColumn($this->columnToSort);
     if ($valA === false) {
         $valA = null;
     }
     if ($valB === false) {
         $valB = null;
     }
     return !isset($valA) && !isset($valB) ? 0 : (!isset($valA) ? 1 : (!isset($valB) ? -1 : ($valA != $valB || !isset($a->c[Row::COLUMNS]['label']) ? $this->sign * ($valA < $valB ? -1 : 1) : -1 * $this->sign * strnatcasecmp($a->c[Row::COLUMNS]['label'], $b->c[Row::COLUMNS]['label']))));
 }
Ejemplo n.º 3
0
 /**
  * Identifier string
  *
  * @param number|string|array|ExpressionInterface|RequestInterface $identifier
  * @param QueryInterface $query
  * @return string
  */
 protected function identifierToString($identifier, QueryInterface $query) : string
 {
     // Expression
     if ($identifier instanceof ExpressionInterface) {
         $query->addParameters($identifier->getParameters());
         $identifier = $identifier->getExpression();
     } elseif ($identifier instanceof RequestInterface) {
         return sprintf(static::MASK_NESTED, $this->requestToString($identifier, $query));
     } elseif (is_array($identifier)) {
         return $this->quoteArrayIdentifier($identifier);
     }
     return $this->quoteIdentifier($identifier);
 }
Ejemplo n.º 4
0
 /**
  * Sets a variable and its value.
  *
  * The variable will be extracted to the local scope of the template with
  * the same name given as parameter to the method. So setting a variable
  * named "title" will result in a $title variable available to the template.
  *
  * The value can be a string, a number or a PhpTemplate instance. In the
  * latter case, the variable content will be the result of the whole parsed
  * template of the PhpTemplate instance.
  *
  * The proper method for setting arrays is setArray().
  *
  * @since 1.1
  * @param string $name Name of the variable.
  * @param string|number|PhpTemplate $value variable content.
  * @see setArray()
  */
 public function set($name, $value)
 {
     if ($value instanceof \Innomatic\Tpl\Template) {
         // This is a subtemplate, process it.
         //
         $this->vars[$name] = $value->parse();
     } elseif (is_array($value)) {
         // This is an array, it must be passed encoded.
         //
         $this->vars[$name] = $value;
         $this->tplEngine->set($name, \Shared\Wui\WuiXml::encode($value));
     } elseif (is_numeric($value)) {
         // This is a number, it must be passed as it is.
         //
         $this->vars[$name] = $value;
         $this->tplEngine->set($name, $value);
     } else {
         // This is a string, it must be passed as a CDATA.
         //
         $this->vars[$name] = $value;
         $this->tplEngine->set($name, \Shared\Wui\WuiXml::cdata($value));
     }
 }
Ejemplo n.º 5
0
<?php

include "../../libraries/start.php";
require $dir_libraries . "form.php";
$form = new form();
require $dir_libraries . "date.php";
$date = new date();
require $dir_libraries . "number.php";
$number = new number();
require $dir_libraries . "dropdown.php";
$dropdown = new dropdown();
$id = $number->id('absensi', '10', '');
$jam = date('H:i:s');
$jam_dtg1 = substr($jam, 0, 2);
$jam_dtg2 = substr($jam, 3, 2);
$jam_dtg3 = substr($jam, 6, 2);
$jam_plg1 = substr($jam, 0, 2);
$jam_plg2 = substr($jam, 3, 2);
$jam_plg3 = substr($jam, 6, 2);
?>
  

<!DOCTYPE html>
<html lang="en">
    <head>
        <?php 
include $dir_subviews . "bs_meta.php";
?>
        <?php 
include $dir_subviews . "bs_css.php";
?>
Ejemplo n.º 6
0
<?php

require_once dirname(__FILE__) . '/../../app/setup.php';
require_once $BASE_DIR . 'core/number.php';
$conn = new connection_factory($param_conn);
$sql = "SELECT\n            n.nspname AS esquema, c.relname AS tabela, t.typname AS tipo\n        FROM\n            pg_class c\n        LEFT JOIN\n            pg_namespace n ON n.oid = c.relnamespace\n        LEFT JOIN\n            pg_type t ON t.oid = c.reltype\n        WHERE\n             c.relkind = 'r' AND\n             n.nspname IN ('financeiro','prato','public', 'saed', 'sicad');";
$tables = $conn->get_all($sql);
$num_registros = array();
foreach ($tables as $tb) {
    $sql = 'SELECT COUNT(*) FROM "' . $tb['esquema'] . '"."' . $tb['tabela'] . '";';
    $num_registros[$tb['esquema']] += $conn->get_one($sql);
}
arsort($num_registros, SORT_NUMERIC);
echo "<h3>N&uacute;mero de Registros no banco do Sistema Acadêmico <br /><br /> Esquemas</h3>";
foreach ($num_registros as $key => $value) {
    echo '<h4>' . $key . ': <font color="red">' . number::numeric2decimal_br($value, 0) . '</font></h4>';
}
Ejemplo n.º 7
0
 if ($flag_diff == 1 && $flag_media == 0 && $flag_maior == 0 && $nota != -1) {
     $flag_grava = 1;
 } else {
     $flag_grava = 0;
 }
 // GRAVA AS NOTAS NO BANCO DE DADOS
 // SO ATUALIZA A NOTA SE NAO EXISTIR A NOTA EXTRA E A SOMA FOR MENOR OU IGUAL A 100
 if ($flag_grava == 1 || $nota == -1) {
     $sql_update .= "UPDATE matricula\n                             SET \n\t\t\t\t\t\t\tnota_final = {$NotaFinal} \n                          WHERE \n                             ref_pessoa = {$aluno_id} AND\n                             ref_disciplina_ofer = {$diario_id} AND \n                             ref_periodo = '{$periodo}' AND\n                             ref_motivo_matricula = 0; ";
     // AND ref_disciplina = '$getdisciplina'
     $sql_update .= "UPDATE \n                     diario_notas \n                  SET \n                     nota = {$nota} \n                  WHERE \n                     ref_diario_avaliacao = '{$prova}' AND \n\t\t\t\t\t d_ref_disciplina_ofer = {$diario_id} AND\n\t\t\t\t\t ra_cnec = '{$aluno_id}';";
     if ($nota > -1 || $flag_grava == 1) {
         $msg_registros .= "<font color=\"#000000\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">Nota <font color=\"#FF0000\"><strong>{$NotaReal}</strong></font> registrada para o aluno(a) <strong>{$nome_aluno}</strong>({$aluno_id})<br></font>";
     }
     if ($nota == -1 && $nota_extra != -1) {
         $msg_registros .= "<font color=\"#000000\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><font color=\"blue\" ><strong>Nota extra " . number::numeric2decimal_br($nota_extra, 1) . " eliminada!</strong></font>: aluno(a) <strong>{$nome_aluno}</strong>({$aluno_id}) <br></font>";
     }
 } else {
     if ($flag_diff == 0) {
         $msg_registros .= "<font color=\"#000000\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><font color=\"blue\" ><strong>Nenhuma altera&ccedil;&atilde;o: </strong></font> aluno(a) <strong>{$nome_aluno}</strong>({$aluno_id}) <br></font>";
     } else {
         // A NOTA DO ALUNO ULTRAPASSOU 100 OU JA FOI LANCADA A NOTA EXTRA
         if ($nota != -1) {
             if ($flag_maior == 1) {
                 $msg_registros .= "<font color=\"#000000\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><font color=\"blue\" ><strong>Nota {$NotaReal} n&atilde;o registrada, poss&iacute;veis causas: </strong></font><font color=\"#FF0000\"><strong>NOTA EXTRA OU M&Eacute;DIA > 100 pontos</strong></font>: aluno(a) <strong>{$nome_aluno}</strong>({$aluno_id}) <br></font>";
             } else {
                 if ($flag_media == 1) {
                     $msg_registros .= "<font color=\"#000000\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><font color=\"blue\" ><strong>Nota {$NotaReal} n&atilde;o registrada, poss&iacute;veis causas: </strong></font><font color=\"#FF0000\"><strong>M&Eacute;DIA >= 60 pontos</strong></font>: aluno(a) <strong>{$nome_aluno}</strong>({$aluno_id}) <br></font>";
                 }
             }
         }
Ejemplo n.º 8
0
<?php

require "../../../libraries/start.php";
require $dir_libraries . "custom.php";
$custom = new custom();
require $dir_libraries . "image.php";
$image = new image();
require $dir_libraries . "date.php";
$date = new date();
require $dir_libraries . "form.php";
$form = new form();
require $dir_libraries . "number.php";
$number = new number();
if (isset($_POST['save'])) {
    $nama = $form->input('nama');
    $id_tipe = $form->input('id_tipe');
    $id_no = $form->input('id_no');
    $jabatan = $form->input('jabatan');
    $aktif = $form->input('aktif');
    $tempat = $form->input('tempat');
    $tgl_lahir = $date->dateEnglishMinus($form->input('tgl_lahir'));
    $jns_kelamin = $form->input('jns_kelamin');
    $agama = $form->input('agama');
    $pernikahan = $form->input('pernikahan');
    $pekerjaan_id = $form->input('pekerjaan_id');
    $pendidikan = $form->input('pendidikan');
    $alamat = $form->input('alamat');
    $rt = $form->input('rt');
    $rw = $form->input('rw');
    $propinsi_id = $form->input('propinsi_id');
    $kota_id = $form->input('kota_id');
Ejemplo n.º 9
0
            case 1:
                echo ", равно 1";
                break;
            case 2:
                echo ", равно 2";
                break;
            case 3:
                echo ", равно 3";
                break;
            case 4:
                echo ", равно 4";
                break;
            case 5:
                echo ", равно 5";
                break;
            case 6:
                echo ", равно 6";
                break;
            case 7:
                echo ", равно 7";
                break;
            case 8:
                echo ", равно 8";
                break;
        }
    }
}
$number = new number();
$number->create_number();
$number->finding();
$number->finding_number();
Ejemplo n.º 10
0
            continue;
        }
        $situacao = '';
        if (verificaAprovacao($aluno, $curso, $disciplina_ofer)) {
            $situacao = 'A';
        } else {
            $situacao = '<span style="color: red; font-weight: bold;">R</span>';
        }
        if (!verificaPeriodo($periodo) && $disciplina_aluno['fl_finalizada'] == 'f') {
            $situacao = 'M';
        }
        echo '<td align="center">' . number::numeric2decimal_br($disciplina_aluno['nota_final'], 1) . '</td>';
        echo '<td align="center">' . $disciplina_aluno['total_distribuido'] . '</td>';
        echo '<td align="center">' . number::numeric2decimal_br($media_disciplina, 1) . '</td>';
        echo '<td align="center">' . $disciplina_aluno['num_faltas'] . '</td>';
        echo '<td align="center">' . number::numeric2decimal_br(@($disciplina_aluno['num_faltas'] * 100 / $ch_realizada), 1) . '</td>';
        echo '<td align="center">' . $ch_realizada . '</td>';
        echo '<td align="center">' . $situacao . '</td>';
    }
    echo '</tr>';
}
?>
</table>
<br />
(<strong>*</strong>) Disciplina com lan&ccedil;amentos n&atilde;o finalizados, pass&iacute;vel de altera&ccedil;&otilde;es.
<br /><br />
<div align="left" style="font-size: 0.85em;">
    <h4>Legenda</h4>
    <strong>A</strong> - Aprovado<br />
    <strong>R</strong> - Reprovado <br />
    <strong>M</strong> - Matriculado <br /><br />
Ejemplo n.º 11
0
<?php

include "../../libraries/start.php";
require $dir_libraries . "form.php";
$form = new form();
require $dir_libraries . "dropdown.php";
$dropdown = new dropdown();
require $dir_libraries . "number.php";
$number = new number();
$id = $number->id('pegawai', '3', '');
?>
  

<!DOCTYPE html>
<html lang="en">
    <head>
        <?php 
include $dir_subviews . "bs_meta.php";
?>
        <?php 
include $dir_subviews . "bs_css.php";
?>
    </head>
    
    <body>
        <?php 
include $dir_subviews . "menu.php";
?>
        <?php 
//include $dir_subviews."header.php";
?>
Ejemplo n.º 12
0
<?php

require "../../../libraries/start.php";
require $dir_libraries . "custom.php";
$custom = new custom();
require $dir_libraries . "form.php";
$form = new form();
require $dir_libraries . "number.php";
$number = new number();
if (isset($_GET['step'])) {
    $step = $_GET['step'];
} else {
    $step = 0;
}
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <?php 
include $dir_subviews . "bs_meta.php";
?>
        <?php 
include $dir_subviews . "bs_css.php";
?>
    </head>
    
    <body>
        <?php 
include $dir_subviews . "menu.php";
?>
        
Ejemplo n.º 13
0
        <tr bgcolor="#cccccc">
			<td align="center"><b>Matr&iacute;cula</b></td>
			<td><b>Nome</b></td>
			<td align="center"><b>Nota</b></td>
			<td align="center"><b>Motivo</b></td>
		</tr>

<?php 
    foreach ($qry_dispensas as $row3) {
        $nome_f = $row3['nome'];
        $racnec = $row3['ra_cnec'];
        $racnec = str_pad($racnec, 5, "0", STR_PAD_LEFT);
        $num = $row3['ordem_chamada'];
        $motivo_matricula = $row3['ref_motivo_matricula'];
        if ($row3['nota_final'] != 0) {
            $nota = number::numeric2decimal_br($row3['nota_final'], 1);
        } else {
            $nota = $row3['nota_final'];
        }
        if ($nota < 60) {
            $nota = "<font color=\"red\"><b>{$nota}</b></font>";
        }
        // APROVEITAMENTO DE ESTUDOS 2
        // CERTIFICACAO DE EXPERIENCIAS 3
        // EDUCACAO FISICA 4
        switch ($motivo_matricula) {
            case 2:
                $motivo_matricula = 'Aproveitamento de estudos';
                break;
            case 3:
                $motivo_matricula = 'Certifica&ccedil;&atilde;o de experi&ecirc;ncia';
Ejemplo n.º 14
0
<?php

include "../../libraries/start.php";
require $dir_libraries . "form.php";
$form = new form();
require $dir_libraries . "number.php";
$number = new number();
require $dir_libraries . "dropdown.php";
$dropdown = new dropdown();
$id = $number->id('user_login', '3', '');
?>
  

<!DOCTYPE html>
<html lang="en">
    <head>
        <?php 
include $dir_subviews . "bs_meta.php";
?>
        <?php 
include $dir_subviews . "bs_css.php";
?>
    </head>
    
    <body>
        <?php 
include $dir_subviews . "menu.php";
?>
        <?php 
//include $dir_subviews."header.php";
?>
Ejemplo n.º 15
0
 if ($nota != $nota_atual) {
     $flag_diff = 1;
 } else {
     $flag_diff = 0;
 }
 if ($flag_diff == 1) {
     $NotaFinal = $nota_parcial + $nota;
 } else {
     $NotaFinal = $nota_parcial + $nota_atual;
 }
 if ($NotaFinal > 100) {
     $flag_maior = 1;
 } else {
     $flag_maior = 0;
 }
 $NotaReal = number::numeric2decimal_br($nota, 1);
 // SE NOTA EXTRA NÃO FOI LANCADA,
 // E A NOTA FOR DIFERENTE DA ANTERIOR E NÃO FOR MAIOR QUE 100 GRAVA
 // E O SOMATÓRIO DAS NOTAS DISTRIBUIDA É MENOR/IGUAL A 100
 // E A NOTA É MENOR/IGUAL O VALOR DA NOTA DISTRIBUIDA
 if ($flag_extra == 0 && $flag_diff == 1 && $flag_maior == 0 && $flag_nota_distribuida_maior == 0) {
     $flag_grava = 1;
 } else {
     $flag_grava = 0;
 }
 // GRAVA AS NOTAS NO BANCO DE DADOS
 // SO ATUALIZA A NOTA SE NAO EXISTIR A NOTA EXTRA E A SOMA FOR MENOR OU IGUAL A 100
 if ($flag_grava == 1) {
     $sql_update .= "UPDATE matricula\r\n                             SET \r\n\t\t\t\t\t\t\tnota_final = {$NotaFinal} \r\n                          WHERE \r\n                             ref_pessoa = {$aluno_id} AND\r\n                             ref_disciplina_ofer = {$diario_id} AND \r\n                             ref_periodo = '{$periodo}' AND\r\n                             ref_motivo_matricula = 0; ";
     // AND ref_disciplina = '$getdisciplina'
     $sql_update .= "UPDATE \r\n                     diario_notas \r\n                  SET \r\n                     nota = {$nota} \r\n                  WHERE \r\n\t\t\t\t     d_ref_disciplina_ofer = {$diario_id} AND\r\n                     ref_diario_avaliacao = '{$prova}' AND \r\n                     ra_cnec = '{$aluno_id}';";
function _desempenho_docente_importa($memory_limit, $csv_file)
{
    global $conn;
    $levantamento = '1001';
    $qry = '';
    $nao_sera_importado = '';
    if (!file_exists($csv_file)) {
        echo 'arquivo n&atilde;o encontrado: ' . $csv_file;
        return;
    }
    $csv_file = realpath($csv_file);
    // Automatically detect line endings.
    ini_set('auto_detect_line_endings', '1');
    $handle = @fopen($csv_file, 'r');
    $count_lines = count(file($csv_file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES));
    $count = 0;
    echo '<strong>Arquivo:</strong>&nbsp;&nbsp;' . basename($csv_file) . '<br /><br />';
    while (($line = fgetcsv($handle, 1000, '|')) !== FALSE) {
        //$verifica_associacao = 0;
        set_time_limit(60);
        $professor = (int) trim($line[1]);
        $disciplina_ofer = (int) trim($line[0]);
        echo $professor . ' - ' . $disciplina_ofer . '<br />';
        if ((!is_numeric($professor) || $professor == 0) && (!is_numeric($disciplina_ofer) || $disciplina_ofer == 0)) {
            continue;
        }
        //if (!is_numeric($disciplina_ofer) || $disciplina_ofer = 0) continue;
        //echo $disciplina_ofer . ' - ';
        // verifica associação professor <-> disciplina_ofer
        $sql_verifica = "SELECT ref_professor FROM disciplinas_ofer_prof ";
        $sql_verifica .= " WHERE ref_disciplina_ofer = {$disciplina_ofer} AND ";
        $sql_verifica .= " ref_professor = {$professor};";
        //echo $sql_verifica;
        $verifica_associacao = count($conn->adodb->GetAll($sql_verifica));
        echo 'associa: ' . $verifica_associacao . '<br />';
        if ($verifica_associacao == 1) {
            $qry_avaliacao = "BEGIN;";
            $nota_criterio_1 = number::decimal_br2numeric(trim($line[2]), 2);
            $qry_avaliacao .= "INSERT INTO desempenho_docente_nota VALUES ({$disciplina_ofer}, {$professor}, 1, {$levantamento}, {$nota_criterio_1});";
            $nota_criterio_2 = number::decimal_br2numeric(trim($line[3]), 2);
            $qry_avaliacao .= "INSERT INTO desempenho_docente_nota VALUES ({$disciplina_ofer}, {$professor}, 2, {$levantamento}, {$nota_criterio_2});";
            $nota_criterio_3 = number::decimal_br2numeric(trim($line[4]), 2);
            $qry_avaliacao .= "INSERT INTO desempenho_docente_nota VALUES ({$disciplina_ofer}, {$professor}, 3, {$levantamento}, {$nota_criterio_3});";
            $nota_criterio_4 = number::decimal_br2numeric(trim($line[5]), 2);
            $qry_avaliacao .= "INSERT INTO desempenho_docente_nota VALUES ({$disciplina_ofer}, {$professor}, 4, {$levantamento}, {$nota_criterio_4});";
            $nota_criterio_5 = number::decimal_br2numeric(trim($line[6]), 2);
            $qry_avaliacao .= "INSERT INTO desempenho_docente_nota VALUES ({$disciplina_ofer}, {$professor}, 5, {$levantamento}, {$nota_criterio_5});";
            $nota_criterio_6 = number::decimal_br2numeric(trim($line[7]), 2);
            $qry_avaliacao .= "INSERT INTO desempenho_docente_nota VALUES ({$disciplina_ofer}, {$professor}, 6, {$levantamento}, {$nota_criterio_6});";
            $qry_avaliacao .= "COMMIT;";
            $ret = $conn->adodb->Execute($qry_avaliacao);
            if ($ret === FALSE) {
                $qry .= $professor . ' - ' . $disciplina_ofer . '&nbsp;&nbsp;<font color="red">ERRO</font><br />';
            } else {
                $qry .= $professor . ' - ' . $disciplina_ofer . '&nbsp;&nbsp;<font color="green">OK</font><br />';
            }
        } else {
            // não existe associação professor <-> disciplina_ofer
            $sql_info = "SELECT descricao_disciplina(get_disciplina_de_disciplina_of({$disciplina_ofer})) || ' (' || {$disciplina_ofer} || ') - '";
            $sql_info .= " || pessoa_nome({$professor}) || ' (' || {$professor} || ')';";
            $nao_sera_importado .= $conn->adodb->GetOne($sql_info) . '  ' . $sql_verifica . '<br />';
        }
        $count++;
    }
    // endwhile;
    @fclose($handle);
    if (strlen($nao_sera_importado) > 0) {
        echo '<h3>N&atilde;o ser&aacute; importado os registros abaixo, pois n&atilde;o existe associa&ccedil;&atilde;o entre o professor(a) e a disciplina informadas</h3>';
        echo $nao_sera_importado;
    }
    if (strlen($qry) > 0) {
        echo '<h3>Resultado da importa&ccedil;&atilde;o</h3>';
        echo "<br />{$qry}<br />";
    } else {
        echo '<h3>Nenhum registro para importa&ccedil;&atilde;o</h3>';
    }
}
Ejemplo n.º 17
0
<?php

class number
{
    public function count($i, $from)
    {
        while ($i < $from) {
            echo $i . PHP_EOL;
            $i++;
        }
    }
}
$obj = new number();
echo $obj->count(0, 15) . PHP_EOL;
Ejemplo n.º 18
0
if (count($diarios_info) > 0) {
    foreach ($diarios_info as $disciplina_aluno) {
        $nao_finalizada = $disciplina_aluno['fl_finalizada'] == 'f' ? '<strong>*</strong>' : ' ';
        $color = $color != '#ffffff' ? '#ffffff' : '#cce5ff';
        $situacao = '';
        if (verificaAprovacao($aluno, $curso, $disciplina_aluno['ref_disciplina_ofer'])) {
            $situacao = 'A';
        } else {
            $situacao = '<span style="color: red; font-weight: bold;">R</span>';
        }
        if (!verificaPeriodo($periodo) && $disciplina_aluno['fl_finalizada'] == 'f') {
            $situacao = 'M';
        }
        echo '<tr bgcolor="' . $color . '">';
        echo '<td><a href="lista_notas_detalhe.php?c=' . $curso . '&p=' . $periodo . '&d=' . $disciplina_aluno['ref_disciplina_ofer'] . '" alt="Clique para detalhar a disciplina" title="Clique para detalhar a disciplina">' . $disciplina_aluno['descricao_disciplina'] . '</a>' . $nao_finalizada . '</td>';
        echo '<td align="center">' . number::numeric2decimal_br($disciplina_aluno['nota_final'], 1) . '</td>';
        echo '<td align="center">' . $disciplina_aluno['total_distribuido'] . '</td>';
        echo '<td align="center">' . $disciplina_aluno['num_faltas'] . '</td>';
        echo '<td align="center">' . $situacao . '</td>';
        echo '</tr>';
        $count++;
    }
}
?>
</table>
<br />
(<strong>*</strong>) Disciplina com lan&ccedil;amentos n&atilde;o finalizados, pass&iacute;vel de altera&ccedil;&otilde;es.
<br /><br />
<div align="left" style="font-size: 0.85em;">
    <h4>Legenda</h4>
    <strong>A</strong> - Aprovado<br />
<?php

require "../../../libraries/start.php";
require $dir_libraries . "custom.php";
$custom = new custom();
require $dir_libraries . "image.php";
$image = new image();
require $dir_libraries . "date.php";
$date = new date();
require $dir_libraries . "form.php";
$form = new form();
require $dir_libraries . "number.php";
$number = new number();
if (isset($_POST['save'])) {
    $id = $form->input('$id');
    $nama = $form->input('nama');
    $no_ktp = $form->input('no_ktp');
    $no_kta = $form->input('no_kta');
    $jabatan = $form->input('jabatan');
    $jenis = $form->input('jenis');
    $tempat = $form->input('tempat');
    $tgl_lahir = $date->dateEnglishMinus($form->input('tgl_lahir'));
    $alamat = $form->input('alamat');
    $rt = $form->input('rt');
    $rw = $form->input('rw');
    $kota = $form->input('kota');
    $kecamatan = $form->input('kecamatan');
    $desa = $form->input('desa');
    $hp = $form->input('hp');
    $telp_rumah = $form->input('telp_rumah');
    $email = $form->input('email');
">

            <td align="center">
                <?php 
        echo $diario['ref_disciplina_ofer'];
        ?>
            </td>
            <td align="center">
                <?php 
        echo $diario['descricao_disciplina'];
        ?>
            </td> 
    
            <td align="center">
                <?php 
        echo number::numeric2decimal_br($diario['nota_media'], 1);
        ?>
            </td>
        <?php 
    }
    $diario_tmp = $diario['ref_disciplina_ofer'];
    $count_criterios++;
    if ($count_criterios == $num_criterios) {
        $count_criterios = 1;
        ?>
            </tr>

        <?php 
    }
}
?>
Ejemplo n.º 21
0
<?php

require "libraries/database.php";
$database = new database();
require "libraries/number.php";
$number = new number();
require "libraries/form.php";
$form = new form();
$addr_root = "http://" . $_SERVER['SERVER_NAME'];
if (isset($_POST['action']) && $_POST['action'] == "absen") {
    $pegawai_id = $form->input('pegawai_id');
    $keterangan = $form->input('keterangan');
    $jam = date('H:i:s');
    $datetime = date('Y-m-d H:i:s');
    $today = date('Y-m-d');
    if (isset($_POST['absen_datang'])) {
        $id = $number->id('absensi', 10, '');
        $sql = "INSERT INTO absensi VALUES('{$id}','{$pegawai_id}','{$today}','{$jam}','','1','0','{$keterangan}',''," . "'{$pegawai_id}','{$datetime}','','')";
        if (!$database->query($sql)) {
            //die($sql);
            $_SESSION['info'] = "Error: SQL Command";
            header("Location: " . $addr_root . "/index.php");
            exit;
        } else {
            $_SESSION['info'] = "Absensi Sudah Ditambahkan";
            header("Location: " . $addr_root . "/index.php");
            exit;
        }
    }
    if (isset($_POST['absen_pulang'])) {
        $sql = "UPDATE absensi SET jam_pulang='{$jam}', status_pulang='1', keterangan_pulang='{$keterangan}', upd='{$pegawai_id}', upd_date='{$datetime}' WHERE pegawai_id='{$pegawai_id}'";
Ejemplo n.º 22
0
<?php

require "../../../libraries/start.php";
require $dir_libraries . "custom.php";
$custom = new custom();
require $dir_libraries . "date.php";
$date = new date();
require $dir_libraries . "form.php";
$form = new form();
require $dir_libraries . "number.php";
$number = new number();
if (isset($_POST['save'])) {
    $nama = $form->input('nama');
    $user_level_id = $form->input('user_level_id');
    $aktif = $form->input('aktif');
    $username = $form->input('username');
    $tgl1 = $date->dateEnglishMinus($form->input('tgl1'));
    $tgl2 = $date->dateEnglishMinus($form->input('tgl2'));
    $action = $form->input('action');
    $user = $_SESSION['nama'];
    $datetime = date('Y-m-d H:i:s');
    // START INSERT DATA ==============================>
    if ($action == "insert") {
        $id = $number->id('user_login', 5);
        $sql = "INSERT INTO user_login\n                        (id, nama, user_level_id, aktif, username, password, tgl1, tgl2, crt, crt_date) \n                    VALUES \n                        ('{$id}','{$nama}','{$user_level_id}','{$aktif}','{$username}',PASSWORD('{$username}'),'{$tgl1}','{$tgl2}','{$user}','{$datetime}')";
        if (!$database->query($sql)) {
            die($sql);
        } else {
            $_SESSION['success'] = "<b>Berhasil!</b> Anda telah menambah data baru";
            header("Location: create.php");
            exit;
Ejemplo n.º 23
0
 /**
  * Sets a variable and its value.
  *
  * The variable will be extracted to the local scope of the template with
  * the same name given as parameter to the method. So setting a variable
  * named "title" will result in a $title variable available to the template.
  *
  * The value can be a string, a number or a PhpTemplate instance. In the
  * latter case, the variable content will be the result of the whole parsed
  * template of the PhpTemplate instance.
  *
  * The proper method for setting arrays is setArray().
  *
  * @since 1.1
  * @param string $name Name of the variable.
  * @param string|number|PhpTemplate $value variable content.
  * @see setArray()
  */
 public function set($name, $value)
 {
     $this->vars[$name] = $value instanceof \Innomatic\Tpl\Template ? $value->parse() : $value;
 }
Ejemplo n.º 24
0
      <td><font color="#FFFFFF"><b>&nbsp;Matr&iacute;cula</b></font></td>
  <td><font color="#FFFFFF"><b>&nbsp;Nome</b></font></td>
 </tr>
 <?php 
    $st = '';
    $ordem = 1;
    foreach ($alunos as $aluno) {
        $notaprova = $aluno['notabanco'];
        $nota_parcial = $aluno['notaparcial'];
        if ($prova == 7 && $nota_parcial > 59.999) {
            continue;
        }
        if ($notaprova < 0) {
            $notaprova = '';
        } else {
            $notaprova = number::numeric2decimal_br($notaprova, 1);
        }
        if ($st == '#F3F3F3') {
            $st = '#E3E3E3';
        } else {
            $st = '#F3F3F3';
        }
        ?>
      <tr bgcolor="<?php 
        echo $st;
        ?>
"> <td align="center"><?php 
        echo $ordem;
        ?>
</td>
		<td align="center">