<?php
    $GLOBALS['highlight'] = 'userinfo';

    include('include/parts/header.php');
?>

<div class="header"><a href="?s=quilts_moderate">Moderate Quilts</a> - Create A New Quilt</div>

<div class="content">
<?php
    if (isset($errors))
    {
        echo '<span style="color: red;">' . $errors . '</span>';
        echo '<div style="padding: 5px 0px 0px 0px;"></div>';
    }
?>
<form action="?a=quilt_create" method="post" style="margin: 0px; display: inline;">
<table width="100%" border="0">
<tr><td width="150" style="text-align: right;">Quilt Name:</td><td><input name="name" size="40" value="<?php echo isset($_name) ? htmlspecialchars(stripslashes($_name)) : '' ?>" style="border: solid 2px black; margin: 0px; padding: 3px;"></td></tr>
<tr><td width="150" style="text-align: right;">Quilt Description:</td><td><textarea name="description" style="width: 400px; height: 100px; border: solid 2px black; margin: 0px; padding: 3px;"><?php echo isset($_description) ? htmlspecialchars(stripslashes($_description)) : '' ?></textarea></td></tr>
<tr><td width="150" style="text-align: right;">Tile Width:</td><td><input name="tile_width" size="5" value="<?php echo isset($_tile_width) ? $_tile_width : '' ?>" style="border: solid 2px black; margin: 0px; padding: 3px;"> (100 to 800)</td></tr>
<tr><td width="150" style="text-align: right;">Tile Height:</td><td><input name="tile_height" size="5" value="<?php echo isset($_tile_height) ? $_tile_height : '' ?>" style="border: solid 2px black; margin: 0px; padding: 3px;"> (100 to 800)</td></tr>
<tr><td width="150" style="text-align: right;">Quilt Width:</td><td><input name="quilt_width" size="5" value="<?php echo isset($_quilt_width) ? $_quilt_width : '' ?>" style="border: solid 2px black; margin: 0px; padding: 3px;"> (1 to 15)</td></tr>
<tr><td width="150" style="text-align: right;">Quilt Height:</td><td><input name="quilt_height" size="5" value="<?php echo isset($_quilt_height) ? $_quilt_height : '' ?>" style="border: solid 2px black; margin: 0px; padding: 3px;"> (1 to 15)</td></tr>
<tr><td width="150" style="text-align: right;">Hours To Complete:</td><td><input name="timelimit" size="5" value="<?php echo isset($_timelimit) ? $_timelimit : '' ?>" style="border: solid 2px black; margin: 0px; padding: 3px;"> (1 to 72)</td></tr>
<tr><td width="150" style="text-align: right;">Choose Multiple Tiles:</td><td><select name="multiple" style="width: 100px; border: solid 2px black; margin: 0px; padding-top: 1px; padding-bottom: 1px;">
<?php
    for ($i = 1; $i <= 10; $i++)
    {
        echo '<option value="' . $i . '"' . (isset($_multiple) && $_multiple == $i ? ' selected' : '') . '>' . $i . '</option>' . "\r\n";
    }
?>
</select> Allow user to checkout multiple tiles.
</td></tr>
<tr><td width="150" style="text-align: right;">Side Pixels To Display:</td><td><select name="side_pixels" style="width: 100px; border: solid 2px black; margin: 0px; padding-top: 1px; padding-bottom: 1px;">
<option value="15"<?php echo (isset($_side_pixels) && $_side_pixels == 15) ? ' selected' : '' ?>>15</option>
<option value="16"<?php echo (isset($_side_pixels) && $_side_pixels == 16) ? ' selected' : '' ?>>16</option>
<option value="20"<?php echo (isset($_side_pixels) && $_side_pixels == 20) ? ' selected' : '' ?>>20</option>
<option value="24"<?php echo (isset($_side_pixels) && $_side_pixels == 24) ? ' selected' : '' ?>>24</option>
<option value="25"<?php echo (isset($_side_pixels) && $_side_pixels == 25) ? ' selected' : '' ?>>25</option>
<option value="30"<?php echo (isset($_side_pixels) && $_side_pixels == 30) ? ' selected' : '' ?>>30</option>
<option value="32"<?php echo (isset($_side_pixels) && $_side_pixels == 32) ? ' selected' : '' ?>>32</option>
<option value="35"<?php echo (isset($_side_pixels) && $_side_pixels == 35) ? ' selected' : '' ?>>35</option>
<option value="40"<?php echo (isset($_side_pixels) && $_side_pixels == 40) ? ' selected' : '' ?>>40</option>
<option value="45"<?php echo (isset($_side_pixels) && $_side_pixels == 45) ? ' selected' : '' ?>>45</option>
<option value="50"<?php echo (isset($_side_pixels) && $_side_pixels == 50) ? ' selected' : '' ?>>50</option>
</select> Pixels user has on the checkout tile to work with.
</td></tr>
<tr><td width="150" style="text-align: right;">Quilt Level:</td><td><select name="level" style="width: 100px; border: solid 2px black; margin: 0px; padding-top: 1px; padding-bottom: 1px;">
<option value="0"<?php echo (isset($_level) && $_level == 0) ? ' selected' : '' ?>>Beginner</option>
<option value="1"<?php echo (isset($_level) && $_level == 1) ? ' selected' : '' ?>>Intermediate</option>    
<option value="2"<?php echo (isset($_level) && $_level == 2) ? ' selected' : '' ?>>Advanced</option>    
</select>
</td></tr>
<tr><td width="150" style="text-align: right;">Photographs Allowed:</td><td><select name="photographs_allowed" style="width: 100px; border: solid 2px black; margin: 0px; padding-top: 1px; padding-bottom: 1px;">
<option value="0"<?php echo (isset($_photographs_allowed) && $_photographs_allowed == 0) ? ' selected' : '' ?>>No</option>
<option value="1"<?php echo (isset($_photographs_allowed) && $_photographs_allowed == 1) ? ' selected' : '' ?>>Yes</option>    
</select>
</td></tr>
<tr><td width="150" style="text-align: right;">Edge Wrap:</td><td><select name="edge_wrap" style="width: 200px; border: solid 2px black; margin: 0px; padding-top: 1px; padding-bottom: 1px;">
<option value="0"<?php echo (isset($_edge_wrap) && $_edge_wrap == 0) ? ' selected' : '' ?>>None</option>
<option value="1"<?php echo (isset($_edge_wrap) && $_edge_wrap == 1) ? ' selected' : '' ?>>Horizonal</option>    
<option value="2"<?php echo (isset($_edge_wrap) && $_edge_wrap == 2) ? ' selected' : '' ?>>Verticle</option>    
<option value="3"<?php echo (isset($_edge_wrap) && $_edge_wrap == 3) ? ' selected' : '' ?>>All Edges</option>    
</select>
</td></tr>
<tr><td width="150" style="text-align: right;">Tiles Visible:</td><td><select name="show_all" style="width: 300px; border: solid 2px black; margin: 0px; padding-top: 1px; padding-bottom: 1px;">
<option value="0"<?php echo (isset($_show_all) && $_show_all == 0) ? ' selected' : '' ?>>When Neighbours Are Finished</option>
<option value="1"<?php echo (isset($_show_all) && $_show_all == 1) ? ' selected' : '' ?>>Instantly</option>    
<option value="2"<?php echo (isset($_show_all) && $_show_all == 2) ? ' selected' : '' ?>>When Whole Quilt Is Complete</option>    
</select>
</td></tr>
<tr><td width="150" style="text-align: right;">Can Work On Tiles:</td><td><select name="work_on_all" style="width: 300px; border: solid 2px black; margin: 0px; padding-top: 1px; padding-bottom: 1px;">
<option value="0"<?php echo (isset($_work_on_all) && $_work_on_all == 0) ? ' selected' : '' ?>>Not Next To Your Own</option>
<option value="1"<?php echo (isset($_work_on_all) && $_work_on_all == 1) ? ' selected' : '' ?>>Even Ones Next To Your Own</option>    
</select>
</td></tr>
<tr><td width="150" style="text-align: right;">Checkout Tile:</td><td><select name="start_anywhere" style="width: 300px; border: solid 2px black; margin: 0px; padding-top: 1px; padding-bottom: 1px;">
<option value="0"<?php echo (isset($_start_anywhere) && $_start_anywhere == 0) ? ' selected' : '' ?>>Only Next To An Existing Tile</option>
<option value="1"<?php echo (isset($_start_anywhere) && $_start_anywhere == 1) ? ' selected' : '' ?>>Anywhere Thats Available</option>    
</select>
</td></tr>
<tr><td width="150" style="text-align: right;">Moderated:</td><td><select name="moderated" style="width: 100px; border: solid 2px black; margin: 0px; padding-top: 1px; padding-bottom: 1px;">
<option value="0"<?php echo (isset($_moderated) && $_moderated == 0) ? ' selected' : '' ?>>No</option>
<option value="1"<?php echo (isset($_moderated) && $_moderated == 1) ? ' selected' : '' ?>>Yes</option>    
</select>
</td></tr>
<tr><td width="150" style="text-align: right;"></td><td><input type="submit" value="Start New Quilt" style="border: solid 1px green; background: black; color: green;"></td></tr>
</table>
</form>
</div>

<?php
    include('include/parts/footer.php');
?>