예제 #1
0
 public function index()
 {
     $input = Input::instance();
     $reply = GalleryRemoteReply::factory(gallery_remote::GR_STAT_SUCCESS);
     if ($this->_check_protocol($input, $reply)) {
         $reply->set('debug_gallery_version', gallery::version_string());
         $reply->set('debug_user', identity::active_user()->name);
         $reply->set('debug_user_type', 'Gallery_User');
         $reply->set('debug_user_already_logged_in', identity::active_user()->id != identity::guest()->id ? '1' : '');
         $reply->set('server_version', '2.15');
         $cmd = trim($input->post('cmd'));
         if ($cmd == 'login') {
             $this->_login($input, $reply);
         } else {
             if (self::isloggedin()) {
                 switch ($cmd) {
                     case 'no-op':
                         $reply->set('status_text', 'Noop command successful.');
                         $reply->send();
                         break;
                     case 'fetch-albums':
                     case 'fetch-albums-prune':
                         $this->_fetch_albums_prune($input, $reply);
                         break;
                     case 'new-album':
                         $this->_new_album($input, $reply);
                         break;
                     case 'album-properties':
                         $this->_album_properties($input, $reply);
                         break;
                     case 'add-item':
                         $this->_add_item($input, $reply);
                         break;
                     case 'move-album':
                         $this->_move_album($input, $reply);
                         break;
                     case 'increment-view-count':
                         $this->_increment_view_count($input, $reply);
                         break;
                     case 'image-properties':
                         $this->_image_properties($input, $reply);
                         break;
                     case 'fetch-album-images':
                         $this->_fetch_album_images($input, $reply);
                         break;
                     default:
                         $reply->send(gallery_remote::UNKNOWN_CMD);
                 }
             } else {
                 $reply->send(gallery_remote::LOGIN_MISSING);
             }
         }
     }
 }
예제 #2
0
 static function credits()
 {
     $version_string = SafeString::of_safe_html('<bdo dir="ltr">Gallery ' . gallery::version_string() . '</bdo>');
     return "<li class=\"g-first\">" . t(module::get_var("gallery", "credits"), array("url" => "http://gallery.menalto.com", "gallery_version" => $version_string)) . "</li>";
 }
예제 #3
0
<?php

defined("SYSPATH") or die("No direct script access.");
?>
<ul>
  <li>
    <?php 
echo t("Version: %version", array("version" => gallery::version_string()));
?>
  </li>
  <li>
    <?php 
echo t("Albums: %count", array("count" => $album_count));
?>
  </li>
  <li>
    <?php 
echo t("Photos: %count", array("count" => $photo_count));
?>
  </li>
</ul>