Ejemplo n.º 1
0
 static function get($block_id, $theme)
 {
     $block = "";
     switch ($block_id) {
         case "metadata":
             if ($theme->item()) {
                 $block = new Block();
                 $block->css_id = "g-metadata";
                 $block->title = $theme->item()->is_album() ? t("Album info") : ($theme->item()->is_movie() ? t("Movie info") : t("Photo info"));
                 $block->content = new View("info_block.html");
                 if ($theme->item->title && module::get_var("info", "show_title")) {
                     $info["title"] = array("label" => t("Title:"), "value" => html::purify($theme->item->title));
                 }
                 if ($theme->item->description && module::get_var("info", "show_description")) {
                     $info["description"] = array("label" => t("Description:"), "value" => nl2br(html::purify($theme->item->description)));
                 }
                 if (!$theme->item->is_album() && module::get_var("info", "show_name")) {
                     $info["file_name"] = array("label" => t("File name:"), "value" => html::clean($theme->item->name));
                 }
                 if ($theme->item->captured && module::get_var("info", "show_captured")) {
                     $info["captured"] = array("label" => t("Captured:"), "value" => gallery::date_time($theme->item->captured));
                 }
                 if ($theme->item->owner && module::get_var("info", "show_owner")) {
                     $display_name = $theme->item->owner->display_name();
                     if ($theme->item->owner->url) {
                         $info["owner"] = array("label" => t("Owner:"), "value" => html::anchor(html::clean($theme->item->owner->url), html::clean($display_name)));
                     } else {
                         $info["owner"] = array("label" => t("Owner:"), "value" => html::clean($display_name));
                     }
                 }
                 if ($theme->item->width && $theme->item->height && module::get_var("info", "show_dimensions")) {
                     $info["size"] = array("label" => t("Dimensions:"), "value" => t("%width x %height px", array("width" => $theme->item->width, "height" => $theme->item->height)));
                 }
                 $block->content->metadata = $info;
                 module::event("info_block_get_metadata", $block, $theme->item);
             }
             break;
     }
     return $block;
 }
Ejemplo n.º 2
0
 static function get($block_id, $theme)
 {
     $block = "";
     switch ($block_id) {
         case "metadata":
             if ($theme->item()) {
                 $block = new Block();
                 $block->css_id = "g-metadata";
                 $block->title = $theme->item()->is_album() ? t("Album info") : t("Photo info");
                 $block->content = new View("info_block.html");
                 if ($theme->item->title && module::get_var("info", "show_title")) {
                     $info["title"] = array("label" => t("Title:"), "value" => html::purify($theme->item->title));
                 }
                 if ($theme->item->description && module::get_var("info", "show_description")) {
                     $info["description"] = array("label" => t("Description:"), "value" => nl2br(html::purify($theme->item->description)));
                 }
                 if (!$theme->item->is_album() && module::get_var("info", "show_name")) {
                     $info["file_name"] = array("label" => t("File name:"), "value" => html::clean($theme->item->name));
                 }
                 if ($theme->item->captured && module::get_var("info", "show_captured")) {
                     $info["captured"] = array("label" => t("Captured:"), "value" => gallery::date_time($theme->item->captured));
                 }
                 if ($theme->item->owner && module::get_var("info", "show_owner")) {
                     $display_name = $theme->item->owner->display_name();
                     if ($theme->item->owner->url) {
                         $info["owner"] = array("label" => t("Owner:"), "value" => "<a href=\"{$theme->item->owner->url}\">" . html::clean($display_name) . "</a>");
                     } else {
                         $info["owner"] = array("label" => t("Owner:"), "value" => html::clean($display_name));
                     }
                 }
                 $block->content->metadata = $info;
                 module::event("info_block_get_metadata", $block, $theme->item);
             }
             break;
     }
     return $block;
 }
Ejemplo n.º 3
0
        </tr>
        <? $i = 0; ?>
        <? foreach ($finished_tasks as $task): ?>
        <tr class="<?php 
echo $i % 2 == 0 ? "g-odd" : "g-even";
?>
 <?php 
echo $task->state == "success" ? "g-success" : "g-error";
?>
">
          <td class="<?php 
echo $task->state == "success" ? "g-success" : "g-error";
?>
">
            <?php 
echo gallery::date_time($task->updated);
?>
          </td>
          <td>
            <?php 
echo $task->name;
?>
          </td>
          <td>
            <? if ($task->state == "success"): ?>
            <?php 
echo t("Success");
?>
            <? elseif ($task->state == "error"): ?>
            <?php 
echo t("Failed");
<?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>
<ul>
  <?php 
foreach ($comments as $comment) {
    ?>
  <div class="allcomments-comment">
   <li id="g-comment-<?php 
    echo $comment->id;
    ?>
">
    <p class="allcomments-author">
     <a href="<?php 
    echo $comment->item()->url();
    ?>
">
       <?php 
    echo t("on %date", array("date" => gallery::date_time($comment->created), "title" => $comment->item()->title));
    ?>
</a><br />
     <a href="<?php 
    echo $comment->item()->url();
    ?>
">
       <?php 
    echo $comment->item()->thumb_img(array(), 128);
    ?>
</a>
     <a href="<?php 
    echo $comment->author_url();
    ?>
">
     <?php 
        ?>
            </td>
            <td><?php 
        echo register::format_registration_state($user->state);
        ?>
</td>
            <td><?php 
        echo t($user->name);
        ?>
</td>
            <td><?php 
        echo t($user->full_name);
        ?>
</td>
            <td><?php 
        echo t(gallery::date_time($user->request_date));
        ?>
</td>
            <td><?php 
        echo t($user->email);
        ?>
</td>
          </tr>
          <?php 
    }
    ?>
        </table>
      </li>
       <li>
        <?php 
    echo form::submit(array("id" => "g-registration-activate", "name" => "activate_users", "class" => "submit", "style" => "clear:both!important"), t("Activate"));
Ejemplo n.º 7
0
defined("SYSPATH") or die("No direct script access.");
?>
<li id="g-comment-<?php 
echo $comment->id;
?>
">
  <p class="g-author">
    <a href="#">
      <img src="<?php 
echo $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true));
?>
"
           class="g-avatar"
           alt="<?php 
echo html::clean_attribute($comment->author_name());
?>
"
           width="40"
           height="40" />
    </a>
    <?php 
echo t("on %date_time,  <a href=\"#\">%name</a> said", array("date_time" => gallery::date_time($comment->created), "name" => html::clean($comment->author_name())));
?>
  </p>
  <div>
  <?php 
echo nl2br(html::purify($comment->text));
?>
  </div>
</li>
Ejemplo n.º 8
0
?>
<ul>
  <?php 
foreach ($entries as $entry) {
    ?>
  <li class="<?php 
    echo log::severity_class($entry->severity);
    ?>
" style="direction: ltr">
    <a href="<?php 
    echo url::site("user/{$entry->user_id}");
    ?>
"><?php 
    echo html::clean($entry->user->name);
    ?>
</a>
    <?php 
    echo gallery::date_time($entry->timestamp);
    ?>
    <?php 
    echo $entry->message;
    ?>
    <?php 
    echo $entry->html;
    ?>
  </li>
  <?php 
}
?>
</ul>
    ?>
  <li id="g-comment-<?php 
    echo $comment->id;
    ?>
">
    <p class="g-author">
      <a href="<?php 
    echo $comment->item()->url();
    ?>
">
        <?php 
    echo $comment->item()->thumb_img(array(), 70);
    ?>
      </a>
      <?php 
    echo t("<i><strong>on</strong> %date <strong>for</strong> %title</i> ", array("date" => gallery::date_time($comment->created), "title" => $comment->item()->title));
    ?>
    </p>
    <hr />
    <div>
      <?php 
    echo nl2br(html::purify($comment->text));
    ?>
    </div>
  </li>
  <?php 
}
?>
</ul>
</div>
Ejemplo n.º 10
0
defined("SYSPATH") or die("No direct script access.");
?>
<li id="gComment-<?php 
echo $comment->id;
?>
">
  <p class="gAuthor">
    <a href="#">
      <img src="<?php 
echo $comment->author()->avatar_url(40, $theme->theme_url("images/avatar.jpg", true));
?>
"
           class="gAvatar"
           alt="<?php 
echo p::clean($comment->author_name());
?>
"
           width="40"
           height="40" />
    </a>
    <?php 
echo t("on %date_time, %author_name said", array("date_time" => gallery::date_time($comment->created), "author_name" => p::clean($comment->author_name())));
?>
  </p>
  <div>
  <?php 
echo nl2br(p::purify($comment->text));
?>
  </div>
</li>
Ejemplo n.º 11
0
    ?>
  <?php 
    echo t("Automatic upgrade checking is enabled.");
    ?>
  <?php 
} else {
    ?>
  <?php 
    echo t("Automatic upgrade checking is disabled.");
    ?>
  <?php 
}
?>
  <?php 
if (!$version_info) {
    ?>
  <?php 
    echo t("No upgrade checks have been made yet.");
    ?>
  <?php 
} else {
    ?>
  <?php 
    echo t("The last upgrade check was made on %date.", array("date" => gallery::date_time($version_info->timestamp)));
    ?>
  <?php 
}
?>
</p>

Ejemplo n.º 12
0
?>
"
           width="40"
           height="40" />
    </a>
    <?php 
if ($comment->author()->guest) {
    ?>
    <?php 
    echo t("on %date_time, %name said", array("date_time" => gallery::date_time($comment->created), "name" => html::clean($comment->author_name())));
    ?>
    <?php 
} else {
    ?>
    <?php 
    echo t("on %date_time,  <a href=\"%url\">%name</a> said", array("date_time" => gallery::date_time($comment->created), "url" => user_profile::url($comment->author_id), "name" => html::clean($comment->author_name())));
    ?>
    <?php 
}
?>
  </p>
  <div>
  <?php 
echo nl2br(html::purify($comment->text));
?>
  </div>
  <?php 
if ($comment->state == "unpublished") {
    ?>
  <b> <?php 
    echo t("Your comment is held for moderation. The site moderator will review and publish it.");
	<td>
		<a href="<?php 
        echo url::site("admin/user_info/lookupip?ip={$myData->ip_address}");
        ?>
" target="_blank"><?php 
        echo html::clean($myData->ip_address);
        ?>
 </a>	
	</td>

	<td>
		<?php 
        if ($use_default_gallery_date_format == "Yes") {
            ?>
			<?php 
            echo gallery::date_time($myData->time_stamp);
            ?>
		<?php 
        } else {
            echo date($date_format, $myData->time_stamp);
        }
        ?>
	</td>

	<td>
		<?php 
        switch ($myData->action) {
            case "Failed Login":
                echo "<font color={$color_failed_login}>";
                echo $myData->action;
                echo "</font>";
Ejemplo n.º 14
0
 static function get($block_id, $theme)
 {
     $block = "";
     switch ($block_id) {
         case "rwinfo":
             if ($theme->item()) {
                 // rWatcher Edit: Don't display on root album.
                 if ($theme->item->id == 1) {
                     return "";
                 }
                 // End rWatcher Edit
                 $block = new Block();
                 $block->css_id = "g-metadata";
                 $block->title = $theme->item()->is_album() ? t("Album info") : ($theme->item()->is_movie() ? t("Movie info") : t("Photo info"));
                 // rWatcher Edit:  File Name change.
                 $block->content = new View("rwinfo_block.html");
                 if ($theme->item->title && module::get_var("rwinfo", "show_title")) {
                     //rWatcher Edit:  rwinfo
                     $info["title"] = array("label" => t("Title:"), "value" => html::purify($theme->item->title));
                 }
                 if ($theme->item->description && module::get_var("rwinfo", "show_description")) {
                     //rWatcher Edit:  rwinfo
                     $info["description"] = array("label" => t("Description:"), "value" => nl2br(html::purify($theme->item->description)));
                 }
                 if (!$theme->item->is_album() && module::get_var("rwinfo", "show_name")) {
                     //rWatcher Edit:  rwinfo
                     $info["file_name"] = array("label" => t("File name:"), "value" => html::clean($theme->item->name));
                 }
                 // rWatcher Edit:  Display file size
                 if (!$theme->item->is_album()) {
                     // Calculate file size.
                     $filesize_unit = array("B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB");
                     $item_filesize = filesize($theme->item->file_path());
                     $unit_counter = 0;
                     while ($item_filesize >= 1024) {
                         $item_filesize = $item_filesize / 1024;
                         $unit_counter++;
                     }
                     $item_filesize = number_format($item_filesize, 2) . " " . $filesize_unit[$unit_counter];
                     $info["file_size"] = array("label" => t("File size:"), "value" => $item_filesize);
                 }
                 // End rWatcher Edit
                 // rWatcher Edit:  Remove Show Captured for everything -- Show created DATE for album, captured DATE/TIME for everything else.
                 //if ($theme->item->captured && module::get_var("info", "show_captured")) {
                 //  $info["captured"] = array(
                 //    "label" => t("Captured:"),
                 //    "value" => gallery::date_time($theme->item->captured)
                 //  );
                 //}
                 if ($theme->item->is_album() && $theme->item->created && module::get_var("rwinfo", "show_captured")) {
                     $info["captured"] = array("label" => t("Date:"), "value" => gallery::date($theme->item->created));
                 }
                 if (!$theme->item->is_album() && $theme->item->created && module::get_var("rwinfo", "show_captured")) {
                     $info["captured"] = array("label" => t("Date:"), "value" => gallery::date_time($theme->item->captured));
                 }
                 // End rWatcher Edit
                 if ($theme->item->owner && module::get_var("info", "show_owner")) {
                     $display_name = $theme->item->owner->display_name();
                     // rWatcher Edit:  Display profile instead of web site, if viewable.
                     $str_owner_url = $theme->item->owner->url;
                     if (rwinfo_block_Core::_can_view_profile_pages(identity::lookup_user($theme->item->owner->id))) {
                         $str_owner_url = user_profile::url($theme->item->owner->id);
                     }
                     // rWatcher End Edit
                     if ($str_owner_url) {
                         //rW Edit $str_owner_url.
                         $info["owner"] = array("label" => t("Owner:"), "value" => html::anchor(html::clean($str_owner_url), html::clean($display_name)));
                     } else {
                         $info["owner"] = array("label" => t("Owner:"), "value" => html::clean($display_name));
                     }
                 }
                 if ($theme->item->width && $theme->item->height && module::get_var("info", "show_dimensions")) {
                     $info["size"] = array("label" => t("Dimensions:"), "value" => t("%width x %height px", array("width" => $theme->item->width, "height" => $theme->item->height)));
                 }
                 $block->content->metadata = $info;
                 module::event("info_block_get_metadata", $block, $theme->item);
             }
             break;
     }
     return $block;
 }
        <th>Bestelstatus</th>
        <th>Gebeurtenis</th>
        <th>Datum/tijd</th>
      </tr>     
    <?php 
foreach ($order_logs as $i => $order_log) {
    ?>
      <tr>
        <td><?php 
    echo basket::getOrderPrefix() . $order_log->id;
    ?>
</td>
        <td><?php 
    echo $order_log->status();
    ?>
</td>
        <td><?php 
    echo $order_log->event();
    ?>
</td>
        <td><?php 
    echo gallery::date_time($order_log->timestamp);
    ?>
</td>
      </tr>     
    <?php 
}
?>
  </table>
</div>
Ejemplo n.º 16
0
">
          <?php 
echo p::clean($parent->title);
?>
        </a>
      </td>
    </tr>
    <? endif ?>
    <? if ($item->captured): ?>
    <tr>
      <th><?php 
echo t("Captured:");
?>
</th>
      <td><?php 
echo gallery::date_time($item->captured);
?>
</td>
    </tr>
    <? endif ?>
    <? if ($item->owner): ?>
    <tr>
      <th><?php 
echo t("Owner:");
?>
</th>
      <td><a href="#"><?php 
echo p::clean($item->owner->name);
?>
</a></td>
    </tr>