function Load($id){ ORM::Load($this, "SELECT * FROM emails WHERE id = $id"); }
</head> <?php if ($_POST) { USER::VerifySecurity(); $usr = $_SESSION['user']; $q = "UPDATE albums SET descripcion='" . $_POST['descripcion'] . "', fecha= '" . substr($_POST['fecha'], 6, 4) . "-" . substr($_POST['fecha'], 0, 2) . "-" . substr($_POST['fecha'], 3, 2) . "' WHERE idalbum=" . $_POST['idalbum'] . " "; $res = DataBase::ExecuteNonQuery($q); if ($res) { echo '<div id="temp" style="background-color:green;text-align:center;color:white"><b>Actualizado correctamente</b></div> '; } else { echo '<div style="background-color:red;text-align:center;color:white">Error al Guardar</div>'; } } else { $q = "SELECT * FROM albums WHERE idalbum=" . $_GET['id']; ORM::Load($rs, $q); ?> <body> <form method="post" action="" name="miform"> <div id=""> <a href="javascript:;" onClick="get('select/noticias.php','content')" class="agregar">Regresar</a><br /> <table border="0" style="border:1px #000000 solid" ><tr><td align="center"><h3>Modificar Album</h3> <table align="center" border="0" cellpadding="1" cellspacing="1" style="width: 100%;"> <tbody> <tr> <td><input name="idalbum" type="hidden" style="width:99%" value="<?php echo $rs->idalbum; ?> " /> Nombre <input id="descripcion" name="descripcion" type="text" style="width:99%" value="<?php
public function Load($id){ ORM::Load($this, "SELECT * FROM users WHERE idusers = $id"); }