コード例 #1
0
function HTMLListaUsers()
{
    $sqlListaUsers = SQLdatosUsuarios();
    $rows .= '<div class="table-responsive"> ';
    $rows .= '<table class="table table-striped table-bordered table-condensed table-hover" summary="' . MENU_Usuarios . '">';
    $rows .= '<thead>';
    $rows .= '<tr>';
    $rows .= '<th class="izq" colspan="4">' . MENU_Usuarios . ' &middot; <a class="btn btn-primary btn-xs" href="admin.php?user_id=new" title="' . MENU_NuevoUsuario . '">' . MENU_NuevoUsuario . '</a></th>';
    $rows .= '</tr>';
    $rows .= '<tr>';
    $rows .= '<th>' . ucfirst(LABEL_apellido) . ', ' . ucfirst(LABEL_nombre) . '</th>';
    $rows .= '<th>' . ucfirst(LABEL_orga) . '</th>';
    $rows .= '<th>' . ucfirst(LABEL_Fecha) . '</th>';
    $rows .= '<th>' . ucfirst(LABEL_Terminos) . '</th>';
    $rows .= '</tr>';
    $rows .= '</thead>';
    $rows .= '<tbody>';
    while ($listaUsers = $sqlListaUsers->FetchRow()) {
        $fecha_alta = do_fecha($listaUsers[cuando]);
        $rows .= '<tr>';
        $rows .= '<td class="izq"><a href="admin.php?user_id=' . $listaUsers[id] . '" title="' . LABEL_detallesUsuario . '">' . $listaUsers[apellido] . ', ' . $listaUsers[nombres] . '</a></td>';
        $rows .= '<td class="izq">' . $listaUsers[orga] . '</td>';
        $rows .= '<td>' . $fecha_alta[dia] . '-' . $fecha_alta[descMes] . '-' . $fecha_alta[ano] . ' (' . arrayReplace(array("ACTIVO", "BAJA"), array(LABEL_User_Habilitado, LABEL_User_NoHabilitado), $listaUsers[estado]) . ')</td>';
        if ($listaUsers[cant_terminos] > 0) {
            $rows .= '<td><a href="sobre.php?user_id=' . $listaUsers[id] . '" title="' . LABEL_Detalle . '">' . $listaUsers[cant_terminos] . '</a></td>';
        } else {
            $rows .= '<td>' . $listaUsers[cant_terminos] . '</td>';
        }
        $rows .= '</tr>';
    }
    $rows .= '</tbody>';
    $rows .= '<tfoot>';
    $rows .= '<tr>';
    $rows .= '<td class="izq">' . ucfirst(LABEL_TotalUsuarios) . '</td>';
    $rows .= '<td colspan="3">' . SQLcount($sqlListaUsers) . '</td>';
    $rows .= '</tr>';
    $rows .= '</tfoot>';
    $rows .= '</table> </div>       ';
    return $rows;
}
コード例 #2
0
ファイル: fun.admin.php プロジェクト: jpgil/tematres-mirror
function HTMLListaUsers()
{
    $sqlListaUsers = SQLdatosUsuarios();
    $rows .= '<table cellpadding="0" cellspacing="0" summary="' . MENU_Usuarios . '" >';
    $rows .= '<thead>';
    $rows .= '<tr>';
    $rows .= '<th class="izq" colspan="4">' . MENU_Usuarios . ' &middot; [<a href="admin.php?user_id=new" title="' . MENU_NuevoUsuario . '">' . MENU_NuevoUsuario . '</a>]</th>';
    $rows .= '</tr>';
    $rows .= '<tr>';
    $rows .= '<th>' . ucfirst(LABEL_apellido) . ', ' . ucfirst(LABEL_nombre) . '</th>';
    $rows .= '<th>' . ucfirst(LABEL_orga) . '</th>';
    $rows .= '<th>' . ucfirst(LABEL_Fecha) . '</th>';
    $rows .= '<th>' . ucfirst(LABEL_Terminos) . '</th>';
    $rows .= '</tr>';
    $rows .= '</thead>';
    $rows .= '<tbody>';
    while ($listaUsers = mysqli_fetch_array($sqlListaUsers[datos])) {
        $fecha_alta = do_fecha($listaUsers[cuando]);
        $rows .= '<tr>';
        $rows .= '<td class="izq"><a href="admin.php?user_id=' . $listaUsers[id] . '" title="' . LABEL_detallesUsuario . '">' . $listaUsers[apellido] . ', ' . $listaUsers[nombres] . '</a></td>';
        $rows .= '<td class="izq">' . $listaUsers[orga] . '</td>';
        $rows .= '<td>' . $fecha_alta[dia] . '-' . $fecha_alta[descMes] . '-' . $fecha_alta[ano] . ' (' . arrayReplace(array("ACTIVO", "BAJA"), array(LABEL_User_Habilitado, LABEL_User_NoHabilitado), $listaUsers[estado]) . ')</td>';
        if ($listaUsers[cant_terminos] > 0) {
            $rows .= '<td><a href="sobre.php?user_id=' . $listaUsers[id] . '" title="' . LABEL_Detalle . '">' . $listaUsers[cant_terminos] . '</a></td>';
        } else {
            $rows .= '<td>' . $listaUsers[cant_terminos] . '</td>';
        }
        $rows .= '</tr>';
    }
    $rows .= '</tbody>';
    $rows .= '<tfoot>';
    $rows .= '<tr>';
    $rows .= '<td class="izq">' . ucfirst(LABEL_TotalUsuarios) . '</td>';
    $rows .= '<td colspan="3">' . $sqlListaUsers[cant] . '</td>';
    $rows .= '</tr>';
    $rows .= '</tfoot>';
    $rows .= '</table>        ';
    return $rows;
}
コード例 #3
0
function HTMLformAdvancedTermReport($array)
{
    global $CFG;
    $LABEL_Termino = ucfirst(LABEL_Termino);
    $LABEL_esNoPreferido = ucfirst(LABEL_esNoPreferido);
    $LABEL_CODE = ucfirst(LABEL_CODE);
    $LABEL_NOTE = ucfirst(LABEL_nota);
    $LABEL_TARGET_TERM = ucfirst(LABEL_TargetTerm);
    $LABEL_haveEQ = LABEL_haveEQ;
    $LABEL_nohaveEQ = LABEL_nohaveEQ;
    $LABEL_start = LABEL_start;
    $LABEL_end = LABEL_end;
    $LABEL_equalThisWord = LABEL_equalThisWord;
    $arrayVocabStats = ARRAYresumen($_SESSION["id_tesa"], "G", "");
    $arrayWS = array("t#{$LABEL_Termino}");
    if ($arrayVocabStats["cant_up"] > 0) {
        array_push($arrayWS, "uf#{$LABEL_esNoPreferido}");
    }
    //Notes
    if ($arrayVocabStats["cant_notas"] > 0) {
        array_push($arrayWS, "n#{$LABEL_NOTE}");
        $LabelNB = 'NB#' . LABEL_NB;
        $LabelNH = 'NH#' . LABEL_NH;
        $LabelNA = 'NA#' . LABEL_NA;
        $LabelNP = 'NP#' . LABEL_NP;
        $LabelNC = 'NC#' . LABEL_NC;
        $sqlNoteType = SQLcantNotas();
        $arrayNoteType = array();
        while ($array = $sqlNoteType->FetchRow()) {
            if ($array[cant] > 0) {
                $varNoteType = in_array($array["value_id"], array(8, 9, 10, 11, 15)) ? arrayReplace(array(8, 9, 10, 11, 15), array($LabelNA, $LabelNH, $LabelNB, $LabelNP, $LabelNC), $array["value_id"]) : $array["value_code"] . '#' . $array["value"];
                $varNoteType .= ' (' . $array["cant"] . ')';
                array_push($arrayNoteType, $varNoteType);
            }
        }
    }
    //target vocabularies
    if ($arrayVocabStats["cant_term2tterm"]) {
        $sql = SQLtargetVocabulary("1");
        $array_vocabularios = array();
        while ($array = $sql->FetchRow()) {
            //vocabularios que no sean el vocabulario principal
            array_push($array_vocabularios, $array[tvocab_id] . '#' . FixEncoding($array[tvocab_label]));
        }
    }
    //Evaluar si hay top terms
    $sqlTopTerm = SQLverTopTerm();
    if (SQLcount($sqlTopTerm) > 0) {
        while ($arrayTopTerms = $sqlTopTerm->FetchRow()) {
            $formSelectTopTerms[] = $arrayTopTerms["tema_id"] . '#' . $arrayTopTerms[tema];
        }
    }
    //Evaluar si hay terminos
    $sqlTermsByDates = SQLtermsByDate();
    if (SQLcount($sqlTermsByDates) > 0) {
        global $MONTHS;
        while ($arrayTermsByDates = $sqlTermsByDates->FetchRow()) {
            //normalizacion de fechas
            $arrayTermsByDates[months] = strlen($arrayTermsByDates[months]) == 1 ? '0' . $arrayTermsByDates[months] : $arrayTermsByDates[months];
            $formSelectByDate[] = $arrayTermsByDates["years"] . '-' . $arrayTermsByDates["months"] . '#' . $MONTHS["{$arrayTermsByDates['months']}"] . '/' . $arrayTermsByDates["years"] . ' (' . $arrayTermsByDates["cant"] . ')';
        }
    }
    //internal reference vocabularies
    $sql = SQLdatosVocabulario();
    if (SQLcount($sql) > '1') {
        //Hay vobularios de referencia
        $array_ivocabularios = array();
        while ($array = $sql->FetchRow()) {
            if ($array[vocabulario_id] !== '1') {
                //vocabularios que no sean el vocabulario principal
                array_push($array_ivocabularios, $array[vocabulario_id] . '#' . $array[titulo]);
            }
        }
    }
    $rows = '<form class="form-horizontal" role="form" name="advancedreport" action="index.php#csv" method="get">
<fieldset>

<!-- Form Name -->
<legend>' . ucfirst(LABEL_FORM_advancedReport) . '</legend>';
    if (SQLcount($sqlTopTerm) > 0) {
        $rows .= '<!-- Select Basic -->
<div class="form-group">
  <label class="col-md-4 control-label" for="hasTopTerm">' . ucfirst(LABEL_TopTerm) . '</label>
  <div class="col-md-5">
    <select id="hasTopTerm" name="hasTopTerm" class="form-control">
		<option value="">' . ucfirst(LABEL_FORM_nullValue) . '</option>
		' . doSelectForm($formSelectTopTerms, $_GET["hasTopTerm"]) . '
    </select>
  </div>
</div>';
    }
    if ($arrayVocabStats["cant_notas"] > 0) {
        $rows .= '<!-- Select Basic -->
<div class="form-group">
  <label class="col-md-4 control-label" for="hasNote">' . ucfirst(LABEL_FORM_haveNoteType) . '</label>
  <div class="col-md-4">
    <select id="hasNote" name="hasNote" class="form-control">
		<option value="">' . ucfirst(LABEL_FORM_nullValue) . '</option>
		' . doSelectForm($arrayNoteType, $_GET["hasNote"]) . '
    </select>
  </div>
</div>';
    }
    $rows .= '<!-- Select Basic -->
<div class="form-group">
  <label class="col-md-4 control-label" for="fromDate">' . ucfirst(LABEL_DesdeFecha) . '</label>
  <div class="col-md-3">
    <select id="fromDate" name="fromDate" class="form-control">
		<option value="">' . ucfirst(LABEL_FORM_nullValue) . '</option>
		' . doSelectForm($formSelectByDate, $_GET["fromDate"]) . '    </select>
  </div>
</div>';
    //target vocabularies
    if ($arrayVocabStats["cant_term2tterm"]) {
        $rows .= '<!-- Select Basic -->
<div class="form-group">
  <label class="col-md-4 control-label" for="csv_tvocab_id">' . ucfirst(LABEL_TargetTerms) . '</label>
  <div class="col-md-3">
    <select id="csv_tvocab_id" name="csv_tvocab_id" class="form-control">
		<option value="">' . ucfirst(LABEL_FORM_nullValue) . '</option>
		' . doSelectForm($array_vocabularios, $_GET["csv_tvocab_id"]) . '
    </select>
  </div>
  <div class="col-md-3">
    <select id="mapped" name="mapped" class="form-control">
		' . doSelectForm(array("y#{$LABEL_haveEQ}", "n#{$LABEL_nohaveEQ}"), $_GET["mapped"]) . '
    </select>
  </div>
</div>';
    }
    if (SQLcount($sql) > '1') {
        $rows .= '<!-- Select Basic -->
<div class="form-group">
  <label class="col-md-4 control-label" for="csv_itvocab_id">' . ucfirst(LABEL_vocabulario_referencia) . '</label>
  <div class="col-md-3">
    <select id="csv_itvocab_id" name="csv_itvocab_id" class="form-control">
		<option value="">' . ucfirst(LABEL_FORM_nullValue) . '</option>
		' . doSelectForm($array_ivocabularios, $_GET["csv_itvocab_id"]) . '
    </select>
  </div>
	<div class="col-md-3">
    <select id="int_mapped" name="int_mapped" class="form-control">
		' . doSelectForm(array("y#{$LABEL_haveEQ}", "n#{$LABEL_nohaveEQ}"), $_GET["int_mapped"]) . '
    </select>
  </div>
</div>';
    }
    //only for admin
    if ($_SESSION[$_SESSION["CFGURL"]][ssuser_nivel] == '1') {
        $sqlUsers = SQLdatosUsuarios();
        if (SQLcount($sqlUsers) > 1) {
            while ($arrayUsers = $sqlUsers->FetchRow()) {
                $formSelectUsers[] = $arrayUsers[id] . '#' . $arrayUsers[apellido] . ', ' . $arrayUsers[nombres];
            }
            $rows .= '<!-- Select Basic -->
		<div class="form-group">
		  <label class="col-md-4 control-label" for="byuser_id">' . ucfirst(MENU_Usuarios) . '</label>
		  <div class="col-md-4">
		    <select id="user_id" name="byuser_id" class="form-control">
				<option value="">' . ucfirst(LABEL_FORM_nullValue) . '</option>
				' . doSelectForm($formSelectUsers, $_GET["byuser_id"]) . '
		    </select>
		  </div>
		</div>';
        }
    }
    $rows .= '<div class="form-group">
  <label class="col-md-4 control-label" for="w_string">' . ucfirst(LABEL_haveWords) . '</label>
  <div class="col-md-3">
    <select id="w_string" name="w_string" class="form-control">
		' . doSelectForm(array("x#{$LABEL_equalThisWord}", "s#{$LABEL_start}", "e#{$LABEL_end}"), $_GET["w_string"]) . '
    </select>
  </div>
	<div class="col-md-3">
		<input id="csvstring" name="csvstring" class="form-control" placeholder="' . LABEL_haveWords . '" type="text">
  </div>
</div>


<!--  Checkboxes (inline) -->
<div class="form-group">
  <label class="col-md-4 control-label" for="csv_encodeAdvance">' . ucfirst(LABEL_encode) . ' latin1</label>
  <div class="col-md-4">
      <input name="csv_encode" id="csv_encodeAdvance" value="latin1" type="checkbox">
  </div>
</div>

<!-- Button -->
<div class="form-group">
<div class="text-center">
	<input type="submit" class="btn btn-primary" id="boton" name="boton" value="' . ucfirst(LABEL_Guardar) . '"/>
	</div>
</div>
<input type="hidden"  name="mod" id="mod" value="csv"/><input type="hidden"  name="task" id="mod" value="csv1"/>
</fieldset>
</form>
';
    return $rows;
}