Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- index.php additions -->
- //PHP Addition to the top of the top of index.php after the connect function
- if($db){
- // Connect to the database
- db();
- //Start of Addition
- if(isset($_POST['amount']))
- {
- $amount=$_POST['amount'];
- $tap=$_POST['tap'];
- $sql = "insert into pours (tapId,pinId, amountPoured, pulses) values (".$tap.",".$tap.",".$amount."/128,1)";
- mysql_query($sql);
- }
- //End of Addition
- $config = array();
- <!--section that defines your column display selections this is where to add the form -->
- <?php if(($config[ConfigNames::ShowAbvCol]) && ! ($config[ConfigNames::ShowAbvImg])){ ?>
- <!-- added after the abv section I also commented out the echo for calorie count -->
- <h2><?php echo number_format($abv, 1, '.', ',')."%"; ?> ABV</h2>
- <!-- start of addition -->
- <h2>
- <form action="" method="post">
- <select class = "styled-select" name = "amount">
- <option value="11" <?php if(isset($_POST['amount']) && $tapNum == $i && $amount == "11"){echo "selected";} ?>>Goblet</option>
- <option value="17" <?php if(isset($_POST['amount']) && $tapNum == $i && $amount == "17"){echo "selected";} ?>>Pint</option>
- <option value="6" <?php if(isset($_POST['amount']) && $tapNum== $i && $amount=="6"){echo "selected";} ?>>Taste</option>
- <option value="40" <?php if(isset($_POST['amount']) && $tapNum == $i && $amount == "40"){echo "selected";} ?>>Growler</option>
- </select>
- <br/>
- <input class="pour" type="submit" value ="Pour"/>
- <input type="hidden" name="tap" value="<?php echo $beer['id'];?>">
- <input type="hidden" name="tapNum" value="<?php echo $i;?>">
- <br/>
- </form>
- </h2>
- <!-- End of Addition -->
- </td>
- <!-- CSV Addtions Add near top of csv file you can change all the color values-->
- .pour{
- width:66px;
- height:44px;
- margin-top:25px;
- font-family: MAGNETO;
- font-size:large;
- font-weight:bold;
- border: 4px outset rgba(121,68,27,1.00);
- box-shadow: inset 300px 300px 600px rgba(120,60,20,1.00);
- color: rgba(222,206,16,1.00);
- background-color: rgba(121,68,27,1.00);
- border-radius: 8px;
- }
- select {
- background: transparent;
- width: 95px;
- padding: 5px;
- font-family: MAGNETO;
- border: 4px outset rgba(121,68,27,1.00);
- margin-top:12px;
- font-size: 16px;
- color: rgba(222,206,16,1.00);
- font-weight: bold;
- line-height: 1;
- border-radius: 8px;
- background-color: rgba(121,68,27,1.00);
- border: 4px outset rgba(121,68,27,1.00);
- weight: 34px;
- -webkit-appearance: none;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement