<li class="divider"></li> <li class=""><a href="settings.php"><i class="icon-wrench"></i> Settings</a></li> <li class=""><a href="new.php"><i class="icon-plus-sign"></i> Add new</a></li> </ul> </div> <div class="span9" style="text-align: center;"> <?php if ($id >= 0) { if ($confirmed) { if ($r->delete($id)) { box('Success', 'Registrar has been successfully deleted', 'info'); } else { box('Oh boy', 'Something went terribly wrong', 'warning'); } } else { $reg = $r->get($id); echo '<h3>You are about to delete</h3><br><h2>' . $reg['reg_name'] . '</h2>'; echo ' <form class="form-horizontal" action="delreg.php?id=' . $id . '" method="post"> <input type="hidden" name="action" value="delete"> <div style="text-align:center;"><button type="submit" class="btn btn-warning"><i class="icon-edit"></i> Delete</button></div> </form>'; } } ?> </div> </div> </div> <?php footerHere(); ?>
<div class="tab-content"> <div class="tab-pane active" id="tab1"> <table class="table table-striped table-hover"> <thead> <tr> <th>Domain name</th> <th>Registrar</th> <th>Days left</th> <th>Action</th> </tr> </thead> <tbody> <?php if ($d->numTotal() > 0) { foreach ($domains as $row) { $dom = $r->get($row['dom_reg_id']); echo ' <tr> <td><a href="single.php?id=' . $row['dom_id'] . '">' . $row['dom_name'] . '</a></td> <td><a href="registrar.php?id=' . $row['dom_reg_id'] . '">' . $dom['reg_name'] . '</a></td> <td>' . $row['dom_days_left'] . '</td> <td> <a href="http://' . $row['dom_name'] . '"><i class="icon-share"></i></a> <a href="single.php?id=' . $row['dom_id'] . '" alt="Details"><i class="icon-edit"></i></a> <a href="delete.php?id=' . $row['dom_id'] . '"><i class="icon-trash"></i></a> </td> </tr>'; } } ?> </tbody>
</div> <div class="span9"> <?php if ($id < 0) { if (!isset($_POST['action'])) { box('Huh?', 'Something went wrong', 'error'); } else { if ($_POST['action'] == 'delete') { echo 'delete registrar'; } elseif ($_POST['action'] == 'update') { echo 'update registrar'; } else { box('Huh?', 'Something went wrong', 'error'); } } } elseif ($id >= 0 && $r->get($id)) { $registrar = $r->get($id); echo ' <div class="row"> <div class="span5"> <form class="form-horizontal" action="registrar.php" method="post"> <fieldset> <input type="hidden" name="action" value="update"> <div class="control-group"> <label class="control-label">Registrar name</label> <div class="controls"> <input type="text" class="input-medium input-block-level input-xlarge" name="RegName" value="' . $registrar['reg_name'] . '"> </div> </div> <div class="control-group"> <label class="control-label">Registrar link</label>
<li class=""><a href="new.php"><i class="icon-plus-sign"></i> Add new</a></li> </ul> </div> <div class="span9"> <?php // did we just perform an update? if (isset($updated)) { if ($updated) { box('Domain updated', 'Domain details has been successfully updated', 'success'); } else { box('Error', 'Something went wrong while updating the domain', 'error'); } } if ($id >= 0 && $d->get($id) > -1) { $dom = $d->get($id); $rget = $r->get($dom['dom_reg_id']); $dname = $rget['reg_name']; echo ' <div class="row"> <div class="span8"> <div class="row"> <div class="span5"> <form class="form-horizontal" action="single.php?id=' . $id . '" method="post"> <fieldset> <input type="hidden" name="dom_id" value="' . $dom['dom_id'] . '"> <input type="hidden" name="action" value="update"> <div class="control-group"> <label class="control-label">Domain name</label> <div class="controls"> <input type="text" class="input-medium input-block-level input-xlarge" name="dom_name" value="' . $dom['dom_name'] . '"> </div>