Ejemplo n.º 1
0
$allCataObj = $cataObj->selectAll();
print_r($allCataObj);
echo '<br>====================<br>';
//njx_comments test
$commentObj = new Cores\Models\CommentsModel();
$allCommentObj = $commentObj->selectAll();
print_r($allCommentObj);
echo '<br>====================<br>';
//njx_users test
$usersObj = new Cores\Models\UsersModel();
$allUserObj = $usersObj->selectAll();
print_r($allUserObj);
echo '<br>====================<br>';
//njx_items test
$itemsObj = new Cores\Models\ItemsModel();
$allItemObj = $itemsObj->selectAll();
print_r($allItemObj);
echo '<br>====================<br>';
//njx_remarks test
$remarksObj = new Cores\Models\RemarksModel();
$remarksObj = $remarksObj->selectAll();
print_r($remarksObj);
echo '<br>====================<br>';
//njx_fields test
$fieldsObj = new Cores\Models\FieldsModel();
$allFieldsObj = $fieldsObj->selectAll();
print_r($allFieldsObj);
echo '<br>====================<br>';
//njx_fields_options test
$fieldsOptionsObj = new Cores\Models\FieldsOptionsModel();
$AllFieldsOptionsObj = $fieldsOptionsObj->selectAll();
Ejemplo n.º 2
0
Archivo: item.php Proyecto: shiyake/PHP
<?php

$page = 1;
if (!empty($_GET['[page'])) {
    $page = $_GET['page'];
}
$itemsObj = new Cores\Models\ItemsModel();
$pageCount = count($itemsObj->selectAll());
$allPages = ceil($pageCount / 20);
$prevPage = $page - 1;
if ($prevPage <= 0) {
    $prevPage = 1;
}
$nextPage = $page + 1;
if ($nextPage > $allPages) {
    $nextPage = $allPages;
}
$prompt = '';
if (!empty($_GET['action']) && !empty($_GET['iid'])) {
    $iid = $_GET['iid'];
    $itemsObj = new Cores\Models\ItemsModel();
    switch ($_GET['action']) {
        case 'reject_item':
            $result = $itemsObj->reject($iid);
            $prompt = success('拒绝成功');
            break;
        case 'approve_item':
            $result = $itemsObj->approve($iid);
            $prompt = success('通过成功');
            break;
        case 'view_comments':