

<div id="usersFees" class="loginForm" style="background:none !important;">
    <div class="overlay-bl-bg" style="background:none !important;"></div>
    <div class="container_12 pop-content" style="background:transparent !important;">
        <div class="grid_11 prefix_1" style="background:none !important;">
            <div class="form login-form" style="background:none !important;">
                <form action="/admin/usersFees" method="post">
                    <div class="box-white" style="height:auto;">
                        <h4 class="rs title-box">Manage fees for users</h4>

						<table class="admintable" id="projects_table">
						    <tr><th>Image</th><th>Name</th><th>Email</th><th>Registration</th><th>Actions</th></tr>

						    <?php
						    foreach ($users as $user) : ?>
						        <tr data-uid="<?= $user['id'] ?>">
						            <td><img src="<?= $user['image'] ?>" alt="<?= $user['name'] ?> profile picture" style="width: 64px; height: 64px" /></td>
						            <td><?= $user['name'] ?></td>
						            <td><?= $user['email'] ?></td>
						            <td><?= date("Y-m-d h:i:s A", strtotime($user['reg_date'])) ?></td>
						            <td>
			                            <label><input type="checkbox" class="disable-fee" rel="<?= $user['id'] ?>" name="disabled_fees[<?= $user['id'] ?>]" />&nbsp;Disable fee for this User</label><br />
			                            <input name="specific_fees[<?= $user['id'] ?>]" class="specific-fee" rel="<?= $user['id'] ?>" class="txt" value="<?= $user['specific_fee'] ?>" placeholder="10" />
						            </td>
						        </tr>
						    <?php
						    endforeach; ?>

						</table>

                        <p class="rs ta-c" style="margin-bottom:0px; padding-bottom:0px;">
                            <button class="btn btn-blue btn-submit" type="submit">Submit</button>
                        </p>
                    </div>
                </form>
            </div>
        </div>
        <div class="clear"></div>
    </div>
</div>

<script type="text/javascript">
$("input.disable-fee").change(function()
{
	var uid       = $(this).attr("rel");
	var fee_field = $("input.specific-fee[rel=" + uid + "]");

    if ($(this).is(":checked"))
        fee_field.attr("disabled", "disabled");
    else
        fee_field.removeAttr("disabled");
});
</script>
