Git Product home page Git Product logo

feeding's People

Contributors

chssn avatar

feeding's Issues

Doesn't scale properly on a mobile screen

feeding/index.php

Lines 122 to 134 in c800b43

<div class="w3-panel w3-pale-blue w3-center">Side</div>
<div class="w3-row">
<div class="w3-quarter w3-center"><i class="fas fa-arrow-left fa-2x w3-text-red"></i></div>
<div class="w3-quarter w3-center"><i class="fas fa-beer fa-2x"></i></div>
<div class="w3-quarter w3-center"><i class="fas fa-female fa-2x"></i></div>
<div class="w3-quarter w3-center"><i class="fas fa-arrow-right fa-2x w3-text-green"></i></div>
</div>
<div class="w3-row">
<div class="w3-quarter w3-center"><input class="w3-radio" type="radio" id="side1" name="side" value="1" onclick="fluidIntake('hide')" required></div>
<div class="w3-quarter w3-center"><input class="w3-radio" type="radio" id="side2" name="side" value="2" onclick="fluidIntake('show')" required></div>
<div class="w3-quarter w3-center"><input class="w3-radio" type="radio" id="side4" name="side" value="4" onclick="fluidIntake('show')" required></div>
<div class="w3-quarter w3-center"><input class="w3-radio" type="radio" id="side3" name="side" value="3" onclick="fluidIntake('hide')" required></div>
</div>

Major update required to show expressed milk vs consumed ebm

feeding/stats.php

Lines 17 to 30 in 77304d4

$sql = "CREATE TEMPORARY TABLE feed_by_day SELECT dayofmonth(from_unixtime(start_time)) AS day, month(from_unixtime(start_time)) AS month, year(from_unixtime(start_time)) AS year, (end_time-start_time) AS duration, side FROM `feeding_log`; SELECT SEC_TO_TIME(SUM(duration)), day, month, year, feed_side.side FROM feed_by_day LEFT JOIN feed_side ON feed_by_day.side = feed_side.id GROUP BY year ASC, month ASC, day ASC, feed_side.side ASC WITH ROLLUP;";
if ($conn->multi_query($sql)) {
do {
/* store first result set */
if ($result = $conn->store_result()) {
while ($row = $result->fetch_row()) {
if ($row[4] == NULL) { $row[4] = "Total"; $highlight = "class='w3-pale-green'"; } else { $highlight = NULL; }
echo "<tr {$highlight}><td>{$row[1]}/{$row[2]}/$row[3]</td><td>{$row[4]}</td><td>{$row[0]}</td></tr>";
}
$result->free();
}
} while ($conn->next_result());
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.