SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/email/link_checker.php

  1. <?php
  2. /*
  3.  * kate: tab-width 4; indent-width 4; space-indent on; word-wrap off; word-wrap-column 120;
  4.  * :tabSize=4:indentSize=4:noTabs=true:wrap=false:maxLineLen=120:mode=php:
  5.  *
  6.  * Copyright (C) 2015 Karmabunny Pty Ltd.
  7.  *
  8.  * This file is a part of SproutCMS.
  9.  *
  10.  * SproutCMS is free software: you can redistribute it and/or modify it under the terms
  11.  * of the GNU General Public License as published by the Free Software Foundation, either
  12.  * version 3 of the License, or (at your option) any later version.
  13.  *
  14.  * For more information, visit <http://getsproutcms.com>.
  15.  */
  16.  
  17. use Sprout\Helpers\Enc;
  18. use Sprout\Helpers\Subsites;
  19. ?>
  20. <p>Hi</p>
  21.  
  22. <p>The following bad links were found on your website:</p>
  23.  
  24. <?php foreach ($errs as $idx => $links): ?>
  25. <?php list($id, $subsite_id, $name) = explode(':', $idx); ?>
  26.  
  27.  
  28. <h3><?php echo Enc::html($name); ?></h3>
  29.  
  30. <p>
  31. <a href="<?php echo Subsites::getAbsRoot($subsite_id) . 'page/view_by_id/' . $id; ?>">View Page</a>
  32. &bull;
  33. <a href="<?php echo Subsites::getAbsRoot($subsite_id) . 'admin/edit/page/' . $id; ?>">Edit page</a>
  34. </p>
  35.  
  36.  
  37. <table class="main-list" width="100%">
  38. <thead>
  39. <tr>
  40. <th align="left" width="34%">Link text</th>
  41. <th align="left" width="33%">URL</th>
  42. <th align="left" width="33%">Error</th>
  43. </tr>
  44. </thead>
  45. <tbody>
  46.  
  47. <?php foreach ($links as $row): ?>
  48. <tr>
  49. <td align="left"><?php echo Enc::html($row['link_text']); ?></td>
  50. <td align="left"><?php echo Enc::html($row['link_href']); ?></td>
  51. <td align="left"><?php echo Enc::html($row['err']); ?></td>
  52. </tr>
  53. <?php endforeach; ?>
  54.  
  55. </tbody>
  56. </table>
  57.  
  58. <p>&nbsp;</p>
  59.  
  60. <?php endforeach; ?>
  61.  
  62.