<?php if (workHasTombstone($workId)) { echo getTombstone($workId); } ?> </center> <!-- Work ID is passed as a hidden field. For the "mode" field, we must be updating the description if the work already has one, so set the value accordingly. --> <input type="hidden" name="work" value="<?php echo $workId; ?> "/> <input type="hidden" name="mode" value="<?php echo workHasDescription($workId) ? "update" : "new"; ?> "/> <p/> <!-- textarea for the description. Contains the existing description if there is one. --> <textarea id="desc" style="width:600;height:200;" name="desc"><?php if (workHasDescription($workId)) { echo getDescription($workId); } ?> </textarea> <p/> <div style="float:right;clear:both;"><button id="submit">Update</button></div> </div> </form> </body> </html>
$ind = 0; $collectionQuery->execute(); echo "<div style=\"display:table-row;\">"; while ($item = $collectionQuery->fetch()) { if ($ind % 3 == 0) { echo "</div><div style=\"display:table-row;\">"; } echo "<div class=\"collCell\"><a rel=\"shadowbox;height:80%;width:80%;\" href=\"workview.php?wid=" . $item['work'] . "&gid=" . $gameinstance . "\"/>" . "<img src=\"img.php?img=" . $item['url'] . ($uuid == $gameGenie ? "&mode=thumb\"" : "\" width=\"260\"") . " alt=\"[Image]\" valign=\"top\"/></a>"; echo "<div class=\"collCellCaption\">"; if (workHasTombstone($item['url'])) { echo getTombstone($item['url'], false); } else { echo "<a class=\"navHref\" href=\"javascript:Shadowbox.open({ content: 'addTombstone.php?w=" . $item['url'] . "', player: 'iframe', height: 800, width: 640 });\">Add Tombstone</a>"; } echo " | "; if (workHasDescription($item['url'])) { echo "<a class=\"navHref\" href=\"javascript:Shadowbox.open({ content: 'addDescription.php?w=" . $item['url'] . "', player: 'iframe', height: 800, width: 640 });\">Edit Description</a>"; } else { echo "<a class=\"navHref\" href=\"javascript:Shadowbox.open({ content: 'addDescription.php?w=" . $item['url'] . "', player: 'iframe', height: 800, width: 640 });\">Add Description</a>"; } echo "</div></div>\n"; $ind++; } echo "</div>"; ?> </div> </body> <?php include 'jewel.php'; ?> </html>