Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/02/2009, 06:30
Avatar de MaTyS
MaTyS
 
Fecha de Ingreso: enero-2009
Ubicación: Mar del Plata
Mensajes: 220
Antigüedad: 15 años, 4 meses
Puntos: 18
[APORTE] Calendario {usando: AJAX, PHP y MySQL}

Hola, hoy les traigo un Calendario realizado con AJAX, PHP y con uso de la Base de Datos .

Bueno comenzamos:

Me olvide la demo jaja:

Descarga: DESCARGAR
Demo: DEMO

calendario.sql
Código PHP:
CREATE TABLE `oc_calendar` (
  `
idmediumint(9NOT NULL auto_increment,
  `
start_datedatetime NOT NULL,
  `
end_datedatetime NOT NULL,
  `
usernamevarchar(255NOT NULL,
  
PRIMARY KEY  (`id`)
AUTO_INCREMENT=

functions.js
Código PHP:
function SimpleAJAXCallback(in_textobj) {
document.getElementById(obj).innerHTML in_text;
setStatus ("","showimg");
setStatus ("","showimg2");
}
function 
checkAll(checknameexby) {
var 
bgcolor 'ffffff';
for (
0checkname.lengthi++) {
checkname[i].checked exby.checkedtrue:false
var cell document.getElementById('row' i);
if (
bgcolor == 'eeeeee') {
var 
bgcolor 'ffffff';} else {var bgcolor 'eeeeee';}
if (
checkname[i].checked) {cell.style.background '#cccccc';} else {cell.style.background '#' bgcolor;}}}function checktoggle(box,theId,color) {
if(
document.getElementById) {
var 
cell document.getElementById(theId);
var 
box document.getElementById(box);
if(
box.checked) {
cell.style.background '#cccccc';
} else {
cell.style.background '#' color;
}}}
function 
checktoggle_over(box,theId,color) {
if(
document.getElementById) {
var 
cell document.getElementById(theId);
var 
box document.getElementById(box);
cell.style.background '#' color;
}}function 
findPosX(obj){
var 
curleft 0;
if (
obj.offsetParent){
while (
obj.offsetParent){
curleft += obj.offsetLeft
obj 
obj.offsetParent;}} else if (obj.x){curleft += obj.x;}return curleft;}
function 
findPosY(obj){
var 
curtop 0;
if (
obj.offsetParent){
while (
obj.offsetParent){
curtop += obj.offsetTop
obj 
obj.offsetParent;}
} else if (
obj.y){
curtop += obj.y;
}    return 
curtop;}
function 
setStatus (theStatustheObj){
obj document.getElementById(theObj);
if (
obj) {
if (
theStatus == 1){
obj.innerHTML "<div align=right>" "<img src=\"/i/images/loading.gif\" alt=\"Loading\" vspace=2 hspace=2>" "</div>";
} else {
obj.innerHTML "<div align=right>" "" "</div>";
}}}
function 
doneloading(theframe,thefile){
var 
theloc ""
theframe.processajax ("showimg",theloc);}
function 
popup(mylinkwindownamewindowwidthwindowheight){
if (! 
window.focus)return true;
var 
href;
if (
typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(hrefwindowname'width=' windowwidth ',height=' windowheight ',scrollbars=yes,resizable=yes');
return 
false;
}    var 
qsParm = new Array();
function 
qs(serverPage) {
var 
query serverPage;
var 
parms query.split('&');
for (var 
i=0i<parms.lengthi++) {
var 
pos parms[i].indexOf('=');
if (
pos 0) {
var 
key parms[i].substring(0,pos);
var 
val parms[i].substring(pos+1);
qsParm[key] = val;}}} 
Continua en otro post

Última edición por GatorV; 01/02/2009 a las 15:37 Razón: Agregando la demo :P