Viewing file: include_acciones.php (2.73 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
///////////////////////////////////////
// Herramienta de manejo de acciones //
///////////////////////////////////////
// Inclusiones
include ('class_consulta_sql.php');
include ('class_listar.php');
include ('class_paginar.php');
include ('class_seleccion.php');
include ('class_seleccion_pg.php');
include ('class_cadena_constante.php');
include ('class_seleccion_constante.php');
include ('class_files.php');
include ('class_filtrar_select_edicion.php');
include ('include_imprimir.php');
include ('class_categorias.php');
include ('class_fechas.php');
include ('include_querys_admon.php');
include ('class_tree.php');
include ('class_tree_1.php');
// 0. Despliegue inicial
if ($accion == "") {
// Por llenar.
}
// 1. Insercion Masiva
$control_insercion = 0;
if (isset($links_numero) and $id_app=21) {
if ($accion == "ins_") {
$s = 0;
foreach ($valores_insertar as $v_i) {
$query = "insert into " . $tabla . " values(" . $v_i . ")";
$insert = new Select($query, "ins_", 0 ,0);
//1.1 Insercion Relacion Masiva
if (isset($tabla_rel)) {
for ($i = 0; $i < $repeticiones; $i++) {
$val = $insert->LAST_ID . "," . $valores_insertar_rel[$i];
$query = "insert into " . $tabla_rel . " values(" . $val . ")";
$insert_rel = new Select($query, "ins_", 0 ,0);
}
}
}
}
$control_insercion = 1;
}
if ($accion == "ins_" and $control_insercion == 0) {
if (isset($links_id)){
$last_insert_id = $links_id;
}else{
$query = "insert into " . $tabla . " values(" . $valores_insertar . ")";
$insert = new Select($query, "ins_", 0 ,0);
$last_insert_id = $insert->LAST_ID;
}
// 1.1 Insercion Relacion
if (isset($tabla_rel)) {
for ($i = 0; $i < $repeticiones; $i++) {
$valores_insertar_rel[$i] = $last_insert_id . "," . $valores_insertar_rel[$i];
$query = "insert into " . $tabla_rel . " values(" . $valores_insertar_rel[$i] . ")";
$insert_rel = new Select($query, "ins_", 0 ,0);
}
}
}
// 2. Eliminación
if ($accion == "del_") {
$query = "delete from " . $tabla . " where " . $campo_id . "=" . $id;
$delete = new Select($query, "del_", 0 ,0);
}
// 3. Edición
if ($accion == "-1") {
$cuando = $campo_id . "=" . $id;
$arreglo = new select_v1(0, "*", $tabla, $cuando, $numero_campos, 0, "", "", "");
}
// 4. Actualización
if ($accion == "edi_") {
$query = "update " . $tabla . " set " . $set . " where " . $campo_id . "=" . $id;
$update = new Select($query, "edi_", 0 ,0);
}
// 5. Especiales de Links
if ($accion == "3a") {
//echo $categoria_id;
}
?>
|