Foros del Web » Programando para Internet » PHP »

Modificar Calendario

Estas en el tema de Modificar Calendario en el foro de PHP en Foros del Web. Hola alguien podria ayudarme a cambiar este calendario para k inicie desde lunes y temine en domingo?. (y si puden pasarlo a español mejor gracias) ...
  #1 (permalink)  
Antiguo 14/02/2007, 11:04
Avatar de LoUiMaNiAkO  
Fecha de Ingreso: enero-2006
Mensajes: 198
Antigüedad: 18 años, 3 meses
Puntos: 1
Sonrisa Modificar Calendario

Hola alguien podria ayudarme a cambiar este calendario para k inicie desde lunes y temine en domingo?. (y si puden pasarlo a español mejor gracias)
Código PHP:
<?
require_once("includes/config.php");

if(!isset(
$installed))
{
    
header("Location: install.php");
    exit;
}
else
{
    if(
file_exists('install.php'))
    {
        
header("Location: install.php");
        exit;
    }
}

$db_connection mysql_connect ($DBHost$DBUser$DBPass) OR die (mysql_error());  
$db_select mysql_select_db ($DBName) or die (mysql_error());
$db_table $TBL_PR "events";

function 
getmicrotime(){ 
    list(
$usec$sec) = explode(" ",microtime()); 
    return ((float)
$usec + (float)$sec); 


$time_start getmicrotime();

IF(!isset(
$_GET['year'])){
    
$_GET['year'] = date("Y");
}
IF(!isset(
$_GET['month'])){
    
$_GET['month'] = date("n")+1;
}

$month addslashes($_GET['month'] - 1);
$year addslashes($_GET['year']);

$query "SELECT event_id,event_title,event_day,event_time FROM $db_table WHERE event_month='$month' AND event_year='$year' ORDER BY event_time";
$query_result mysql_query ($query);
while (
$info mysql_fetch_array($query_result))
{
    
$day $info['event_day'];
    
$event_id $info['event_id'];
    
$events[$day][] = $info['event_id'];
    
$event_info[$event_id]['0'] = substr($info['event_title'], 08);;
    
$event_info[$event_id]['1'] = $info['event_time'];
}

$todays_date date("j");
$todays_month date("n");

$days_in_month date ("t"mktime(0,0,0,$_GET['month'],0,$_GET['year']));
$first_day_of_month date ("w"mktime(0,0,0,$_GET['month']-1,1,$_GET['year']));
$first_day_of_month $first_day_of_month 1;
$count_boxes 0;
$days_so_far 0;

IF(
$_GET['month'] == 13){
    
$next_month 2;
    
$next_year $_GET['year'] + 1;
} ELSE {
    
$next_month $_GET['month'] + 1;
    
$next_year $_GET['year'];
}

IF(
$_GET['month'] == 2){
    
$prev_month 13;
    
$prev_year $_GET['year'] - 1;
} ELSE {
    
$prev_month $_GET['month'] - 1;
    
$prev_year $_GET['year'];
}



?>
<html>
<head>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<head>
<body>
<table width="539" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td colspan="3"><div align="center" class="currentdate"><? echo date ("F Y"mktime(0,0,0,$_GET['month']-1,1,$_GET['year'])); ?></div></td>
          </tr>
          <tr>
            <td width="233"><div align="right"><a href="<? echo "index.php?month=$prev_month&amp;year=$prev_year"?>" class="Estilo5">&lt;&lt;</a></div></td>
            <td width="253"><div align="center">
                <select name="month" class="toprightnumber" id="month" onChange="MM_jumpMenu('parent',this,0)">
                  <?
                  
            
for ($i 1$i <= 12$i++) {
                
$link $i+1;
                IF(
$_GET['month'] == $link){
                    
$selected "selected";
                } ELSE {
                    
$selected "";
                }
                echo 
"<option value=\"index.php?month=$link&amp;year=$_GET[year]\" $selected>" date ("F"mktime(0,0,0,$i,1,$_GET['year'])) . "</option>\n";
            }
            
?>
                </select>
                <select name="year" class="toprightnumber" id="year" onChange="MM_jumpMenu('parent',this,0)">
                  <?
          
for ($i 2007$i <= 2010$i++) {
              IF(
$i == $_GET['year']){
                
$selected "selected";
            } ELSE {
                
$selected "";
            }
              echo 
"<option value=\"index.php?month=$_GET[month]&amp;year=$i\" $selected>$i</option>\n";
          }
          
?>
                </select>
            </div></td>
            <td width="254"><div align="left"><a href="<? echo "index.php?month=$next_month&amp;year=$next_year"?>" class="Estilo5">&gt;&gt;</a></div></td>
          </tr>
          <tr>
            <td height="18" colspan="3"></td>
          </tr>
                </table>          <table width="594" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#74664C">
        <tr class="topdays"> 
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Domingo</div></td>
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Lunes</div></td>
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Martes</div></td>
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Miercoles</div></td>
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Jueves</div></td>
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Viernes</div></td>
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Sabado</div></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF"> 
        <?
        
for ($i 1$i <= $first_day_of_month-1$i++) {
            
$days_so_far $days_so_far 1;
            
$count_boxes $count_boxes 1;
            echo 
"<td width=\"100\" height=\"50\" class=\"beforedayboxes\"></td>\n";
        }
        for (
$i 1$i <= $days_in_month$i++) {
               
$days_so_far $days_so_far 1;
                
$count_boxes $count_boxes 1;
            IF(
$_GET['month'] == $todays_month+1){
                IF(
$i == $todays_date){
                    
$class "highlighteddayboxes";
                } ELSE {
                    
$class "dayboxes";
                }
            } ELSE {
                IF(
$i == 1){
                    
$class "highlighteddayboxes";
                } ELSE {
                    
$class "dayboxes";
                }
            }
            echo 
"<td width=\"100\" height=\"50\" class=\"$class\">\n";
            
$link_month $_GET['month'] - 1;
            echo 
"<div align=\"right\"><span class=\"toprightnumber\">\n<a href=\"javascript:MM_openBrWindow('event_add.php?day=$i&amp;month=$link_month&amp;year=$_GET[year]','','width=500,height=300');\">$i</a>&nbsp;</span></div>\n";
            IF(isset(
$events[$i])){
                echo 
"<div align=\"left\"><span class=\"eventinbox\">\n";
                while (list(
$key$value) = each ($events[$i])) {
                    echo 
"&nbsp;<a href=\"javascript:MM_openBrWindow('event.php?id=$value','','width=500,height=200');\">" $event_info[$value]['1'] . " " $event_info[$value]['0']  . "</a>\n<br>\n";
                }
                echo 
"</span></div>\n";
            }
            echo 
"</td>\n";
            IF((
$count_boxes == 7) AND ($days_so_far != (($first_day_of_month-1) + $days_in_month))){
                
$count_boxes 0;
                echo 
"</TR><TR valign=\"top\">\n";
            }
        }
        
$extra_boxes $count_boxes;
        for (
$i 1$i <= $extra_boxes$i++) {
            echo 
"<td width=\"100\" height=\"50\" class=\"afterdayboxes\"></td>\n";
        }
        
$time_end getmicrotime();
        
$time round($time_end $time_start3);
        
?>
        </tr>
          </table>
</body>
espero le entiendan :)
__________________
:molesto: "Soy como dios k nunca llora y como satanas k nunca resa":molesto:

Dejate seducir por mis colmillos
  #2 (permalink)  
Antiguo 14/02/2007, 11:56
Avatar de erlingfiallos  
Fecha de Ingreso: febrero-2005
Ubicación: Mexico ahora
Mensajes: 499
Antigüedad: 19 años, 2 meses
Puntos: 9
Re: Modificar Calendario

Hagamos esto lo mas sencillo posible.. te explicare que tiene que cambiar.. y con solo 2 movimientos debe de quedar listo..

Primero localiza esta linea

Código HTML:
<td width="90" bgcolor="#CCCCCC" ><div align="center">Domingo</div></td> 
cortala y pegala despues de la que dice sabado ahi mismo.. y asi te quedaran ordenados los dias de lunes a domingo..

Segundo paso

Cuatro lineas mas abajo de donde pegaste la celda del domingo te encontraras con esto que es el generador de los dias..

Código PHP:
for ($i 1$i <= $first_day_of_month-1$i++) 
solo tienes que cambiarlo por

Código PHP:
for ($i 1$i <= $first_day_of_month-2$i++) 
ojo.. mira que solo cambie $first_day_of_month-2

Y pues eso es todo.. creo que esta claro.. :)
  #3 (permalink)  
Antiguo 14/02/2007, 12:26
Avatar de erlingfiallos  
Fecha de Ingreso: febrero-2005
Ubicación: Mexico ahora
Mensajes: 499
Antigüedad: 19 años, 2 meses
Puntos: 9
Re: Modificar Calendario

Y para pasar a español los meses basta con solo poner este arreglo arriba del primer for que crea el select

Código PHP:
$mes = array ("Enero""Febrero""Marzo""Abril""Mayo""Junio""Julio""Agosto""Septiembre""Octubre""Noviembre""Diciembre"); 
Ahora dentro de ese mismo for reemplazar la linea que dice

Código PHP:
echo "<option value=\"index.php?month=$link&amp;year=$_GET[year]\" $selected>" date ("F"mktime(0,0,0,$i,1,$_GET['year'])) . "</option>\n"
por esta otra

Código PHP:
echo "<option value=\"index.php?month=$link&amp;year=$_GET[year]\" $selected>" $mes[date ("m"mktime(0,0,0,$i,1,$_GET['year']))-1] . "</option>\n"
  #4 (permalink)  
Antiguo 14/02/2007, 13:50
 
Fecha de Ingreso: abril-2006
Ubicación: Colombia
Mensajes: 648
Antigüedad: 18 años
Puntos: 3
Re: Modificar Calendario

Hola

Bueno, pues con esa solucion en efecto funciona bien pero hasta el mes de abril, ademas, si se dirige por ej al año 2006 el select de los años no cambia el año sino se queda en 2007, pues es el que captura por defecto, falta afinarlo un poco, yo tratare de no hacerle muchos cambios y con gusto lo subo, suerte.
  #5 (permalink)  
Antiguo 14/02/2007, 16:25
Avatar de LoUiMaNiAkO  
Fecha de Ingreso: enero-2006
Mensajes: 198
Antigüedad: 18 años, 3 meses
Puntos: 1
Re: Modificar Calendario

cierto solo funciona asta marzo,
y otra molestia, como se abrn dado cuenta ese kodigo lo kiereo para ingresar eventos en una base de datos, pero solo se guarda el numero de mes, y con este cosgigo siguiente lo convierto a letras, como las podria pasar a español???, (Les prometo que estudiare sobre los arrays)
Código PHP:
<?
require_once("includes/config.php");
$db_connection mysql_connect ($DBHost$DBUser$DBPass) OR die (mysql_error());  
$db_select mysql_select_db ($DBName) or die (mysql_error());
$db_table $TBL_PR "events";

$query "SELECT * FROM $db_table WHERE event_id='$_GET[id]' LIMIT 1";
$query_result mysql_query ($query);
while (
$info mysql_fetch_array($query_result)){
    
$date date ("l, jS F Y"mktime(0,0,0,$info['event_month'],$info['event_day'],$info['event_year']));
    
$time_array split(":"$info['event_time']);
    
$time date ("g:ia"mktime($time_array['0'],$time_array['1'],0,$info['event_month'],$info['event_day'],$info['event_year']));
?>]
pd. muchas gracias por su tiempo y por responder tan bien. Gracias
__________________
:molesto: "Soy como dios k nunca llora y como satanas k nunca resa":molesto:

Dejate seducir por mis colmillos

Última edición por LoUiMaNiAkO; 14/02/2007 a las 16:28 Razón: para agradecer
  #6 (permalink)  
Antiguo 14/02/2007, 17:12
 
Fecha de Ingreso: abril-2006
Ubicación: Colombia
Mensajes: 648
Antigüedad: 18 años
Puntos: 3
Mensaje Re: Modificar Calendario

Hola

Bueno, pues ahora si creo que funciona correctamente, y ya te puse el array y por ende los meses ya te salen en español, te queda de tarea poner el array en la inserción de datos a la bd y estudiar bien los arrays y saber el correcto funcionamiento, sin embargo en este codigo te deje pistas, suerte.


Código PHP:
<?
$array_meses 
= array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");

require_once(
"includes/config.php"); 

if(!isset(
$installed)) 

    
header("Location: install.php"); 
    exit; 

else 

    if(
file_exists('install.php')) 
    { 
        
header("Location: install.php"); 
        exit; 
    } 


$db_connection mysql_connect ($DBHost$DBUser$DBPass) OR die (mysql_error());  
$db_select mysql_select_db ($DBName) or die (mysql_error());
$db_table $TBL_PR "events";

function 
getmicrotime(){ 
    list(
$usec$sec) = explode(" ",microtime()); 
    return ((float)
$usec + (float)$sec); 


$time_start getmicrotime();

IF(!isset(
$_GET['year'])){
    
$_GET['year'] = date("Y");
}
IF(!isset(
$_GET['month'])){
    
$_GET['month'] = date("n")+1;
}

$month addslashes($_GET['month'] );
$year addslashes($_GET['year']);

$query "SELECT event_id,event_title,event_day,event_time FROM $db_table WHERE event_month='$month' AND event_year='$year' ORDER BY event_time";
$query_result mysql_query ($query);
while (
$info mysql_fetch_array($query_result))
{
    
$day $info['event_day'];
    
$event_id $info['event_id'];
    
$events[$day][] = $info['event_id'];
    
$event_info[$event_id]['0'] = substr($info['event_title'], 08);;
    
$event_info[$event_id]['1'] = $info['event_time'];
}

$todays_date date("j");
$todays_month date("n");

$days_in_month date ("t"mktime(0,0,0,$_GET['month'],0,$_GET['year']));
$first_day_of_month date ("w"mktime(0,0,0,$_GET['month']-1,1,$_GET['year']));

if (
$first_day_of_month==0)
{
$first_day_of_month 7;
}
else
{
$first_day_of_month $first_day_of_month ;
}
$count_boxes 0;
$days_so_far 0;

IF(
$_GET['month'] == 13){
    
$next_month 2;
    
$next_year $_GET['year'] + 1;
} ELSE {
    
$next_month $_GET['month'] + 1;
    
$next_year $_GET['year'];
}

IF(
$_GET['month'] == 2){
    
$prev_month 13;
    
$prev_year $_GET['year'] - 1;
} ELSE {
    
$prev_month $_GET['month'] - 1;
    
$prev_year $_GET['year'];
}
?>

<html>
<head>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<head>
<body>
<table width="539" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td colspan="3"><div align="center" class="currentdate"><? echo $array_meses[$_GET['month']-2]." ".$_GET['year']; ?></div></td>
          </tr>
          <tr>
            <td width="233"><div align="right"><a href="<? echo "index.php?month=$prev_month&amp;year=$prev_year"?>" class="Estilo5">&lt;&lt;</a></div></td>
            <td width="253"><div align="center">
                <select name="month" class="toprightnumber" id="month" onChange="MM_jumpMenu('parent',this,0)">
                  <?
                  
            
for ($i 1$i <= 12$i++) {
                
$link $i+1;
                IF(
$_GET['month'] == $link){
                    
$selected "selected";
                } ELSE {
                    
$selected "";
                }
                
?>
                <option value="index.php?month=<?=$link?>&year=<?=$_GET[year]?><?=$selected?> ><?=$array_meses[$link-2]?><? // = date ("F", mktime(0,0,0,$i,1,$_GET['year'])) ?></option>
            <?}
            
?>
                </select>
                <select name="year" class="toprightnumber" id="year" onChange="MM_jumpMenu('parent',this,0)">
                  <?
          
for ($i 2006$i <= 2010$i++) {
              IF(
$i == $_GET['year']){
                
$selected "selected";
            } ELSE {
                
$selected "";
            }
              echo 
"<option value=\"index.php?month=$_GET[month]&amp;year=$i\" $selected>$i</option>\n";
          }
          
?>
                </select>
            </div></td>
            <td width="254"><div align="left"><a href="<? echo "index.php?month=$next_month&amp;year=$next_year"?>" class="Estilo5">&gt;&gt;</a></div></td>
          </tr>
          <tr>
            <td height="18" colspan="3"></td>
          </tr>
                </table>          <table width="594" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#74664C">
        <tr class="topdays"> 
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Lunes</div></td>
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Martes</div></td>
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Miercoles</div></td>
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Jueves</div></td>
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Viernes</div></td>
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Sabado</div></td>
          <td width="90" bgcolor="#CCCCCC" ><div align="center">Domingo</div></td>
        </tr>
        <tr valign="top" bgcolor="#FFFFFF"> 
        <?
        
for ($i 1$i <= $first_day_of_month-1$i++) {
            
$days_so_far $days_so_far 1;
            
$count_boxes $count_boxes 1;
            echo 
"<td width=\"100\" height=\"50\" class=\"beforedayboxes\"></td>\n";
        }
        for (
$i 1$i <= $days_in_month$i++) {
               
$days_so_far $days_so_far 1;
                
$count_boxes $count_boxes 1;
            IF(
$_GET['month'] == $todays_month+1){
                IF(
$i == $todays_date){
                    
$class "highlighteddayboxes";
                } ELSE {
                    
$class "dayboxes";
                }
            } ELSE {
                IF(
$i == 1){
                    
$class "highlighteddayboxes";
                } ELSE {
                    
$class "dayboxes";
                }
            }
            echo 
"<td width=\"100\" height=\"50\" class=\"$class\">\n";
            
$link_month $_GET['month'] - 1;
            echo 
"<div align=\"right\"><span class=\"toprightnumber\">\n<a href=\"javascript:MM_openBrWindow('event_add.php?day=$i&amp;month=$link_month&amp;year=$_GET[year]','','width=500,height=300');\">$i</a>&nbsp;</span></div>\n";
            IF(isset(
$events[$i])){
                echo 
"<div align=\"left\"><span class=\"eventinbox\">\n";
                while (list(
$key$value) = each ($events[$i])) {
                    echo 
"&nbsp;<a href=\"javascript:MM_openBrWindow('event.php?id=$value','','width=500,height=200');\">" $event_info[$value]['1'] . " " $event_info[$value]['0']  . "</a>\n<br>\n";
                }
                echo 
"</span></div>\n";
            }
            echo 
"</td>\n";
            IF((
$count_boxes == 7) AND ($days_so_far != (($first_day_of_month-1) + $days_in_month))){
                
$count_boxes 0;
                echo 
"</TR><TR valign=\"top\">\n";
            }
        }
        
$extra_boxes $count_boxes;
        for (
$i 1$i <= $extra_boxes$i++) {
            echo 
"<td width=\"100\" height=\"50\" class=\"afterdayboxes\"></td>\n";
        }
        
$time_end getmicrotime();
        
$time round($time_end $time_start3);
        
?>
</tr>
</table>
</body>
  #7 (permalink)  
Antiguo 14/02/2007, 17:15
 
Fecha de Ingreso: abril-2006
Ubicación: Colombia
Mensajes: 648
Antigüedad: 18 años
Puntos: 3
Re: Modificar Calendario

Hola de nuevo

2 observaciones

1. una parte del codigo html me quedo por fuera de donde se escribe el codigo, es decir, parece que fuera mi firma o algo parecido, eso va entre el codigo, lo que pasa es que puse las etiquetas de php y creo que las puse mal!!!!


2. cambie la forma en que se mostraba el select de los meses, espero no haya problema, suerte.
  #8 (permalink)  
Antiguo 15/02/2007, 10:10
Avatar de LoUiMaNiAkO  
Fecha de Ingreso: enero-2006
Mensajes: 198
Antigüedad: 18 años, 3 meses
Puntos: 1
Sonrisa Re: Modificar Calendario

gracias, pero sabes ahora las fechas se guardan en otro lado,
por ejemplo si intento guardar un evento el 15 de febrero del 2007 se guarda en el 15 de enero :S:S (ya lo resolvi)

Ahora en este codigo ya pude pasar los meses a español pero los dias me fallan aun, como en mi base de datos se guarda el numero de dia y el numero de mes, al coger el numero de dia me pone el dia actual asi k les dejo el script original,
para k lo vean tal cual y espero sugieran como hacerlo

Código PHP:
<?
require_once("includes/config.php");
$db_connection mysql_connect ($DBHost$DBUser$DBPass) OR die (mysql_error());  
$db_select mysql_select_db ($DBName) or die (mysql_error());
$db_table $TBL_PR "events";

$query "SELECT * FROM $db_table WHERE event_id='$_GET[id]' LIMIT 1";
$query_result mysql_query ($query);
while (
$info mysql_fetch_array($query_result)){
    
//$dia = array ("Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado", "Domingo");  
    //$mes = array ("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");  
   
    
$date date ("l, jS F Y"mktime(0,0,0,$info['event_month']-1,$info['event_day'],$info['event_year']));
    
$time_array split(":"$info['event_time']);
    
$time date ("g:ia"mktime($time_array['0'],$time_array['1'],0,$info['event_month'],$info['event_day'],$info['event_year']));
?>
__________________
:molesto: "Soy como dios k nunca llora y como satanas k nunca resa":molesto:

Dejate seducir por mis colmillos

Última edición por LoUiMaNiAkO; 15/02/2007 a las 12:47 Razón: Agregar script
  #9 (permalink)  
Antiguo 16/02/2007, 11:15
 
Fecha de Ingreso: abril-2006
Ubicación: Colombia
Mensajes: 648
Antigüedad: 18 años
Puntos: 3
Re: Modificar Calendario

Hola

Bueno, intenta esto

Código PHP:

$dia 
= array ("Lunes""Martes""Miercoles""Jueves""Viernes""Sabado""Domingo");  
$mes = array ("Enero""Febrero""Marzo""Abril""Mayo""Junio""Julio""Agosto""Septiembre""Octubre""Noviembre""Diciembre");  

$query "SELECT * FROM $db_table WHERE event_id='$_GET[id]' LIMIT 1";
$query_result mysql_query ($query);
while (
$info mysql_fetch_array($query_result)){
     
// date antiguo captura el dia y el mes en ingles dando como resultado : Friday, 16th February 2007
//$date = date ("l, jS F Y", mktime(0,0,0,$info['event_month'],$info['event_day'],$info['event_year']));
//date modificado que captura el dia  y el mes en formato numerico: 5, 16th 02 2007
// da valor 5 en donde antes era Friday, pues la funcion date cuenta el dia desde 0 a 6 
//siendo 0 domingo y sabado 6 
$date date ("w, jS m Y"mktime(0,0,0,$info['event_month'],$info['event_day'],$info['event_year']));

//Se revisa, si el numero de dia es 0 quiere decir que es domingo, pero como en el array de dia
//el elemento 0 es Lunes, le decimos que el numdia sea 6 para que nos muestre el elemento Domingo
$numdia substr($date,0,1); 
if(
$numdia == 0)
{
    
$numdia 6;
}
else
{
    
$numdia substr($date,0,1)-1
}
    
$fecha $dia[$numdia].", ".substr($date,2,5)." ".$mes[substr($date,8,2)-1]." ".$info['event_year'];
//Le asignamos a date el nuevo formato de fecha, que sera: Viernes, 16th Febrero 2007
$date $fecha;
$time_array split(":"$info['event_time']);

$time date ("g:ia"mktime($time_array['0'],$time_array['1'],0,$info['event_month'],$info['event_day'],$info['event_year']));

Suerte
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:52.