| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <?php
- if (isset($_POST['confirm']) && !empty($_POST['msgid'])) {
- $error = $cnfrmSuccess = '';
- $pollCnfrm = $SWITCHEPP->WgsSwitchEppAckConfirm($_POST['msgid']);
- if ($pollCnfrm['status'] == 'error')
- $error = $pollCnfrm['msg'];
- elseif ($pollCnfrm['status'] == 'success')
- $cnfrmSuccess = $pollCnfrm['msg'];
- } elseif (isset($_POST['confirm']) && empty($_POST['msgid']))
- $error = 'msgId is missing!';
- if (isset($_POST['getpoll']) && !empty($_POST['getpoll'])) {
- $error = $success = '';
- $pollList = $SWITCHEPP->WgsSwitchEppGetPoll();
- if ($pollList['status'] == 'error')
- $error = $pollList['msg'];
- elseif ($pollList['status'] == 'success')
- $success = $pollList['msg'];
- if (!empty($success)) {
- $pollArr = simplexml_load_string($pollList['resp']);
- $msgid = $pollList['msgid'];
- $domainName = $pollArr->response->resData->children("domain", true)->trnData->name;
- $status = $pollArr->response->resData->children("domain", true)->trnData->trStatus;
- $reDate = substr($pollArr->response->resData->children("domain", true)->trnData->reDate, 0, 10);
- $pollMsg = $pollArr->response->msgQ->msg;
- }
- }
- ?>
- <style>
- .poll_cont {
- text-align: center;
- }
- .poll_cont input[type="submit"] {
- background: green;
- border: 1px solid green;
- color: #fff;
- padding: 8px 20px;
- }
- .pollsuccess {
- background: #cbf39f;
- margin: 10px;
- padding: 10px;
- color: #406f0b;
- }
- .pollerror {
- background: #f5d2d2;
- margin: 10px;
- padding: 10px;
- color: #bb1313;
- }
- </style>
- <div class="poll_cont">
- <form method="post" action="">
- <input type="submit" name="getpoll" value="Get Poll">
- </form>
- <?php
- if (!empty($error))
- echo '<div class="pollerror">' . $error . '</div>';
- elseif (!empty($cnfrmSuccess))
- echo '<div class="pollsuccess">' . $cnfrmSuccess . '</div>';
- elseif (!empty($success)) {
- echo '<div class="pollsuccess">' . $success . '</div>';
- ?>
- <form action="" method="post">
- <input type="hidden" name="msgid" value="<?php echo $msgid ?>">
- <table class="datatable" style="width: 100%;">
- <thead>
- <th>Domain Name</th>
- <th>Status</th>
- <th>Msg</th>
- <th>Reg. Date</th>
- <th>Action</th>
- </thead>
- <tbody>
- <?php if (!empty($msgid)) { ?>
- <td><?php echo $domainName; ?></td>
- <td><?php echo $status; ?></td>
- <td><?php echo $pollMsg; ?></td>
- <td><?php echo $reDate; ?></td>
- <td><input type="submit" name="confirm" value="Confirm"></td>
- <?php } else { ?>
- <td colspan="100%">No messages</td>
- <?php } ?>
- </tbody>
- </table>
- </form>
- <?php } ?>
- </div>
|