* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Goteo. If not, see <http://www.gnu.org/licenses/agpl.txt>. * */ use Goteo\Library\Text; $bodyClass = 'admin'; // paginacion require_once 'library/pagination/pagination.php'; // no cache para textos define('GOTEO_ADMIN_NOCACHE', true); $filter = $this['filter']; $data = Text::getAll($this['filters'], $_SESSION['translator_lang']); $pagedResults = new \Paginated($data, 20, isset($_GET['page']) ? $_GET['page'] : 1); // valores de filtro $idfilters = Text::filters(); $groups = Text::groups(); // metemos el todos \array_unshift($idfilters, 'Todos los textos'); \array_unshift($groups, 'Todas las agrupaciones'); $filters = array('idfilter' => array('label' => 'Filtrar por tipo:', 'type' => 'select', 'options' => $idfilters, 'value' => $this['filters']['idfilter']), 'group' => array('label' => 'Filtrar por agrupación:', 'type' => 'select', 'options' => $groups, 'value' => $this['filters']['group']), 'text' => array('label' => 'Buscar texto:', 'type' => 'input', 'options' => null, 'value' => $this['filters']['text'])); ?> <!-- Filtro --> <?php if (!empty($filters)) { ?> <div class="widget board"> <form id="filter-form" action="/translate/texts/list/<?php echo $filter;
$action = 'post'; $this['show'] = 'post'; } } if ($this['show'] == 'list') { // paginacion require_once 'library/pagination/pagination.php'; //recolocamos los post para la paginacion $the_posts = array(); foreach ($posts as $i=>$p) { $the_posts[] = $p; } $pagedResults = new \Paginated($the_posts, 7, isset($_GET['page']) ? $_GET['page'] : 1); } // segun lo que tengamos que mostrar : lista o entrada // uso la libreria blog para sacar los datos adecuados para esta vista $level = (int) $this['level'] ?: 3; ?> <div class="project-updates"> <!-- una entrada --> <?php if ($action == 'post') : ?> <div class="post widget"> <?php echo new View('view/blog/post.html.php', array('post' => $post->id, 'show' => 'post', 'url' => '/project/'.$project->id.'/updates/')); ?> </div> <?php echo new View('view/blog/comments.html.php', array('post' => $post->id, 'owner' => $project->owner)); ?>
$reached = \amount_format($project->invested); $supporters = count($project->investors); $worthcracy = Worth::getAll(); $investors = array(); foreach ($project->investors as $user=>$investor) { $investors[] = $investor; } // en la p�gina de cofinanciadores, paginaci�n de 20 en 20 require_once 'library/pagination/pagination.php'; $pagedResults = new \Paginated($investors, 20, isset($_GET['page']) ? $_GET['page'] : 1); ?> <div class="widget project-supporters"> <h<?php echo $level ?> class="title"><?php echo Text::get('project-menu-supporters'); ?></h<?php echo $level ?>> <dl class="summary"> <dt class="supporters"><?php echo Text::get('project-menu-supporters'); ?></dt> <dd class="supporters"><?php echo $supporters ?>人</dd> <dt class="reached"><?php echo Text::get('project-invest-total'); ?></dt> <dd class="reached"><?php echo $reached ?> <span>円</span></dd> </dl>
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Goteo. If not, see <http://www.gnu.org/licenses/agpl.txt>. * */ use Goteo\Library\Text; // paginacion require_once 'library/pagination/pagination.php'; $filters = $this['filters']; $the_filters = ''; foreach ($filters as $key => $value) { $the_filters .= "&{$key}={$value}"; } $pagedResults = new \Paginated($this['projects'], 10, isset($_GET['page']) ? $_GET['page'] : 1); ?> <a href="/admin/translates" class="button">Asignar traductores</a> <div class="widget board"> <form id="filter-form" action="/admin/projects" method="get"> <input type="hidden" name="filtered" value="yes" /> <table> <tr> <td> <label for="name-filter">Alias/Email del autor:</label><br /> <input type="text" id ="name-filter" name="name" value ="<?php echo $filters['name']; ?> " /> </td>
<?php require 'common.php'; $personagens = Personagem::listar(ID_JOGADOR); $pagedResults = new Paginated($personagens, 12, $_GET['pg']); require 'header.php'; ?> <div class="row"> <div class="six columns"> <h3><?php echo _("Characters"); ?> </h3> </div> <div class="six columns"> <div class="button dropdown right"> <?php echo _("Actions"); ?> <ul> <li><a href="<?php echo WEB_PATH; ?> /<?php echo LANG; ?> /character/new"><?php echo _("New Character"); ?> </a></li> <li><a href="<?php
} </style> <!-- End style formatting --> </head> <body> <?php //create an array of names in alphabetic order. A database call could have retrieved these items //$names = array("Andrew", "Bernard", "Castello", "Dennis", "Ernie", "Frank", "Greg", "Henry", "Isac", "Jax", "Kester", "Leonard", "Matthew", "Nigel", "Oscar"); $handle = fopen('manual', 'r'); $contents = fread($handle, filesize('manual')); fclose($handle); $result = explode('-^-^-', $contents); $page = isset($_GET['page']) ? $_GET['page'] : 1; //constructor takes three parameters //1. array to be paged //2. number of results per page (optional parameter. Default is 10) //3. the current page (optional parameter. Default is 1) $pagedResults = new Paginated($result, 1, $page); while ($row = $pagedResults->fetchPagedRow()) { //when $row is false loop terminates echo "{$row}"; } echo "<br />"; //important to set the strategy to be used before a call to fetchPagedNavigation $pagedResults->setLayout(new DoubleBarLayout()); echo $pagedResults->fetchPagedNavigation(); ?> </body> </html>
$i++; } ?> </div> <div class="row"> <div class="twelve columns"><hr /></div> </div> <?php } ?> <?php if (count($personagens) > 0) { $i = 1; $pagedResults = new Paginated($personagens, 12, $_GET['pg']); ?> <div class="row"> <div class="twelve columns"> <h3><?php echo _('Characters'); ?> </h3> </div> </div> <div class="row"> <div class="twelve columns"> <?php echo $pagedResults->fetchPagedNavigation('&p=' . urlencode($_GET['p'])); ?>