Changeset 11599 for trunk/www/db_po/get_date.php
- Timestamp:
- 07/26/11 10:51:38 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/db_po/get_date.php
r11502 r11599 21 21 if (empty($_GET["fDateValuePrev"])) 22 22 $_GET["fDateValuePrev"]=""; 23 if (empty($_GET["fStatusDate"])) 24 $_GET["fStatusDate"]=""; 23 25 24 26 include("db.php"); … … 43 45 if (strcmp("month",$_GET["fDateName"])==0) 44 46 { 45 $identifier1=" Y";47 $identifier1="%Y"; 46 48 $identifier2="m"; 47 49 $newdatename="day"; … … 49 51 if (strcmp("day",$_GET["fDateName"])==0) 50 52 { 51 $identifier1=" m";53 $identifier1="%Y-%m"; 52 54 $identifier2="d"; 53 55 $newdatename="hour"; … … 55 57 if (strcmp("hour",$_GET["fDateName"])==0) 56 58 { 57 $identifier1=" d";59 $identifier1="%Y-%m-%d"; 58 60 $identifier2="H"; 59 61 $newdatename="min"; … … 61 63 if (strcmp("min",$_GET["fDateName"])==0) 62 64 { 63 $identifier1=" H";65 $identifier1="%Y-%m-%d %H"; 64 66 $identifier2="i"; 65 67 $newdatename="sec"; … … 67 69 if (strcmp("sec",$_GET["fDateName"])==0) 68 70 { 69 $identifier1=" i";71 $identifier1="%Y-%m-%d %H:%i"; 70 72 $identifier2="s"; 71 73 $newdatename=""; … … 80 82 $query0.=" WHERE NOT fValidFrom='0000-00-00 00:00:00' "; 81 83 else 82 $query0.=" WHERE Date_Format(fValidFrom, '%". $identifier1."')=".$_GET["fDateValuePrev"]; 84 $query0.=" WHERE Date_Format(fValidFrom, '". $identifier1."')='".$_GET["fStatusDate"]."'"; 85 //$query0.=" WHERE Date_Format(fValidFrom, '%". $identifier1."')=".$_GET["fDateValuePrev"]; 83 86 $query0.=" GROUP BY valid"; 84 87 $result0=mysql_query($query0, $db_id); 85 88 } 86 //echo $ _GET["fDateValuePrev"];89 //echo $query0; 87 90 88 //echo $query0;89 91 if (empty($newdatename)) 90 92 printf("<select id='%s%d'>\n", $_GET["fDateName"], $_GET["fIdx"]); 91 93 else 92 { 93 //if (empty($identifier1)) 94 //{ 95 printf("<select id='%s%d' onchange=\"get_dates('%s', this.value, this.value, %d, 'yes')\">\n", 96 $_GET["fDateName"], $_GET["fIdx"], $newdatename, $_GET["fIdx"]); 97 //} 98 //else 99 //{ 100 // printf("<select id='%s%d' onchange=\"get_dates('%s', this.value, '%s', %d, 'yes')\">\n", 101 // $_GET["fDateName"], $_GET["fIdx"], $newdatename, $_GET["fDateValuePrev"], $_GET["fIdx"]); 102 //} 103 } 94 printf("<select id='%s%d' onchange=\"get_dates('%s', this.value, this.value, %d, 'yes')\">\n", 95 $_GET["fDateName"], $_GET["fIdx"], $newdatename, $_GET["fIdx"]); 104 96 if (strcmp($_GET["fDateValue"],"empty")!=0) 105 97 printf("<option value='empty'>%s</option>\n", $_GET["fDateName"]);
Note:
See TracChangeset
for help on using the changeset viewer.