예제 #1
0
include "../../core.php5/GridSortPage.class.php";
include("../../core.php5/Utilities/Application.class.php");

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

</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%;">
예제 #2
0
include("../../infopix.core.php5/DB/DataBase.class.php");
include("../../infopix.core.php5/GridSource.class.php");
include("../../infopix.core.php5/GridPresenter.class.php");
include("../../infopix.core.php5/GUI/HtmlLink.class.php");
include("../../infopix.core.php5/GUI/ComboBox.class.php");
include("../../infopix.core.php5/GridLinker.class.php");
include "../../infopix.core.php5/GridSorter.class.php";
include "../../infopix.core.php5/GridSortPage.class.php";
#include("../../infopix.core.php5/Security/User.class.php");
#include("../../infopix.core.php5/Security/SecurityManager.class.php");
include("../../infopix.core.php5/Utilities/Application.class.php");

if($nombre){

	$sql = "INSERT INTO users VALUES (null, '$nombre', '$url', '$servidor')";
	$res = DataBase::ExecuteNonQuery($sql);
	if($res)
		echo "<script> window.location = '../select/sites.php' </script>";
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form action="" method="post" name="miform" >
<table width="0%" align="center" border="0">
예제 #3
0
	public function Update($request){
	
		unset($this->login);
		unset($this->md5pass);
		unset($this->security_profile_id);
		if($request[password] == "")	unset($this->pass);
		else						$request[password] = md5($request[password]);


		ORM::DataBinding($this, $request);
		$update_statement = ORM::UpdateStatement($this, "users");
		$affected_rows = DataBase::ExecuteNonQuery($update_statement);
		
		if($affected_rows == 1 || $affected_rows == 0)
			return true;
		else
			return false;
	}