public function Set_cantidad_producto($id, $cantidad) { $sql = 'SELECT Id FROM Produc_cantidad_producto WHERE id =' . $id; $verifica = parent::consultas($sql); if (isset($verifica)) { $update = 'UPDATE Produc_cantidad_producto SET Cant_product =' . $cantidad . ' WHERE id =' . $id; $verifica_up = parent::update_query($update); if (isset($verifica_up['mensaje'])) { $exito['exito'] = "exito actualizando"; return $exito; } else { return null; } } else { $array = array('Id' => '', 'id_product' => $name, 'Cant_product' => $cantidad); $inserta = parent::inserta($array, "Produc_Imagen_"); if (isset($inserta['exito'])) { $exito['exito'] = "exito insertando"; return $exito; } else { return null; } } }
public function agrega_facturacion_db() { $inserta = new Conectar(); $verificar = $inserta->inserta("kit_facturacion", array("Id_factura" => '', "id_client" => parent::get_codigo_cliente(), "Fact_cancel" => 2, "Total" => parent::get_costo_total())); // if (array_key_exists("exito", $verificar)) { $this->id_factura = $verificar["last_cod_id"]; foreach (parent::mostrar() as $fact) { $verifica_detalle = $inserta->inserta("descripcion_factura", array("cod_produc" => $fact['codigo'], "cantidad" => 1, "Costo" => $fact['costo'], "id_solicitud" => $this->get_id_factura())); } if (array_key_exists("exito", $verifica_detalle)) { echo $verifica_detalle["exito"]; } elseif (array_key_exists("error", $verifica_detalle)) { echo "Presenta un error en la insercion de detalles de compra"; } } elseif (array_key_exists("error", $verificar)) { return true; } else { return false; } }
include_once 'conectar'; $conectar = new Conectar(); $ide = $_SESSION['ident_cedu']; if (isset($_POST['habilid'])) { $habili = $_POST['habilid']; $pos = strpos($habilidad, "-"); $habi = substr($habili, 0, $pos); $cod = substr($habili, $pos + 1, strlen($habili)); if ($habi == "actor") { $tip = 1221112; } if ($habi == "anima") { $tip = 1253434; } if ($habi == "model") { $tip = 1232323; } if ($habi == "cantan") { $tip = 1234534; } $array = array('List_idPrimaria' => $tip, 'List_id_habilidad' => $cod, 'List_id_clientÍndice' => $ide); $response = $conectar->inserta('list_habilidad', $array); json_decode($response); } if (isset($_POST['title_habi'], $_POST['descrip'], $_POST['habili'])) { $titulo = $_POST['title_habi']; $descrip = $_POST['descrip']; $array = array('Exper_nombre' => $titulo, 'Exper_descripcion' => $descrip, 'Exper_id_client' => $ide); $response = $conectar->inserta('experiencia', $array); json_decode($response); }
public function Add_cliente($cedula, $nombre, $apellido, $tel, $cel, $direc, $email) { $data = array('Usua_id' => $cedula, ' Usua_nomb' => $nombre, 'Usua_apelli' => $apellido, 'Usua_tel' => $tel, 'Usua_cel' => $cel, 'Usua_direc' => $direc, 'email_user' => $email); $data = parent::inserta("clientes_kit_motos", $data); return $data; }
function Set_fotos($id, $nombre1, $nombre2) { $array = array('Foto1' => $nombre1, 'Foto2' => $nombre2, 'id_desti' => $id); $response = parent::inserta('fotos', $array); return $response; }
public function Set_servicios_secundario($id_tipo, $nomb, $cost, $tiemp) { $array = array("Servi_id_tip" => $id_tipo, "Servi_nomb" => $nomb, "Servi_cost" => $cost, "Servi_tiem" => $tiemp); $response = parent::inserta('servicios_prestado', $array); return $response; }
public function set_datos($id, $nomb, $tele, $ext, $dir, $tip) { $array = array("Client_id" => $id, "Client_nomb" => $nomb, "Client_tel" => $tele, "Client_ext" => $ext, "Client_dire" => $dir, "Client_tipo" => $tip); parent::inserta("clientes_stra", $array); }
function Add_cliente($id, $nomb, $apelli, $pais, $corre, $pass) { $array = array("id_cedu_" => $id, "User_Nomb_" => $nomb, "User_apelli_" => $apelli, "User_Pais_" => $pais, "User_Correo_" => $corre, "User_Password_" => sha1($pass), "users_tipo" => 1); $data = parent::inserta('users', $array); return $data; }
<?php if (!isset($_SESSION)) { session_start(); } if (!isset($_SESSION['pass_perfil_rol'])) { header("location: ../login.php"); } include_once 'conectar.php'; $conection = new Conectar('root', ''); if (isset($_POST['cedula'], $_POST['nombre'], $_POST['apellido'], $_POST['direct'], $_POST['telefo'], $_POST['cargo'], $_POST['email'])) { $id = $_POST['cedula']; $nombre = $_POST['nombre']; $apellid = $_POST['apellido']; $direc = $_POST['direct']; $tele = $_POST['telefo']; $carg = $_POST['cargo']; $email = $_POST['email']; $array = array('Client_id' => $id, 'Client_nomb' => $nombre, 'Client_apelli' => $apellid, 'Client_direccion' => $direc, 'Client_tel' => $tele, 'Client_Cargo' => $carg, 'Client_email' => $email); $data = $conection->inserta('clientes', $array); if (isset($data['exito'])) { echo json_encode($array); } }
function add_subHabilidad($hab, $sub) { $array = array('Habilidad_descrip' => $hab, 'Habilidad_tipo' => $sub); $data = parent::inserta('habilidad', $array); return $data; }
function Set_lugares($id, $title, $subtitle, $descrip, $foto) { $array = array('Luga_title' => $title, 'Luga_sub_title' => $subtitle, 'Luga_descri' => $descrip, 'Foto' => $foto, 'id_desti' => $id); $response = parent::inserta('lugares', $array); return json_encode($response); }
function Recive_mensaje($from, $to, $msn) { $array = array('Chat_origen' => $from, 'Chat_destin' => $to, 'Chat_msn' => $msn, 'Chat_read' => 2); $response = parent::inserta('chat_mensajes_', $array); return $response; }