Yet another PHP based Funko Pop collection tracker, about as bare bones as you can get, but it's functional.
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

27 righe
1.4 KiB

  1. <?php
  2. $pagetitle = "Funko Pop Complete List";
  3. include_once ('header.php');
  4. if (isset($_SESSION['userid'])){
  5. $sql = "SELECT * FROM (pops INNER JOIN popcollection ON pops.popcollectionid = popcollection.popcollectionid) WHERE `userid` = $userid ORDER BY `popcollection`, `popno`, `inserteddate` ASC";
  6. $sqlcount = "SELECT COUNT(*) FROM (pops INNER JOIN popcollection ON pops.popcollectionid = popcollection.popcollectionid) WHERE `userid` = $userid";
  7. if (!$result = $con->query($sql)){
  8. die ('There was an error running the query [' . $con->error . ']');
  9. }
  10. $count = mysqli_query($con, $sqlcount);
  11. $row3 = mysqli_fetch_array($count);
  12. if ($row3[0] <> 1) {
  13. echo 'You have <B>' . $row3[0] . '</B> Funko Pops!<BR />Click the Pop # to edit the data<BR />';
  14. } else {
  15. echo 'You have ' . $row3[0] . ' Funko Pop - go buy some more, it\s lonely!<BR />Click the Pop # to edit the data<BR />';
  16. }
  17. echo '<TABLE BORDER="0">';
  18. echo '<TR><TD>Pop #</TD><TD>Pop Name</TD><TD>Date Added</TD><TD>Pop Collection</TD></TR>';
  19. if (mysqli_num_rows($result) > 0) {
  20. while ($row = $result->fetch_array()){
  21. echo '<TR><TD><A HREF="edit.php?id=' . $row['funkoid'] . '">' . $row['popno'] . '</A></TD><TD>' . $row['popname'] . '</TD><TD>' . $row['inserteddate'] . '</TD><TD><A HREF="search.php?cid=' . $row['popcollectionid'] . '&search=group">' . $row['popcollection'] . '</A></TD></TR>';
  22. }
  23. }
  24. echo '</TABLE>';
  25. }
  26. include_once ('footer.php');
  27. ?>