Ejemplo n.º 1
0
/**
 * @package: SmartCampus
 * @helper::isStudent().
 * @Author: Idea Tweaker
 */
function isStudent()
{
    return getPriority() == 9 ? 1 : 0;
}
Ejemplo n.º 2
0
$inputData['ORIGEM'] = $usuario->DIRETORIA;
$inputData['ULTIMO_TRAMITE'] = sprintf('Área de Trabalho - %s', $usuario->DIRETORIA);
$inputData['ID_UNIDADE'] = $usuario->ID_UNIDADE;
$inputData['ID_USUARIO'] = $usuario->ID;
$inputData['ID_UNID_CAIXA_SAIDA'] = $usuario->ID_UNIDADE;
$inputData['USUARIO'] = $usuario->NOME;
// Dados recebidos
$inputData['ASSUNTO'] = $_REQUEST['ASSUNTO'];
$inputData['ID_ASSUNTO'] = $_REQUEST['ID_ASSUNTO'];
$inputData['ASSUNTO_COMPLEMENTAR'] = $_REQUEST['ASSUNTO_COMPLEMENTAR'];
$inputData['DT_DOCUMENTO'] = Util::formatDate($_REQUEST['DT_DOCUMENTO']);
$inputData['INTERESSADO'] = $_REQUEST['INTERESSADO'];
$inputData['DT_PRAZO'] = Util::formatDate($_REQUEST['DT_PRAZO']);
$inputData['SOLICITACAO'] = $_REQUEST['SOLICITACAO'];
$inputData['DIGITAL_REFERENCIA'] = $_REQUEST['DIGITAL_REFERENCIA'];
$priority = getPriority($_REQUEST['PRIORIDADE']);
$inputData['NM_PRIORIDADE'] = $priority->PRIORIDADE;
$inputData['PRIORIDADES'] = array();
$inputData['PRIORIDADES'][] = $_REQUEST['PRIORIDADE'];
if (isset($_REQUEST['extras']['PRIORIDADES'])) {
    foreach ($_REQUEST['extras']['PRIORIDADES']['id_campo'] as $prioridade) {
        $inputData['PRIORIDADES'][] = $prioridade;
    }
}
$inputData['TRAMITES'] = array();
$inputData['TRAMITES'][$_REQUEST['ID_UNID_CAIXA_ENTRADA']] = DaoUnidade::getUnidade($_REQUEST['ID_UNID_CAIXA_ENTRADA'], 'nome');
if (isset($_REQUEST['extras']['TRAMITES'])) {
    foreach ($_REQUEST['extras']['TRAMITES']['id_campo'] as $tramite) {
        $inputData['TRAMITES'][$tramite] = DaoUnidade::getUnidade($tramite, 'nome');
    }
}
Ejemplo n.º 3
0
function getPuzzleTestPriority($pid)
{
    $priority = getPriority($pid);
    $status = getStatusForPuzzle($pid);
    $numTesters = getNumTesters($pid);
    // XXX: These statuses are bogus and don't exist in the new
    // world. If this function is to be used, this ought to be
    // fixed.
    /*
            if ($status == 4)
           $num = $numTesters * 2;
            else if ($status == 7)
           $num = $numTesters * 3;
            else
           $num = $numTesters;
    */
    $num = $numTesters;
    return 100 * $priority + $num;
    // Lower numbers are HIGHER priorities.
}
Ejemplo n.º 4
0
function displayPuzzPriority($uid, $pid)
{
    $priority = getPriority($pid);
    //only display approval form itself if you are an editor/approver on this puzzle
    if (canChangeStatus($uid)) {
        ?>
        <b>Testsolving Priority:</b> <br/>
        <table>
            <tr>
                <form action="form-submit.php" method="post">
                <td>
                    <input type="radio" name="puzzPriority" value="1" <?php 
        if ($priority == 1) {
            echo "checked";
        }
        ?>
 />Very high
                    <input type="radio" name="puzzPriority" value="2" <?php 
        if ($priority == 2) {
            echo "checked";
        }
        ?>
 />High
                    <input type="radio" name="puzzPriority" value="3" <?php 
        if ($priority == 3) {
            echo "checked";
        }
        ?>
 />Normal
                    <input type="radio" name="puzzPriority" value="4" <?php 
        if ($priority == 4) {
            echo "checked";
        }
        ?>
 />Low
                    <input type="radio" name="puzzPriority" value="5" <?php 
        if ($priority == 5) {
            echo "checked";
        }
        ?>
 />Very low
                </td>
                <td></td>
                <td>
                    <input type="hidden" name="uid" value='<?php 
        echo $uid;
        ?>
' />
                    <input type="hidden" name="pid" value='<?php 
        echo $pid;
        ?>
' />
                    <input type="submit" name="setPuzzPriority" value="Submit" />
                </td>
                </form>
            </tr>
        </table>
<?php 
    }
}
Ejemplo n.º 5
0
<?php

include 'config/autoload.php';
if (!isset($_GET['id'])) {
    header('Location: categories.php');
}
$priority = getPriority($db, $_GET['id']);
if (isset($_POST['priorityType']) and isset($_POST['title'])) {
    updatePriority($db, $_GET['id'], $_POST['priorityType'], $_POST['title']);
    header('Location: categories.php');
}
?>

<h3>Gestion des catégories : domaine, priorité et thème</h3>

<form action="editPriority.php?id=<?php 
echo $_GET['id'];
?>
" method="post">
  <fieldset>
    <legend>Edition de la priorité :</legend>
    <select name="priorityType" value="<?php 
echo $priority['priority_type'];
?>
">
      <option value="Domaine">Domaine</option>
      <option value="Fixe">Fixe</option>
      <option value="Variable">Variable</option>
    </select>
    <input type="text" name="title" value="<?php 
echo $priority['title'];
Ejemplo n.º 6
0
/**
 * @package:SMS
 * @helper::getAdminDesignation().
 * @Author:Techno Services
 */
function isUserAllowToAcessModule($module)
{
    $ci = getInstance();
    $where = array('config_categories' => $module);
    $config = $ci->common_model->getRecords($ci->common_model->_gradebookTable, $where, 's');
    $config_permission = $config['config_permission'];
    $priority = getExplode(',', $config_permission['config_permission']);
    return in_array(getPriority(), $priority) || getPriority() == 1 ? 1 : 0;
}