Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Printing website correctly
- while (!feof($file_handle)){`
- $csvText = fgetcsv($file_handle, 1024);
- $username = $csvText[1];
- $password = $csvText[2];
- $profile = $csvText[3];
- $daysValid = $csvText[4];
- $expiry = $csvText[5];
- if($pos == 0)
- {
- if($count == 5){
- echo "<p><br /></p>";
- $count = 0;
- }else{
- $count++;
- }
- echo "<div class='itemRow'>";
- echo "<div class='left'>";
- $pos = 1;
- ?>
- <h4 class="centre">Internet Access Voucher</h4>
- <img class="image" src="./icon.jpg" />
- <div class="info">
- <table>
- <tr>
- <td>
- Username
- </td>
- </tr>
- <tr>
- <td>
- Password
- </td>
- </tr>
- <tr>
- <td>
- Profile
- </td>
- </tr>
- <tr>
- <td>
- Valid for
- </td>
- </tr>
- <tr>
- <td>
- Expiry date
- </td>
- </tr>
- </table>
- </div>
- <div class="uniqueInfo">
- <table>
- <tr>
- <td>
- <?php echo $username;?>
- </td>
- </tr>
- <tr>
- <td>
- <?php echo $password;?>
- </td>
- </tr>
- <tr>
- <td>
- <?php echo $profile;?>
- </td>
- </tr>
- <tr>
- <td>
- <?php echo $daysValid;?>
- </td>
- </tr>
- <tr>
- <td>
- <?php echo $expiry;?>
- </td>
- </tr>
- </table>
- </div>
- <p class="centre"><br />Please remember to disconnect to stop each session.</p>
- </div>
- <br />
- <?php
- } else {
- ?>
- <div class="right">
- <h4 class="centre">Internet Access Voucher</h4>
- <img class="imageRight" src="./icon.jpg" />
- <div class="infoRight">
- <table>
- <tr>
- <td>
- Username
- </td>
- </tr>
- <tr>
- <td>
- Password
- </td>
- </tr>
- <tr>
- <td>
- Profile
- </td>
- </tr>
- <tr>
- <td>
- Valid for
- </td>
- </tr>
- <tr>
- <td>
- Expiry date
- </td>
- </tr>
- </table>
- </div>
- <div class="uniqueInfoRight">
- <table>
- <tr>
- <td>
- <?php echo $username;?>
- </td>
- </tr>
- <tr>
- <td>
- <?php echo $password;?>
- </td>
- </tr>
- <tr>
- <td>
- <?php echo $profile;?>
- </td>
- </tr>
- <tr>
- <td>
- <?php echo $daysValid;?>
- </td>
- </tr>
- <tr>
- <td>
- <?php echo $expiry;?>
- </td>
- </tr>
- </table>
- </div>
- <p class="centre"><br />Please remember to disconnect to stop each session.</p>
- </div>
- </div>
- <?php
- $pos = 0;
- }
- }
- ?>
- .centre
- {
- text-align:center;
- }
- .itemRow
- {
- position:relative;
- top:0px;
- }
- .left
- {
- width:500px;
- position:relative;
- font-family:Comic Sans, Comic sans MS, cursive;
- /*border-style:solid;
- border-width:1px;*/
- }
- .right
- {
- width:500px;
- position:absolute;
- left:600px;
- top:-20px;
- font-family:Comic Sans, Comic sans MS, cursive;
- /*(border-style:solid;
- border-width:1px;*/
- }
- .image
- {
- position:absolute;
- top:70px;
- }
- .info
- {
- position:relative;
- left:63px;
- }
- .uniqueInfo
- {
- position:absolute;
- left:250px;
- top:42px;
- }
- .infoRight
- {
- position:relative;
- left:63px;
- top:0px;
- }
- .uniqueInfoRight
- {
- position:absolute;
- left:250px;
- top:65px;
- }
- .imageRight
- {
- position:absolute;
- top:90px;
- }
- if($count == 5){
- echo "<p><br /></p>";
- <br style="clear: both;" />
Add Comment
Please, Sign In to add comment