Changeset 18802


Ignore:
Timestamp:
04/03/17 05:25:30 (8 years ago)
Author:
Daniela Dorner
Message:
adapted to change of column fValidFrom in DB
Location:
trunk/www/db_po
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/db_po/edit_po.php

    r12449 r18802  
    1212
    1313    include ("include.php");
    14     if (!isset($_SERVER['PHP_AUTH_USER']))
     14    if (!isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['PHP_AUTH_PW']))
    1515    {
    1616        header('WWW-Authenticate: Basic realm="Edit FACT Configuration Database"');
     
    2222        //echo "The password is not yet evaluated, but the username is inserted into the DB.<br>";
    2323        if (!CheckUsernameAndPassword($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'], GetLDAPOptions()))
     24        {
     25            header('WWW-Authenticate: Basic realm="Edit FACT Configuration Database"');
     26            header('HTTP/1.0 401 Unauthorized');
    2427            return;
     28        }
    2529    }
    2630
  • trunk/www/db_po/get_date.php

    r13322 r18802  
    8686        $query0.=" FROM History ";
    8787        if (empty($identifier1))
    88             $query0.=" WHERE NOT fValidFrom='0000-00-00 00:00:00' ";
     88            $query0.=" WHERE NOT fValidFrom='1970-01-01 00:00:00' ";
    8989        else
    9090            $query0.=" WHERE Date_Format(fValidFrom, '". $identifier1."')='".$_GET["fStatusDate"]."'";
  • trunk/www/db_po/get_values.php

    r12445 r18802  
    142142                   $_GET["fGetValCase"], $row0[0], $row0[12], $row0[6], $_GET["fGetValCase"], $row0[0], $row0[12]);
    143143            //valid from
    144             //if (strcmp('0000-00-00 00:00:00', $row0[1])==0)
     144            //if (strcmp('1970-01-01 00:00:00', $row0[1])==0)
    145145            //    printf("<td class='validsince%d' style='display:%s' id='notyetvalid%s'> %s </td>\n", $_GET["fGetValCase"], $generalshowhide, $row0[0], $row0[1]);
    146146            //else
    147147            //    printf("<td class='validsince%d' style='display:%s'> %s </td>\n", $_GET["fGetValCase"], $generalshowhide, $row0[1]);
    148             if (strcmp('0000-00-00 00:00:00', $row0[1])==0)
     148            if (strcmp('1970-01-01 00:00:00', $row0[1])==0)
    149149                printf("<td class='validsince%d' style='display:none' id='notyetvalid%s'> %s </td>\n", $_GET["fGetValCase"], $row0[0], $row0[1]);
    150150            else
  • trunk/www/db_po/insert_po.php

    r11991 r18802  
    190190        $query0.=" WHERE fIndex=".$_GET["fIndex"];
    191191    if ($_GET["fUpdCase"]==6)
    192         $query0.=" AND fValidFrom='0000-00-00 00:00:00'";
     192        $query0.=" AND fValidFrom='1970-01-01 00:00:00'";
    193193    $query0.=";";
    194194
     
    204204        if ($_GET["fUpdCase"]==3 || $_GET["fUpdCase"]==4)
    205205            $query0.=" AND NOT fIndex=".$_GET["fIndex"];
    206         $query0.=" AND ((NOT ISNULL(fValue) AND NOT fValidFrom='0000-00-00 00:00:00') ";//normal entries, but not deleted ones
    207         $query0.=" OR (ISNULL(fValue) AND fValidFrom='0000-00-00 00:00:00')); ";//new entries
     206        $query0.=" AND ((NOT ISNULL(fValue) AND NOT fValidFrom='1970-01-01 00:00:00') ";//normal entries, but not deleted ones
     207        $query0.=" OR (ISNULL(fValue) AND fValidFrom='1970-01-01 00:00:00')); ";//new entries
    208208
    209209        //insert new counter to history
  • trunk/www/db_po/view_po.php

    r12449 r18802  
    2727    mysql_select_db($db);
    2828
    29     $query0="SELECT DATE_FORMAT(fValidFrom, '%Y') AS valid FROM History WHERE NOT fValidFrom='0000-00-00 00:00:00' group by valid";
     29    $query0="SELECT DATE_FORMAT(fValidFrom, '%Y') AS valid FROM History WHERE NOT fValidFrom='1970-01-01 00:00:00' group by valid";
    3030    $result0=mysql_query($query0, $db_id);
    3131
Note: See TracChangeset for help on using the changeset viewer.