foreach ($ActionArr["Arguments"] as $ArgObject) { echo $ArgObject->GenerateEditor($ItemActionData[$i]); $i++; } ?> <div class="row"> <div class="col-sm-6 col-md-4" style="text-align: right;line-height: 34px;"> <b>Servers</b> </div> <div class="col-sm-6 col-md-8" style="text-align: left;line-height: 34px;"> <div style="font-size: 12px;border: 1px solid #DDD;padding: 6px;width: 300px;border-radius: 4px;"> <?php $ServersArr = explode(";", $ItemAction->GetValue("Servers")); foreach (Servers::GetCachedResults("Servers") as $ServerObj) { $Checked = ""; foreach ($ServersArr as $ServerID) { if ($ServerObj->GetValue("ID") == intval($ServerID)) { $Checked = "checked"; } } echo '<input name="action_server_' . $ServerObj->GetValue("ID") . '" type="checkbox" ' . $Checked . ' /> ' . $ServerObj->GetValue("Name") . '<br />'; } ?> </div> </div> </div> <div class="row"> <div class="col-sm-6 col-md-4" style="text-align: right;line-height: 34px;">
<div style="padding: 20px;"> <table class="table" style="font-size: 13px;"> <thead> <th style="width: 35%;">Display Name</th> <th style="width: 25%;">Server IP</th> <th style="width: 20%;">Port</th> <th style="text-align: right;width: 20%;">Actions</th> </thead> <tbody> <?php $Servers = Servers::GetCachedResults("Servers"); if (count($Servers) == 0) { echo "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan='3' style='text-align: center;padding: 12px;font-size: 12px;'>\n\t\t\t\t\t\t\t\t<i>There are no servers to display!</i>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t"; } else { foreach ($Servers as $Server) { echo "\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . $Server->GetValue("Name") . "</td>\n\t\t\t\t\t\t\t\t<td>" . $Server->GetValue("IP") . "</td>\n\t\t\t\t\t\t\t\t<td>" . $Server->GetValue("Port") . "</td>\n\t\t\t\t\t\t\t\t<td style='text-align: right;'>\n\t\t\t\t\t\t\t\t\t<a href='?page=admin&area=servers&delete=" . $Server->GetValue("ID") . "'><span class='btn btn-xs btn-danger'>Delete</span></a>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t"; } } ?> </tbody> </table> <br /> <form class="form-inline" method="POST" action="?page=admin&area=servers"> <input type="hidden" name="addServer" value="yes" /> <input type="text" name="displayName" class="form-control" style="height: 28px;width: 150px;" placeholder="Display Name" required /> <input type="text" name="serverIP" class="form-control" style="height: 28px;width: 150px;" placeholder="IP Address" required /> <b>:</b> <input type="text" name="serverPort" class="form-control" style="height: 28px;width: 70px;" placeholder="Port" required /> <input type="submit" value="Add" class="btn btn-xs btn-success" />