Example #1
0
    }
    ?>
        <div class="g-block ui-helper-clearfix">
          <a href="<?php 
    echo url::site("admin/themes/preview/admin/{$id}");
    ?>
" class="g-dialog-link" title="<?php 
    echo t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr();
    ?>
">
            <img src="<?php 
    echo url::file("themes/{$id}/thumbnail.png");
    ?>
"
                 alt="<?php 
    echo html::clean_attribute($info->name);
    ?>
" />
            <h3> <?php 
    echo $info->name;
    ?>
 </h3>
            <p>
              <?php 
    echo $info->description;
    ?>
            </p>
          </a>
        </div>
        <?php 
    $count++;
    ?>
"
               class="g-avatar"
               alt="<?php 
    echo html::clean_attribute($comment->author_name());
    ?>
"
               width="40"
               height="40" />
        </a>
        <p><a href="mailto:<?php 
    echo html::clean_attribute($comment->author_email());
    ?>
"
              title="<?php 
    echo html::clean_attribute($comment->author_email());
    ?>
"> <?php 
    echo html::clean($comment->author_name());
    ?>
 </a></p>
      </td>
      <td>
        <div class="g-right">
          <?php 
    $item = $comment->item();
    ?>
          <div class="g-item g-photo">
            <a href="<?php 
    echo $item->url();
    ?>
?>

        <?php 
foreach ($files as $file) {
    ?>
        <li class="ui-icon-left">
          <span class="ui-icon <?php 
    echo is_dir($file) ? "ui-icon-folder-collapsed" : "ui-icon-document";
    ?>
"></span>
          <span class="<?php 
    echo is_dir($file) ? "gDirectory" : "gFile";
    ?>
"
                ref="<?php 
    echo html::clean_attribute($file);
    ?>
" >
            <?php 
    echo html::clean(basename($file));
    ?>
          </span>
        </li>
        <?php 
}
?>
        <?php 
if (!$files) {
    ?>
        <li> <i> <?php 
    echo t("empty");
Example #4
0
?>
" id="g-search-form" class="g-short-form">
  <fieldset>
    <legend>
      <?php 
echo t("Search");
?>
    </legend>
    <ul>
      <li>
        <label for="q"><?php 
echo t("Search the gallery");
?>
</label>
        <input name="q" id="q" type="text" value="<?php 
echo html::clean_attribute($q);
?>
" class="text" />
      </li>
      <li>
        <input type="submit" value="<?php 
echo t("Search")->for_html_attr();
?>
" class="submit" />
      </li>
    </ul>
  </fieldset>
</form>

<div id="g-search-results">
  <h1><?php 
Example #5
0
<?php

defined("SYSPATH") or die("No direct script access.");
?>
<div id="l10n-client" class="hidden">
  <div class="labels">
    <span id="l10n-client-toggler">
      <a id="g-minimize-l10n">_</a>
      <a id="g-close-l10n" title="<?php 
echo t("Stop the translation mode")->for_html_attr();
?>
"
         href="<?php 
echo html::clean_attribute(url::site("l10n_client/toggle_l10n_mode?csrf=" . access::csrf_token()));
?>
">X</a>
    </span>
    <div class="label strings"><h2><?php 
echo t("Page text");
?>
    <? if (!Input::instance()->get('show_all_l10n_messages')): ?>
      <a style="background-color:#fff" href="<?php 
echo url::site("admin/languages?show_all_l10n_messages=1");
?>
"><?php 
echo t("(Show all)");
?>
</a>
    <? endif; ?>
    </h2></div>
    <div class="label source"><h2><?php 
<?php

defined("SYSPATH") or die("No direct script access.");
?>
<ul>
  <? foreach ($comments as $comment): ?>
  <li class="<?php 
echo text::alternate("g-even", "g-odd");
?>
">
    <img src="<?php 
echo $comment->author()->avatar_url(32, $theme->url("images/avatar.jpg", true));
?>
"
         class="g-avatar"
         alt="<?php 
echo html::clean_attribute($comment->author_name());
?>
"
         width="32"
         height="32" />
    <?php 
echo gallery::date_time($comment->created);
?>
    <?php 
echo t('<a href="#">%author_name</a> said <em>%comment_text</em>', array("author_name" => html::clean($comment->author_name()), "comment_text" => text::limit_words(nl2br(html::purify($comment->text)), 50)));
?>
  </li>
  <? endforeach ?>
</ul>
    ?>
">
            <td id="g-user-<?php 
    echo $user->id;
    ?>
" class="g-core-info g-draggable">
              <img src="<?php 
    echo $user->avatar_url(20, $theme->url("images/avatar.jpg", true));
    ?>
"
                   title="<?php 
    echo t("Drag user onto a group to add as a new member")->for_html_attr();
    ?>
"
                   alt="<?php 
    echo html::clean_attribute($user->name);
    ?>
"
                   width="20"
                   height="20" />
              <?php 
    echo html::clean($user->name);
    ?>
            </td>
            <td>
              <?php 
    echo html::clean($user->full_name);
    ?>
            </td>
            <td>
              <?php 
Example #8
0
">
      <?php 
    echo t("Contact");
    ?>
    </a>
    <?php 
}
?>
  </div>
  <h1>
    <img src="<?php 
echo $user->avatar_url(40, $theme->url("images/avatar.jpg", true));
?>
"
       alt="<?php 
echo html::clean_attribute($user->display_name());
?>
"
       class="g-avatar g-left" width="40" height="40" />
    <?php 
echo t("User profile: %name", array("name" => $user->display_name()));
?>
  </h1>
  <?php 
foreach ($info_parts as $info) {
    ?>
  <div class="g-block">
    <h2><?php 
    echo html::purify($info->title);
    ?>
</h2>
Example #9
0
 public function clean_attribute_test()
 {
     $safe_string = SafeString::of_safe_html("hello's <p  >world</p>");
     $safe_string = html::clean_attribute($safe_string);
     $this->assert_equal("hello&#039;s <p  >world</p>", $safe_string);
 }