Commit inicial - WordPress Análisis de Precios Unitarios

- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

@@ -0,0 +1,195 @@
<?php
if(!isset($submitBut))
$submitBut="submit";
$id=0;
if(isset($_REQUEST["id"]) && $_REQUEST["id"])
{
$id=$_REQUEST["id"];
if(!isset($fields))
$fields=$db->db_selectOne($module,"*","id='".$id."'");
}
require_once("functions.php");
?>
<div class="wrap">
<h1>
<?php
if($module=="import")
echo "Import";
else
{
if($id)
{
echo "Edit ".$un;
if(isset($fields["image"]) && $fields["image"])
echo '<img src="'.$_REQUEST["plugin_url"].'images/'.$fields["image"].'" width="60px" />';
}
else echo "Add ".$un;
}
?>
</h1>
<?php
if(isset($header_form))
echo "<p>".$header_form."</p>";
?>
<form method="post" name="<?php echo $module;?>_add_form" id="<?php echo $module;?>_add_form" class="validate" novalidate="novalidate">
<?php
if($nb_fields_devide_page>1) //devide two columns
{
?>
<div class="row">
<div class="col-sm-12 col-md-6" style="border-right: 1px dashed #333;">
<?php
}
$i=0;
?>
<table class="form-table">
<?php
foreach($fields_list as $field)
{
$i++;
if(isset($fields[$field["name"]]))
$field["value"]=$fields[$field["name"]];
elseif(!isset($field["value"]))
$field["value"]="";
if($field["name"]=="year_end" && $field["name"]==0)
$field["value"]="Encore";
if($i==$nb_fields_devide_page)
{
?>
</table>
</div>
<div class="col-sm-12 col-md-6"> <table class="form-table">
<?php
}
$id_field=$module."_".$field["name"];
if($field["type"]=='text' || $field["type"]=='password' || $field["type"]=='number')
{
?>
<tr class="form-field">
<th scope="row"><label for="<?php echo $id_field;?>"><?php echo $field["title"];?></label></th>
<td><input name="<?php echo $field["name"];?>" type="text" class="form-control" id="<?php echo $id_field;?>"
value="<?php echo mb_convert_encoding($field["value"], 'ISO-8859-1', 'UTF-8');?>" /></td>
</tr>
<?php
}
if($field["type"]=='textarea')
{
?>
<tr class="form-field">
<th scope="row"><label for="<?php echo $id_field;?>"><?php echo $field["title"];?></label></th>
<td> <textarea class="form-control" name="<?php echo $field["name"];?>" id="<?php echo $id_field;?>" placeholder="<?php echo $field["title"];?>"><?php echo mb_convert_encoding($field["value"], 'ISO-8859-1', 'UTF-8');?></textarea>
<?php if(isset($field["help"]))
echo '<small class="form-text text-muted">
'.$field["help"].'</small>
';
?>
</td>
</tr>
<?php
}
if($field["type"]=='select')
{
?>
<tr class="form-field">
<th scope="row"><label for="<?php echo $id_field;?>"><?php echo $field["title"];?></label></th>
<td> <select class="form-control" name="<?php echo $field["name"];?>" id="<?php echo $id_field;?>">
<option value="0">Select Item</option>
<?php
if(isset($field["options"]))
foreach($field["options"] as $tit)
{
$selected="";
if(isset($field["value"]) && $field["value"]==$tit["id"])
$selected="selected='selected'";
echo "<option value='".$tit["id"]."' ".$selected.">".$tit["title"]."</option>";
}
?>
</select>
<?php if(isset($field["help"]))
echo '<small class="form-text text-muted">
'.$field["help"].'</small>
';
?>
</td>
</tr>
<?php
}
if($field["type"]=='categories')
{
if(!isset($categories_lis))
$categories_lis=get_cat_tree();
?>
<tr class="form-field ">
<th scope="row"><label for="<?php echo $id_field;?>"><?php echo $field["title"];?> </label></th>
<td >
<fieldset class="inline-edit-col-center inline-edit-categories">
<div class="inline-edit-col">
<?php
display_cat_tree($categories_lis,$field);
?>
</div>
</fieldset>
</td>
</tr>
<?php
}
if($field["type"]=='image')
{
?>
<tr class="form-field ">
<th scope="row"><label for="<?php echo $id_field;?>"><?php echo $field["title"];?> </label></th>
<td><input name="<?php echo $field["name"];?>" type="file" id="<?php echo $id_field;?>" value="" /></td>
</tr>
<?php
}
?>
<?php
}
if($nb_fields_devide_page>1) //devide two columns
{
?>
</div></div>
<?php
}
?>
</table>
<input name="plugin_url" value="<?php echo $_REQUEST["plugin_url"];?>" type="hidden" />
<input name="action" value="functions" type="hidden" />
<input name="action_to_do" value="add_item2" type="hidden" />
<input name="module" value="<?php echo $module;?>" type="hidden" />
<input name="id" value="<?php echo $id;?>" type="hidden" />
</form>
</div>
<div class="row">
<div class="col-sm-12" >
<hr />
</div>
</div>
<div class="row">
<div class="col-sm-12" style="text-align:center">
<input type="button" class="button" value="Back to List" onclick="list_admin('<?php echo $module;?>');" />
<input type="button" class="button button-primary" value="<?php echo $submitBut;?>" onclick="submit_admin_form('<?php echo $module;?>');" />
</div>
</div>
</div>