Пример #1
0
                Response::done($response);
            } else {
                CoreUtils::notFound();
            }
        }
    }
}
// Tag list
if (preg_match(new RegExp('^tags'), $data)) {
    $Pagination = new Pagination("cg/tags", 20, $CGDb->count('tags'));
    CoreUtils::fixPath("/cg/tags/{$Pagination->page}");
    $heading = "Tags";
    $title = "Page {$Pagination->page} - {$heading} - {$Color} Guide";
    $Tags = Tags::getFor(null, $Pagination->getLimit(), true);
    if (isset($_GET['js'])) {
        $Pagination->respond(Tags::getTagListHTML($Tags, NOWRAP), '#tags tbody');
    }
    $js = array('paginate');
    if (Permission::sufficient('staff')) {
        $js[] = "{$do}-tags";
    }
    CoreUtils::loadPage(array('title' => $title, 'heading' => $heading, 'view' => "{$do}-tags", 'css' => "{$do}-tags", 'js' => $js));
}
// Change list
if (preg_match(new RegExp('^changes'), $data)) {
    $Pagination = new Pagination("cg/changes", 50, $Database->count('log__color_modify'));
    CoreUtils::fixPath("/cg/changes/{$Pagination->page}");
    $heading = "Major {$Color} Changes";
    $title = "Page {$Pagination->page} - {$heading} - {$Color} Guide";
    $Changes = Updates::get(null, $Pagination->getLimitString());
    if (isset($_GET['js'])) {
Пример #2
0
		<thead><?php 
$cspan = Permission::sufficient('staff') ? '" colspan="2' : '';
$refresher = Permission::sufficient('staff') ? " <button class='typcn typcn-arrow-sync refresh-all' title='Refresh usage data on this page'></button>" : '';
echo $thead = <<<HTML
\t\t\t<tr>
\t\t\t\t<th class="tid">ID</th>
\t\t\t\t<th class="name{$cspan}">Name</th>
\t\t\t\t<th class="title">Description</th>
\t\t\t\t<th class="type">Type</th>
\t\t\t\t<th class="uses">Uses{$refresher}</th>
\t\t\t</tr>
HTML;
?>
</thead>
		<?php 
echo Tags::getTagListHTML($Tags);
?>
		<tfoot><?php 
echo $thead;
?>
</tfoot>
	</table>
	<?php 
echo $Pagination->HTML;
?>
</div>

<?  echo CoreUtils::exportVars(array(
		'Color' => $Color,
		'color' => $color,
		'TAG_TYPES_ASSOC' => Tags::$TAG_TYPES_ASSOC,