?>
"><?php 
            echo __('Delete');
            ?>
</a> ]
            <?php 
        }
        ?>
        </small>
    </td>
</tr>
<tr>
    <td class="row2" style="height: 60px;" valign="top" colspan="2">
        <?php 
        echo rcms_parse_text($post['text'], true, false, true, true, true);
        ?>
    </td>
</tr>
<?php 
        $total--;
    }
    $c++;
}
?>
</table>
<div align="left">
    <?php 
echo rcms_pagination(sizeof($tpldata['posts']), $system->config['perpage'], $page + 1, '?module=forum.archive&amp;action=topic&amp;id=' . $tpldata['topic']['id']);
?>
</div>
            echo $topic_id;
            ?>
&amp;pid=<?php 
            echo $topic['last_reply_id'] + 2;
            ?>
#<?php 
            echo $topic['last_reply_id'] + 2;
            ?>
">&gt;&gt;</a>
        <?php 
        } else {
            ?>
            <?php 
            echo __('No replies');
            ?>
        <?php 
        }
        ?>
    </td>
</tr>
<?php 
        $total--;
    }
    $c++;
}
?>
</table>
<div align="left"><?php 
echo rcms_pagination(sizeof($tpldata), $system->config['perpage'] * 3, $page + 1, '?module=forum');
?>
</div>
Exemple #3
0
                    $page = 0;
                }
                $start = $page * $system->config['perpage'];
                $total = $system->config['perpage'];
            } else {
                $pages = 1;
                $page = 0;
                $start = 0;
                $total = sizeof($data);
            }
            if ($total + $start > sizeof($data)) {
                $finish = sizeof($data);
            } else {
                $finish = $total + $start;
            }
            $result .= '<div align="right">' . rcms_pagination(sizeof($data), $system->config['perpage'], $page + 1, '?module=' . $module . '&amp;id=' . ($cid + 1)) . '</div>';
            for ($fid = $start; $fid < $finish; $fid++) {
                $fdata = $data[$fid];
                $fdata['down_url'] = '?module=' . $module . '&amp;id=' . ($cid + 1) . '&amp;fid=' . ($fdata['id'] + 1) . '&amp;get=1';
                if (!empty($fdata)) {
                    $result .= rcms_parse_module_template('fdb-file.tpl', $fdata);
                }
            }
        }
        show_window('<a href="?module=' . $module . '">' . __('Categories of files') . '</a> &rarr; ' . $filesdb->data[$cid]['name'], $result, 'center');
    }
} else {
    $system->config['pagename'] = __('Categories of files');
    if (!empty($filesdb->data)) {
        $result = '';
        foreach ($filesdb->data as $cid => $cdata) {
            if (!empty($system->config['perpage'])) {
                $pages = ceil(count($contents) / $system->config['perpage']);
                if (!empty($_GET['page']) && (int) $_GET['page'] > 0) {
                    $page = (int) $_GET['page'] - 1;
                } else {
                    $page = 0;
                }
                $start = $page * $system->config['perpage'];
                $total = $system->config['perpage'];
            } else {
                $pages = 1;
                $page = 0;
                $start = 0;
                $total = count($contents);
            }
            $result .= '<div align="right">' . rcms_pagination(count($contents), $system->config['perpage'], $page + 1, '?module=' . $module . '&id=' . $_GET['id'] . $work_dir_suffix) . '</div>';
            for ($c = $start; $c < $total + $start; $c++) {
                $article =& $contents[$c];
                if (!empty($article)) {
                    $result .= rcms_parse_module_template('article.tpl', $article + array('showdesc' => true, 'showtitle' => true, 'linktext' => ($article['text_nonempty'] ? $lang['articles']['readart'] : $lang['articles']['comments']) . ' (' . $article['comcnt'] . '/' . $article['views'] . ')', 'linkurl' => '?module=' . $module . '&catid=' . $article['catid'] . '&id=' . $article['id'] . $work_dir_suffix, 'cat_data' => $cat_data));
                }
            }
        }
        $system->showModuleWindow('<a href="./index.php?module=' . $module . $work_dir_suffix . '">' . $lang['articles']['categories'] . '</a> -&gt; ' . (strlen($cat_data['title']) > 30 ? substr($cat_data['title'], 0, 30) . '...' : $cat_data['title']), $result, 'center');
    } else {
        $system->showModuleWindow('', $lang['results']['articles'][12], 'center');
    }
} else {
    /*********************************************************************************
    * List of categories                                                             *
    *********************************************************************************/
Exemple #5
0
        $pages = ceil(sizeof($files) / $perpage);
        if (!empty($_GET['page']) && (int) $_GET['page'] > 0) {
            $page = (int) $_GET['page'] - 1;
        } else {
            $page = 0;
        }
        $start = $page * $perpage;
        $total = $perpage;
    } else {
        $pages = 1;
        $page = 0;
        $start = 0;
        $total = sizeof($files);
    }
    $keys = @array_keys($files);
    $pagination = rcms_pagination(sizeof($files), $perpage, $page + 1, '?' . $_SERVER['QUERY_STRING']);
    //Output
    if (!empty($pagination)) {
        $frm->addrow($pagination);
    }
    $c = $start;
    while ($total > 0 && $c < sizeof($keys)) {
        $filename =& $files[$keys[$c]];
        $data = $gallery->getData($filename);
        $frm->addrow($filename . ' aka ' . $frm->text_box('title[' . $filename . ']', $data['title']) . '<br/>' . __('Keywords') . ': ' . $frm->text_box('keywords[' . $filename . ']', @$data['keywords']) . '<br/>' . $data['type'] . '(' . $data['size'] . ')<br/>' . $frm->checkbox('delete[' . $filename . ']', 'true', __('Delete')), $gallery->getThumbnail($filename), 'top');
        $total--;
        $c++;
    }
    $frm->addmessage(__('To divide keywords use ; symbol'));
} else {
    $frm->addmessage(__('Nothing founded'));
        ?>
</a></td>
    <td class="row<?php 
        echo $i;
        ?>
"><?php 
        echo @$user['nickname'];
        ?>
</td>
    <td class="row<?php 
        echo $i;
        ?>
"><?php 
        echo !@$user['hideemail'] ? @$user['email'] : $lang['users']['emailhidden'];
        ?>
</td>
</tr>
<?php 
        $i++;
        if ($i > 3) {
            $i = 1;
        }
    }
}
?>
</table>
<div align="left"><?php 
echo rcms_pagination(count($tpldata), $system->config['perpage'], $page + 1, '?module=user.list');
?>
</div>
Exemple #7
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
global $system;
$page = (!empty($_GET['page']) ? (int) $_GET['page'] : 1) - 1;
$pages = get_pages_number(RCMS_GB_DEFAULT_FILE);
$pagination = rcms_pagination($pages * $system->config['perpage'], $system->config['perpage'], $page + 1, '?module=' . $module);
if (!empty($_POST['comtext'])) {
    if (isset($system->config['guestbook-guest']) and !LOGGED_IN) {
        show_window(__('Error'), __('You are not logined!'));
    } else {
        if (isset($_POST['antispam']) and isset($_POST['captcheckout'])) {
            $defcatp = substr(md5($_POST['antispam']), 0, 5);
            $intcapt = $_POST['captcheckout'];
            if ($defcatp == $intcapt) {
                post_message($system->user['username'], $system->user['nickname'], $_POST['comtext'], RCMS_GB_DEFAULT_FILE, 'guestbook.ini');
                rcms_redirect('');
            } else {
                show_window(__('Error'), __('Invalid form data'));
            }
        } else {
            post_message($system->user['username'], $system->user['nickname'], $_POST['comtext'], RCMS_GB_DEFAULT_FILE, 'guestbook.ini');
            rcms_redirect('');
        }
    }
}
if (isset($_POST['gbd']) && $system->checkForRight('GUESTBOOK')) {
Exemple #8
0
 }
 unset($contents);
 if (!empty($arr_art)) {
     krsort($arr_art);
     if (!empty($system->config['perpage'])) {
         if (!empty($_GET['page']) && (int) $_GET['page'] > 0) {
             $page = (int) $_GET['page'] - 1;
         } else {
             $page = 0;
         }
         $start = $page * $system->config['perpage'];
     } else {
         $page = 0;
         $start = 0;
     }
     $result .= '<div align="right">' . rcms_pagination(sizeof($arr_art), $system->config['perpage'], $page + 1, '?module=' . $module . '&amp;c=' . str_replace('#', '%23', $c) . '&amp;b=' . $b) . '</div>';
     $contents = array_slice($arr_art, $start, $system->config['perpage']);
     foreach ($contents as $time => $article) {
         if (!empty($article)) {
             if ($c !== '#root') {
                 $result .= rcms_parse_module_template('art-article.tpl', $article + array('showtitle' => true, 'linktext' => $articles->linktextArticle($article['text_nonempty'], $article['comcnt'], $article['views']), 'linkurl' => '?module=' . $module . '&amp;c=' . str_replace('#', '%23', $c) . '&amp;b=' . $b . '&amp;a=' . $article['id'], 'cat_data' => $category));
             } else {
                 $result .= rcms_parse_module_template('art-article.tpl', $article + array('showtitle' => true, 'linktext' => $articles->linktextArticle($article['text_nonempty'], $article['comcnt'], $article['views']), 'linkurl' => '?module=' . $module . '&amp;c=' . str_replace('#', '%23', $c) . '&amp;a=' . $article['id']));
             }
         }
     }
 }
 if ($c !== '#root') {
     $title = '<a class="winheader" href="?module=' . $module . '">' . __('Sections') . '</a> &rarr; ' . '<a class="winheader" href="?module=' . $module . '&amp;c=' . str_replace('#', '%23', $c) . '">' . $containers[$c] . '</a> &rarr; ' . (mb_strlen($category['title']) > $articles->config['category'] ? mb_substr($category['title'], 0, $articles->config['category']) . '...' : $category['title']);
 } else {
     $title = '<a class="winheader" href="?module=' . $module . '">' . __('Sections') . '</a> &rarr; ' . $containers[$c];
Exemple #9
0
                    $pages = 1;
                    $page = 0;
                    $start = 0;
                    $total = sizeof($list);
                }
                $keys = array_keys($list);
                for ($a = $start; $a < $end; $a++) {
                    $time =& $list[$keys[$a]];
                    $id = explode('.', $keys[$a]);
                    if (($category = $articles->getCategory($id[0], true)) !== false && ($article = $articles->getArticle($id[0], $id[1], true, true, false, false)) !== false) {
                        $result .= rcms_parse_module_template('art-article.tpl', $article + array('showtitle' => true, 'linktext' => $articles->linktextArticle($article['text_nonempty'], $article['comcnt'], $article['views']), 'iconurl' => '?module=articles&amp;c=' . $news_container . '&amp;b=' . $id[0], 'linkurl' => '?module=articles&amp;c=' . $news_container . '&amp;b=' . $id[0] . '&amp;a=' . $article['id'], 'cat_data' => $category));
                    }
                }
                $title = isset($category['title']) ? $category['title'] : __(file_get_contents(ARTICLES_PATH . $news_container . '/title'));
                if (!empty($list)) {
                    $result .= '<div align="right">' . rcms_pagination(sizeof($list), $system->config['perpage'], $page + 1, '?module=' . $module) . '</div>';
                } else {
                    $result = __('Nothing founded');
                }
            }
            show_window($title, $result);
        }
        $system->config['pagename'] = __('Latest news');
    }
} elseif ($system->config['index_module'] != 'empty' && !empty($system->modules['main'][$module])) {
    $my_module = $module;
    $module = $system->config['index_module'];
    include_once MODULES_PATH . $module . '/index.php';
    $module = $my_module;
}
if (!empty($menu_points['index-menus'])) {
Exemple #10
0
    }
    if (!empty($system->config['perpage'])) {
        $pages = ceil(sizeof($images) / $system->config['perpage']);
        if (!empty($_GET['page']) && (int) $_GET['page'] > 0) {
            $page = (int) $_GET['page'] - 1;
        } else {
            $page = 0;
        }
        $start = $page * $system->config['perpage'];
        $total = $system->config['perpage'];
    } else {
        $pages = 1;
        $page = 0;
        $start = 0;
        $total = sizeof($images);
    }
    $keys = @array_keys($images);
    $data['pagination'] = rcms_pagination(sizeof($images), $system->config['perpage'], $page + 1, '?' . $_SERVER['QUERY_STRING']);
    $c = $start;
    $data['images'] = array();
    while ($total > 0 && $c < sizeof($keys)) {
        $image =& $images[$keys[$c]];
        if ($image_data = $gallery->getData($image)) {
            $data['images'][$image] = $image_data + array('thumbnail' => $gallery->getThumbnail($image), 'comments' => $gallery->countComments($image));
        }
        $total--;
        $c++;
    }
    $data['linkdata'] = $linkdata;
    show_window('<a href="?module=gallery">' . __('Gallery') . '</a>' . (cfr('GALLERY') ? '&nbsp;' . edit_button(ADMIN_FILE . '?show=module&id=gallery.upload&tab=5') : '') . (get('keyword') ? ' &rarr; ' . get('keyword') : ''), !empty($images) ? rcms_parse_module_template('gallery.tpl', $data) : __('Nothing founded'), 'center');
}