Skip to content

Commit

Permalink
improve to php 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
tematres committed Dec 2, 2022
1 parent b7b3def commit 9ea308e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion common/include/config.tematres.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

date_default_timezone_set("America/Argentina/Buenos_Aires");

$CFG["Version"] = "TemaTres 3.4.1";
$CFG["Version"] = "TemaTres 3.4.2";

$CFG["VersionWebService"] = "2.0";

Expand Down
10 changes: 2 additions & 8 deletions common/include/inc.formUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,8 @@
<div class="help-block with-errors"></div>
</div>
</div>';
/*
$rows.='<div class="form-group">
<input type="checkbox" name="isAdmin" id="isAdmin" value="1" '.arrayReplace(array("1","2"), array("checked",""), $dato_user["nivel"]).'/>
<div class="col-sm-4">
<label for="isAdmin">'.ucfirst(LABEL_esSuperUsuario).'</label>
</div>
</div>';
*/


if (isset($dato_user["id"])) {
$isAlive=($dato_user["estado"]=='ACTIVO') ? 'checked': '';
$rows.='<div class="form-group">
Expand Down
16 changes: 9 additions & 7 deletions common/include/inc.misTerminos.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// Include para actualizacion de datos propios. #

$user_id = '0';
$user_id = 0;

$user_id = $_SESSION[$_SESSION["CFGURL"]]["ssuser_id"];

Expand All @@ -25,6 +25,8 @@
$row_resumen.='<dt>'.ucfirst(LABEL_TerminosUP).'</dt><dd> '.$resumen["cant_up"]."&nbsp;</dd>\n\r";
$row_resumen.='</dl></div>';


$_POST["taskUser"]=array2value("taskUser", $_POST);

if ($_POST["taskUser"]=='actuaDatos') {
$user_id=admin_users("actua", secure_data($user_id, "sql"));
Expand All @@ -49,41 +51,41 @@
$rows.='<div class="form-group">
<label for="nombre" class="col-sm-3 control-label">'.ucfirst(LABEL_nombre).'</label>
<div class="col-sm-9">
<input type="text" class="form-control" required id="nombre" placeholder="'.LABEL_nombre.'" name="'.FORM_LABEL_nombre.'" value="'.$dato_user["nombres"].'">
<input type="text" class="form-control" required id="nombre" placeholder="'.LABEL_nombre.'" name="nombres" value="'.$dato_user["nombres"].'">
</div>
</div>';
$rows.='<div class="form-group">
<label for="apellido" class="col-sm-3 control-label">'.ucfirst(LABEL_apellido).'</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="apellido" required placeholder="'.LABEL_apellido.'" name="'.FORM_LABEL_apellido.'" value="'.$dato_user["apellido"].'">
<input type="text" class="form-control" id="apellido" required placeholder="'.LABEL_apellido.'" name="apellido" value="'.$dato_user["apellido"].'">
</div>
</div>';
$rows.='<div class="form-group">
<label for="mail" class="col-sm-3 control-label">'.ucfirst(LABEL_mail).'</label>
<div class="col-sm-9">
<input required class="form-control" type="email" id="mail" placeholder="'.LABEL_mail.'" name="'.FORM_LABEL_mail.'" value="'.$dato_user["mail"].'">
<input required class="form-control" type="email" id="mail" placeholder="'.LABEL_mail.'" name="mail" value="'.$dato_user["mail"].'">
</div>
</div>';
$rows.='<div class="form-group">
<label for="orga" class="col-sm-3 control-label">'.ucfirst(LABEL_orga).'</label>
<div class="col-sm-9">
<input type="text" required class="form-control" id="orga" placeholder="'.LABEL_orga.'" name="'.FORM_LABEL_orga.'" value="'.$dato_user["orga"].'">
<input type="text" required class="form-control" id="orga" placeholder="'.LABEL_orga.'" name="orga" value="'.$dato_user["orga"].'">
</div>
</div>';

$fillRulePass=($dato_user["id"]) ? '' : 'required';
$rows.='<div class="form-group">
<label for="clave" class="col-sm-3 control-label">'.ucfirst(LABEL_pass).'</label>
<div class="col-sm-9">
<input data-minlength="4" '.$fillRulePass.' class="form-control" id="clave" placeholder="'.LABEL_pass.'" type="password" id="clave" name="'.FORM_LABEL_pass.'" value="">
<input data-minlength="4" '.$fillRulePass.' class="form-control" id="clave" placeholder="'.LABEL_pass.'" type="password" id="clave" name="pass" value="">
<span class="help-block">'.ucfirst(sprintf(MSG_lengh_error, 4)).'</span>
</div>
</div>';

$rows.='<div class="form-group">
<label for="reclave" class="col-sm-3 control-label">'.ucfirst(LABEL_repass).'</label>
<div class="col-sm-9">
<input data-match="#clave" '.$fillRulePass.' data-match-error="'.ucfirst(MSG_repass_error).'" placeholder="'.LABEL_repass.'" class="form-control" type="password" id="reclave" name="'.FORM_LABEL_repass.'" value="">
<input data-match="#clave" '.$fillRulePass.' data-match-error="'.ucfirst(MSG_repass_error).'" placeholder="'.LABEL_repass.'" class="form-control" type="password" id="reclave" name="reclave" value="">
<div class="help-block with-errors"></div>
</div>
</div>';
Expand Down

0 comments on commit 9ea308e

Please sign in to comment.