Example #1
0
         $view->assign('ing', $ing_list);
         $cache->save($ing_list, 'ing');
     } else {
         $view->assign(array('ing' => $ing_list, 'ingColor' => rand_color(true)));
     }
     if (!($index = $content->load('index'))) {
         $show = new Show();
         $show->count_of_result = DISPLAY_OF_PAGE;
         if (ROOT) {
             $index = $show->getByTags('ALL', true);
         } else {
             $index = $show->getByTags('ALL');
         }
         for ($i = 0; $i < count($index); $i++) {
             $id = $index[$i][id];
             $reply = $show->getTopReply($id);
             $index[$i][content] = format_ubb($index[$i][content]);
             $index[$i][reply_content] = $reply[content];
             print_r($reply[content]);
         }
         $view->assign('index', $index);
         $content->save($index, 'index');
     } else {
         $view->assign('index', $index);
     }
     $view->display('index.tpl');
     break;
 case 'view':
     $id = intval(trim($_GET['id']));
     if (!($logs_list = $content->load('logs_list'))) {
         $show = new Show();
Example #2
0
/** 
 *
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * @author always.8 <*****@*****.**>
 * @version $Id: test.php 0 2007-09-22 01:11:52Z always.8 $
 * @copyright http://www.n7money.cn/
 * @package 
 */
require_once 'Show.class.php';
require_once '../config.php';
$show = new Show($db);
$tmp = $show->getTopReply(73);
print_r($tmp);
?>