RSS
Recortes: 31
Registrado: 6/8/2006
Web
php (13)
mysql (8)
JavaScript (5)
imagenes (5)
asp (3)
jpg (3)
XMLHttpRequest (2)
fichero (2)
Ajax (2)
jquery (2)
JS (2)
MSSQLServer (2)
cuenta-registros (1)
provincias (1)
leer (1)
html (1)
escribir (1)
sql (1)
antispam (1)
valor-maximo (1)
declarada (1)
querystring (1)
adodb (1)
link (1)
imagen-flash (1)
etiqueta (1)
svg (1)
onload (1)
flash (1)
valor-minimo (1)
duplicados (1)
recordset (1)
menu (1)
event (1)
Transacciones (1)
clase (1)
forms (1)
variable (1)
elimina-ficheros (1)
registros (1)
aleatorio (1)
MS-SQLServer (1)
importar (1)
existe-registro (1)
url (1)
connection (1)
plantilla (1)
genera-select (1)
xhtml (1)
eliminar (1)
scroll (1)
alertas (1)
javascrip (1)
exportar (1)
validacion (1)
function f_resizeMaxWidth($file, $width) { $imSrc = imagecreatefromjpeg($file); $w = imagesx($imSrc); $h = imagesy($imSrc); if($w>$width) { $height = ($h/$w)*$width; $imTrg = imageCreateTrueColor($width, $height); imagecopyresized($imTrg, $imSrc, 0, 0, 0, 0, $width, $height, $w, $h); imagedestroy($imSrc); imagejpeg($imTrg, $file, 95); imagedestroy($imTrg); } else { imagedestroy($imSrc); } }
function f_ImageFlash($file, $alt = "", $w = 0, $h = 0, $id = "src") { if(substr($file, -3)=="swf") { echo "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"".$w."\" height=\"".$h."\" VIEWASTEXT><param name=\"menu\" value=\"false\"><param name=\"movie\" value=\"".$file."\" /><param name=\"quality\" value=\"high\" /><embed src=\"".$file."\" menu=\"false\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"".$w."\" height=\"".$h."\"></embed></object>"; } else { echo "<img id=\"".$id."\" src=\"".$file."\" alt=\"\" />"; } }
function db_deleteFiles($sPath, $sFields, $sTable, $sWhere) { global $dbLink; $query = "SELECT ".$sFields." FROM ".$sTable." WHERE ".$sWhere; $result = mysql_query($query, $dbLink); while($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $aFields = split(",", $sFields); while(list($a, $b)=each($aFields)) { if($line[$b]!="") unlink($sPath.$line[$b]); } } mysql_free_result($result); }
function db_existRecord($sField, $sValue, $sTable, $sWhere) { global $dbLink; $query = "SELECT count(*) as nCount FROM ".$sTable; if($sWhere!="") { $query .= " WHERE ".$sWhere." AND ".$sField."='".$sValue."'"; } else { $query .= " WHERE ".$sField."='".$sValue."'"; } $result = mysql_query($query, $dbLink); $line = mysql_fetch_array($result, MYSQL_ASSOC); $retval = ($line["nCount"]>0 ? TRUE : FALSE); mysql_free_result($result); return $retval; }
function db_getSelect($sValue, $sText, $sTable, $sWhere = "", $sSelected) { global $dbLink; if($sValue!=$sText) { $query = "SELECT ".$sValue.", ".$sText." FROM ".$sTable; } else { $query = "SELECT ".$sValue." FROM ".$sTable; } if($sWhere!="") $query .= " WHERE ".$sWhere; $result = mysql_query($query, $dbLink); while($line = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "<option value=\"".$line[$sValue]."\""; if($sSelected==$line[$sValue]) { echo "selected=\"true\""; } echo ">"; echo $line[$sText]; echo "</option>"; } mysql_free_result($result); }
function db_getCount($sTable, $sWhere = "") { global $dbLink; $query = "SELECT Count(*) as nCount FROM ".$sTable; if($sWhere!="") $query .= " WHERE ".$sWhere; $result = mysql_query($query, $dbLink); $line = mysql_fetch_array($result, MYSQL_ASSOC); $nCount = $line["nCount"]; mysql_free_result($result); return $nCount; }
function db_getMax($sField, $sTable, $sWhere = "") { global $dbLink; $query = "SELECT Max(".$sField.") as nMax FROM ".$sTable; if($sWhere!="") $query .= " WHERE ".$sWhere; $result = mysql_query($query, $dbLink); $line = mysql_fetch_array($result, MYSQL_ASSOC); $nMax = intval($line["nMax"]); mysql_free_result($result); return $nMax; }
function db_getMin($sField, $sTable, $sWhere = "") { global $dbLink; $query = "SELECT Min(".$sField.") as nMin FROM ".$sTable; if($sWhere!="") $query .= " WHERE ".$sWhere; $result = mysql_query($query, $dbLink); $line = mysql_fetch_array($result, MYSQL_ASSOC); $nMax = intval($line["nMin"]); mysql_free_result($result); return $nMax; }
function getContent(sURL) { var xmlhttp; if(window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", sURL, false); xmlhttp.send(null); } else if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); if(xmlhttp) { xmlhttp.open("GET", sURL, false); xmlhttp.send(); } } return xmlhttp.responseXML; }...
function getContent(sURL) { var xmlhttp; if(window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", sURL, false); xmlhttp.send(null); } else if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); if(xmlhttp) { xmlhttp.open("GET", sURL, false); xmlhttp.send(); } } return xmlhttp.responseText; }...