Esempio n. 1
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$name_module = __('Enable all') . ' url' . __(' for ') . ' sitemap.dat';
if (is_file(DF_PATH . 'sitemap.dat')) {
    $array_url = explode("\n", file_get_contents(DF_PATH . 'sitemap.dat'));
    if (!empty($array_url)) {
        foreach ($array_url as $url) {
            $url = trim($url);
            if (!empty($url)) {
                $sitemap->addUrl($directory . $url, rcms_format_time('Y-m-d', time()), $chfr, $prio);
            }
        }
    }
}
<table border="0" celladding="1" cellspacing="1" width="100%">
<?php 
foreach ($tpldata as $id => $comment) {
    ?>
<tr>
    <th width="100%" align="left" valign="middle"><?php 
    echo $lang['articles']['poster'];
    ?>
 <?php 
    echo user_create_link($comment['author_user'], $comment['author_nick']);
    ?>
</td>
    <th align="left" valign="center" nowrap="nowrap"><?php 
    echo rcms_format_time('H:i:s d.m.Y', $comment['time']);
    ?>
</td>
    <?php 
    if ($system->checkForRight('A-MA')) {
        ?>
    <th nowrap="nowrap"><form method="post" action=""><input type="hidden" name="cdelete" value="<?php 
        echo $id;
        ?>
"><input type="submit" name="" value="<?php 
        echo $lang['articles']['delete'];
        ?>
"></form></td>
    <?php 
    }
    ?>
</tr>
<tr>
Esempio n. 3
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$name_module = __('Forum');
$forum = new forum();
if (!empty($forum->topics)) {
    foreach ($forum->topics as $topic_id => $topic) {
        $sitemap->addUrl($directory . '?module=forum&action=topic&id=' . $topic_id, rcms_format_time('Y-m-d', $topic['last_reply']), $chfr, $prio);
    }
}
Esempio n. 4
0
<table border="0" cellpadding="1" cellspacing="1" style="width: 100%; text-align: left " >
<tr><td colspan="2"><?php 
echo $tpldata['text'];
?>
</td></tr>
<tr><td><?php 
echo rcms_format_time('d/m/Y H:i', $tpldata['date']);
?>
</td><td><?php 
echo __('Posted by') . ': ' . user_create_link($tpldata['author_name'], $tpldata['author_nick'], '_blank');
?>
</td></tr>
</table>
<br />
Esempio n. 5
0
        $frm->addrow(__('Add link to file'), $frm->select_tag('files', $files, -1, 'onChange="selChange(this.form)">\\n
	<option value="-1">' . __('Select file') . '</option') . '&nbsp;&nbsp;&nbsp;' . __('You entered filename of file uploaded through upload interface'), 'top');
    }
    //End Insert list uploaded files
    if ($system->checkForRight('GENERAL')) {
        $arr_modes = array('html' => __('HTML'), 'text' => __('Text'), 'htmlbb' => __('bbCodes') . '+' . __('HTML'), 'php' => __('PHP'));
    } else {
        $arr_modes = array('html' => __('HTML'), 'text' => __('Text'), 'htmlbb' => __('bbCodes') . '+' . __('HTML'));
    }
    $frm->addrow(__('Mode'), $frm->select_tag('mode', $arr_modes, $article['mode']), 'top');
    $frm->addrow(__('Date') . ' (yyyy-mm-dd hh:mm:ss)', $frm->text_box('time', gmdate("Y-m-d H:i:s", $article['time'])), 'top');
    $frm->addrow(__('Allow comments'), $frm->radio_button('comments', array('yes' => __('Allow'), 'no' => __('Disallow')), $article['comments']), 'top');
    $frm->show();
} elseif (!empty($b) || $c == '#hidden' || $c == '#root') {
    if ($articles->setWorkContainer($c)) {
        $frm = new InputForm('', 'post', __('Submit'), __('Reset'));
        $frm->addbreak(__('List of articles'));
        $frm->hidden('c', $c);
        $frm->hidden('b', $b);
        if (($list = $articles->getArticles($b, false, false, false)) !== false) {
            foreach (array_reverse($list, true) as $id => $article) {
                $frm->addrow('<a href="' . RCMS_ROOT_PATH . '?module=articles&c=' . $c . '&b=' . $b . '&a=' . $article['id'] . '" target="_blank">' . $article['title'] . '</a>' . ' [' . user_create_link($article['author_name'], $article['author_nick'], '_blank') . '] [' . rcms_format_time('d F Y H:i:s', $article['time']) . ']', $frm->checkbox('delete[' . $article['id'] . ']', '1', __('Delete')) . $frm->radio_button('a', array($article['id'] => __('Edit'))) . $frm->radio_button('move', array($article['id'] => __('Move'))));
            }
        } else {
            rcms_showAdminMessage($articles->last_error);
        }
        $frm->show();
    } else {
        rcms_showAdminMessage($articles->last_error);
    }
}
Esempio n. 6
0
function pm_get_all_msgs($num = 10, $parse = true, $limited, $file = RCMS_PM_DEFAULT_FILE)
{
    global $_CACHE, $system;
    $data =& $_CACHE['gbook'][$file];
    if (!isset($data)) {
        if (!is_readable($file) || !($data = unserialize(file_get_contents($file)))) {
            $data = array();
        }
    }
    if (!empty($data)) {
        $ndata = $rdata = array();
        foreach ($data as $key => $value) {
            $ndata[$key . ''] = $value;
        }
        $ndata = array_reverse($ndata, true);
        if ($num !== null) {
            $i = 0;
            while ($i < $num && ($el = each($ndata))) {
                $rdata[$el['key']] = $el['value'];
                $i++;
            }
        } else {
            $rdata = $ndata;
        }
        if ($parse) {
            foreach ($rdata as $id => $msg) {
                if (!empty($msg)) {
                    $rdata[$id]['text'] = rcms_parse_text($msg['text'], !$limited, false, !$limited);
                    $rdata[$id]['new'] = $msg['new'];
                    $rdata[$id]['username'] = $msg['username'];
                    $rdata[$id]['nickname'] = $msg['nickname'];
                    $rdata[$id]['time'] = rcms_format_time('H:i:s d.m.Y', $msg['time']);
                }
            }
        }
        return $rdata;
    } else {
        return array();
    }
}
Esempio n. 7
0
        }
        switch ($lightbox_config['folders']) {
            case 'user':
                $folder .= $user . '/';
                break;
            case 'user_year':
                $folder .= $user . '/' . rcms_format_time('Y', rcms_get_time()) . '/';
                break;
            case 'user_year_month':
                $folder .= $user . '/' . rcms_format_time('Y/m', rcms_get_time()) . '/';
                break;
            case 'year':
                $folder .= rcms_format_time('Y', rcms_get_time()) . '/';
                break;
            case 'year_month':
                $folder .= rcms_format_time('Y/m', rcms_get_time()) . '/';
                break;
            default:
                break;
        }
    }
    if (!is_dir($folder)) {
        rcms_mkdir($folder);
    }
}
//Напоследок вырежем небезопасные символы и заменим русские буквы и пробелы в названии картинки на транслит
$filename = $folder . $u . make_safe_filename($_FILES['uploadfile']['name']);
//Включено управление контроля картинок?
if (!empty($lightbox_config['change_enable'])) {
    //Размер правильный?
    if (!empty($lightbox_config['max_size'])) {
Esempio n. 8
0
} else {
    $rating = '';
}
$social = !empty($tpldata['social']) ? $tpldata['social'] : '';
?>
	<td colspan="3" style="width: 100%;padding-left:20px;padding-right:7px;">
        <?php 
echo empty($tpldata['text']) ? $tpldata['desc'] : $tpldata['text'] . $rating . $social;
?>
		</td>
</tr>

<tr style="font-size:small;">
    <td  align="left" style="white-space: nowrap;padding-left:20px;">
        <?php 
echo rcms_format_time('d.m.Y H:i', $tpldata['time']);
?>
    </td>
    <td align="left" style="padding-left:20px;">
        <?php 
echo __('Author/source');
?>
: <?php 
echo rcms_parse_text($tpldata['src'], false, false, false, false, false);
?>
	</td>
	<td align="right"style="padding-right:20px;">
		<?php 
if (!empty($tpldata['linkurl'])) {
    ?>
   	    <a href="<?php 
Esempio n. 9
0
<table border="0" cellpadding="1" cellspacing="1" width="100%" class="grayborder">
<tr>
    <th align="left" width="100%">
        [<?php 
echo rcms_format_time('H:i:s d.m.Y', $tpldata['time'], $system->user['tz']);
?>
]
        <?php 
echo __('Posted by');
?>
 <?php 
echo user_create_link($tpldata['author_user'], $tpldata['author_nick']);
?>
        <?php 
if (isset($tpldata['author_ip']) and $system->checkForRight('ARTICLES-MODERATOR')) {
    ?>
 <?php 
    echo $tpldata['author_ip'];
    ?>
   <?php 
}
?>
    </th>
    <th align="right">
        <?php 
if ($system->checkForRight('ARTICLES-MODERATOR')) {
    ?>
           <form method="post" action="">
            <input type="hidden" name="cdelete" value="<?php 
    echo $tpldata['id'];
    ?>
Esempio n. 10
0
function guestbook_write_to_arch($file, $message)
{
    $fp = fopen($file, 'a+');
    fwrite($fp, $message['author_username'] . '/' . $message['author_nickname'] . ' ' . rcms_format_time('d F Y H:i:s', $message['time'], 0) . ' (GMT)<br />' . $message['text'] . '<hr />');
    fclose($fp);
}
Esempio n. 11
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$name_module = __('Pages');
$pages = @rcms_scandir(RCMS_ROOT_PATH . 'content/pages');
if (!empty($pages) && is_array($pages)) {
    foreach ($pages as $page) {
        $sitemap->addUrl($directory . '?module=pages&id=' . $page, rcms_format_time('Y-m-d', filemtime(RCMS_ROOT_PATH . 'content/pages/' . $page)), $chfr, $prio);
    }
}
Esempio n. 12
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) 2004 ReloadCMS Development Team                            //
//   http://reloadcms.sf.net                                                  //
//                                                                            //
//   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.                     //
//                                                                            //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$articles = articles_parse_list(0, false);
$result = '<table cellspacing="0" cellpadding="0" border="0" width="100%">';
$i = 2;
if (!empty($articles)) {
    foreach ($articles as $article) {
        $result .= '<tr><td class="row' . $i . '"><a href="index.php?module=articles&catid=' . $article['catid'] . '&id=' . $article['id'] . '"><abbr title="' . $lang['articles']['poster'] . ': ' . $article['author_nick'] . ', ' . $lang['articles']['date'] . ': ' . rcms_format_time('d.m.Y H:i:s', $article['time']) . '">' . $article['title'] . ' (' . $article['comcnt'] . ')</abbr></a></td></tr>';
        $i++;
        if ($i > 3) {
            $i = 2;
        }
    }
}
$result .= '</table>';
$system->showMenuWindow($lang['articles']['latestarts'], $result, 'center');
Esempio n. 13
0
<tr style="height:10px">
    <td class="row2" rowspan="2" valign="top" align="center">
	<a href="javascript:insert_text(document.forms['form1'].elements['comtext'], ' [b]<?php 
echo str_replace('\'', '\\\'', $tpldata['author_nick']);
?>
[/b]')"><?php 
echo $tpldata['author_nick'];
?>
</a><br/>
	<?php 
echo show_avatar($tpldata['author_user']);
?>
	</td>
    <td class="row2" align="left" width="100%">
        <?php 
echo rcms_format_time('H:i:s d\\&\\n\\b\\s\\p\\;F\\&\\n\\b\\s\\p\\;Y', $tpldata['time'], $system->user['tz']);
?>
        <?php 
if (isset($tpldata['author_ip']) and $system->checkForRight('ARTICLES-MODERATOR')) {
    ?>
IP: <?php 
    echo $tpldata['author_ip'];
    ?>
   <?php 
}
?>
    </td>
    <td class="row2" align="right" nowrap="nowrap">
        <?php 
if ($system->checkForRight('ARTICLES-MODERATOR')) {
    ?>
if (!empty($article) && !empty($category)) {
    $article_data = articles_get($category, $article, false, 2, $work_dir);
    $frm = new InputForm('', 'post', $lang['general']['submit'], '', 'multipart/form-data', 'arted');
    $frm->addbreak($lang['admincp']['articles']['manage']['edit'] . ': ' . $article_data['title']);
    $frm->addrow($lang['articles']['categ'], $frm->select_tag('a_category', $categories_list, $article_data['catid']), 'top');
    $frm->addrow($lang['articles']['subj'], $frm->text_box('a_title', $article_data['title']), 'top');
    $frm->addrow($lang['articles']['author'], $frm->text_box('a_src', $article_data['src']), 'top');
    $frm->addrow('', rcms_show_bbcode_panel('document.arted.a_description'));
    $frm->addrow($lang['articles']['desc'], $frm->textarea('a_description', str_replace('<br />', '', $article_data['desc']), 70, 5), 'top');
    $frm->addrow('', rcms_show_bbcode_panel('document.arted.a_text'));
    $frm->addrow($lang['articles']['text'], $frm->textarea('a_text', str_replace('<br />', '', $article_data['text']), 70, 25), 'top');
    $frm->addrow($lang['articles']['mode'], $frm->radio_button('a_mode', $lang['articles']['modes'], $article_data['mode']), 'top');
    $frm->addrow($lang['articles']['allowcomments'], $frm->radio_button('a_comments', array('yes' => $lang['admincp']['allow'], 'no' => $lang['admincp']['disallow']), $article_data['comments']), 'top');
    $frm->hidden('editflag', '1');
    $frm->hidden('edit', $article);
    $frm->hidden('category', $category);
    $frm->show();
} elseif (!empty($category)) {
    $category_name = $categories_list[$category];
    $articles = articles_get_articles_list($category, false, 0, $work_dir);
    $frm = new InputForm('', 'post', $lang['general']['submit'], '', 'multipart/form-data');
    $frm->resetButton($lang['general']['reset']);
    $frm->addbreak($lang['admincp']['articles']['manage']['full'] . ': ' . $category_name);
    if (!empty($articles)) {
        foreach ($articles as $id => $article) {
            $frm->addrow($article['title'] . ' [' . ($article['author_name'] != 'guest' ? '<a href="../index.php?module=user.list&user='******'author_name'] . '">' . $article['author_nick'] . '</a>' : $article['author_nick']) . '] [' . rcms_format_time('d F Y H:i:s', $article['time']) . ']', $frm->checkbox('delete[' . $article['id'] . ']', '1', $lang['articles']['delete']) . '<br />' . $frm->radio_button('edit', array($article['id'] => $lang['articles']['edit'])));
        }
    }
    $frm->hidden('category', $category);
    $frm->show();
}
Esempio n. 15
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$name_module = __('Articles');
$articles = new articles();
$containers = $articles->getContainers();
if (!empty($containers) && is_array($containers)) {
    foreach (array_keys($containers) as $c) {
        if ($c != '#hidden') {
            if ($articles->setWorkContainer($c)) {
                if (is_array($articles->getCategories())) {
                    foreach ($articles->getCategories() as $b) {
                        foreach ($articles->getArticles($b['id'], true) as $article) {
                            $loc = $directory . '?module=articles&c=' . str_replace('#', '%23', $c) . '&b=' . $b['id'] . '&a=' . $article['id'];
                            $sitemap->addUrl($loc, rcms_format_time('Y-m-d', $article['time']), $chfr, $prio);
                        }
                    }
                }
            }
        }
    }
}
</tr>
<tr>
    <td align="center" valign="middle" class="row2">
   		<?php 
echo $lang['articles']['count'];
?>
: <?php 
echo $tpldata['articles_clv'];
?>
   		<?php 
if ($tpldata['articles_clv'] != '0') {
    ?>
   		<br><?php 
    echo $lang['articles']['last'];
    ?>
: <?php 
    echo rcms_format_time('d F Y H:i:s', $tpldata['last_article']['time']);
    ?>
   		<?php 
}
?>
   	</td>
   	<td align="center" valign="center" class="row3" width="20%"><a href="<?php 
echo $tpldata['link'];
?>
"><?php 
echo $lang['articles']['readcat'];
?>
</a></td>
</tr>
</table>
Esempio n. 17
0
        ?>
" nowrap="nowrap" align="center">        
        <?php 
        if ($topic['last_reply'] != 0 && @$topic['last_reply_id'] != 0) {
            ?>
            <?php 
            if (rcms_format_time('d', $topic['last_reply']) == rcms_format_time('d', rcms_get_time())) {
                ?>
                <?php 
                echo __('Today at') . ' ' . rcms_format_time('H:i:s', $topic['last_reply']);
                ?>
            <?php 
            } else {
                ?>
                <?php 
                echo rcms_format_time('H:i:s d.m.Y', $topic['last_reply']);
                ?>
            <?php 
            }
            ?>
            <?php 
            if (!empty($topic['last_reply_author'])) {
                ?>
            	<br /><?php 
                echo __('Author');
                ?>
: <?php 
                echo $topic['last_reply_author'];
                ?>
            <?php 
            }
Esempio n. 18
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
// Site map for Gallery
$name_module = __('Gallery');
$file = '';
if ($dh = opendir(GALLERY_IMAGES_DIR)) {
    while (($file = readdir($dh)) !== false) {
        if ($file != '.' && $file != '..' && $file != '.gitignore') {
            $lastmod = filemtime(GALLERY_IMAGES_DIR . $file);
            $loc = $directory . '?module=gallery&id=' . $file;
            $sitemap->addUrl($loc, rcms_format_time('Y-m-d', $lastmod), $chfr, $prio);
        }
    }
    closedir($dh);
}
Esempio n. 19
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$articles = new articles();
$container = empty($articles->config['cpop']) ? 'articles' : $articles->config['cpop'];
if (!$articles->setWorkContainer($container)) {
    return show_window(__('Most commented articles'), __('Error occurred') . ':<br />' . $articles->last_error);
}
if ($list = $articles->getLimitedStat('ccnt', $system->config['num_of_latest'], true)) {
    $result = '<table cellspacing="0" cellpadding="0" border="0" width="100%">';
    $i = 2;
    foreach ($list as $id => $time) {
        $id = explode('.', $id);
        if (($article = $articles->getArticle($id[0], $id[1], false, false, false, false)) !== false) {
            $result .= '<tr><td class="row' . $i . '"><a href="index.php?module=articles&amp;c=' . $container . '&amp;b=' . $id[0] . '&amp;a=' . $id[1] . '"><abbr title="' . $article['author_nick'] . ', ' . rcms_format_time('d.m.Y H:i:s', $article['time']) . '">' . $article['title'] . ' (' . $article['comcnt'] . ')</abbr></a></td></tr>';
            $i++;
            if ($i > 3) {
                $i = 2;
            }
        }
    }
    $result .= '</table>';
    show_window(__('Most commented articles'), $result);
}
Esempio n. 20
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
if (!empty($_POST['d'])) {
    foreach ($_POST['d'] as $id => $cond) {
        if ($cond) {
            post_remove($id, DF_PATH . 'support.dat');
        }
    }
}
$messages = get_messages(null, true, false, DF_PATH . 'support.dat');
$frm = new InputForm('', 'post', __('Submit'));
$frm->addbreak(__('Feedback requests'));
if (!empty($messages)) {
    foreach ($messages as $id => $message) {
        $frm->addrow('[' . rcms_format_time('d F Y H:i:s', $message['time'], $system->user['tz']) . '] ' . __('Message by') . ' ' . user_create_link($message['username'], $message['nickname']) . '<hr>' . $message['text'], $frm->checkbox('d[' . $id . ']', '1', __('Delete')));
    }
} else {
    $frm->addmessage(__('Nothing founded'));
}
$frm->show();
?>
    </td>
</tr>
<tr>
    <td align="center" valign="middle" class="row2">
   		<?php 
echo $lang['files']['cfiles'] . count($tpldata['files']);
?>
   		<?php 
if (count($tpldata['files'])) {
    ?>
   		<br><?php 
    echo $lang['files']['lastfile'];
    ?>
: <?php 
    echo rcms_format_time('d F Y H:i:s', $lastfile['date']);
    ?>
   		<?php 
}
?>
   	</td>
   	<td align="center" valign="center" class="row3" width="20%">
   	    <a href="<?php 
echo $tpldata['link'];
?>
"><?php 
echo $lang['files']['browsecat'];
?>
</a>
   	</td>
</tr>
Esempio n. 22
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$forum = new forum();
$i = 2;
$topics = $forum->getFreshTopics($system->config['num_of_latest']);
if ($topics !== false) {
    $result = '';
    foreach ($topics as $topic_id) {
        $topic = $forum->getTopicData($topic_id);
        $result .= '<tr><td class="row' . $i . '">';
        $result .= '<a href="?module=forum&amp;action=topic&amp;id=' . $topic_id . '"><abbr title="[' . $topic['author_nick'] . '/' . rcms_format_time('H:i:s d.m.Y', $topic['date']) . ']">' . $topic['title'] . '</abbr></a> <sup title="' . __('Replies') . ': ' . $topic['replies'] . '"><small>' . $topic['replies'] . '</sup></small>';
        $result .= ' <a href="?module=forum&amp;action=topic&amp;id=' . $topic_id . '&amp;pid=' . (@$topic['last_reply_id'] + 2) . '#' . (@$topic['last_reply_id'] + 2) . '"><abbr title="[' . $topic['last_reply_author'] . '/' . rcms_format_time('H:i:s d.m.Y', $topic['last_reply']) . ']">&gt;&gt;</abbr></a></td></tr>';
        $i++;
        if ($i > 3) {
            $i = 2;
        }
    }
    if (!empty($result)) {
        show_window(__('Forum updates'), '<table cellspacing="0" cellpadding="0" border="0" width="100%">' . $result . '</table>');
    }
}
Esempio n. 23
0
<div class="border">
    <div class="row3"><?php 
echo user_create_link($tpldata['username'], $tpldata['nickname']);
?>
</div>
    <div class="row2" style=""><?php 
echo $tpldata['text'];
?>
</div>
    <div class="row3" style="height: auto;">
        <?php 
echo rcms_format_time('d F Y H:i:s', $tpldata['time'], $system->user['tz']);
?>
    <?php 
if ($system->checkForRight('MINICHAT')) {
    ?>
        <form method="post" action="">
            <input type="hidden" name="mcdelete" value="<?php 
    echo $tpldata['id'];
    ?>
" />
            <input type="submit" name="" value="X" />
        </form>
    <?php 
}
?>
    </div>
</div>
<br />
Esempio n. 24
0
    $selected_month = $_POST['cal-month'];
} else {
    $selected_month = $current_month;
}
$calendar = new calendar($selected_month, $selected_year);
foreach ($articles->getContainers(0) as $container => $null) {
    $articles->setWorkContainer($container);
    if ($list = $articles->getStat('time')) {
        foreach ($list as $id => $time) {
            $id = explode('.', $id);
            if (rcms_format_time('n', $time) == $selected_month && rcms_format_time('Y', $time) == $selected_year) {
                $calendar->assignEvent(rcms_format_time('d', $time), '?module=articles&amp;from=' . mktime(0, 0, 0, $selected_month, rcms_format_time('d', $time), $selected_year) . '&amp;until=' . mktime(23, 59, 59, $selected_month, rcms_format_time('d', $time), $selected_year));
            }
        }
    }
}
$calendar->highlightDay(rcms_format_time('d', time()));
$date_pick = '<form action="" method="post" style="text-align: center">
               <select name="cal-month">';
foreach (array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December') as $num => $month) {
    $date_pick .= '<option value="' . ($num + 1) . '"' . ($num == $selected_month - 1 ? ' selected="selected"' : '') . '>' . $lang['datetime'][$month] . '</option>';
}
$date_pick .= '</select>
               <select name="cal-year">';
for ($y = $current_year - 6; $y <= $current_year; $y++) {
    $date_pick .= '<option value="' . $y . '"' . ($y == $selected_year ? ' selected="selected"' : '') . '>' . $y . '</option>';
}
$date_pick .= '</select>
               <input value="OK" type="submit" />
              </form>';
show_window(__('Articles calendar'), $calendar->returnCalendar() . $date_pick);
    ?>
            <img src="<?php 
    echo $tpldata['cat_data']['iconfull'];
    ?>
" alt="" align="left">
        <?php 
}
?>
        <?php 
echo !empty($tpldata['showdesc']) || empty($tpldata['text']) ? $tpldata['desc'] : $tpldata['text'];
?>
    </td>
</tr>
<tr>
    <td class="row3" align="left" nowrap><?php 
echo rcms_format_time('d F Y H:i:s', $tpldata['time']);
?>
</td>
    <td align="center" class="row2" width="100%"><?php 
echo $lang['articles']['poster'];
?>
 <?php 
echo user_create_link($tpldata['author_name'], $tpldata['author_nick']);
?>
 :: <?php 
echo $lang['articles']['author'];
?>
: <?php 
echo $tpldata['src'];
?>
</td>
Esempio n. 26
0
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$articles = new articles();
$result = '<table cellspacing="0" cellpadding="0" border="0" width="100%">';
$i = 2;
$arr_res = array();
foreach (array_keys($articles->getContainers()) as $c) {
    if (substr($c, 0, 1) != '#') {
        $articles->setWorkContainer($c);
        if ($list = $articles->getLimitedStat('time', $system->config['num_of_latest'], true)) {
            foreach ($list as $id => $time) {
                $id = explode('.', $id);
                if (($article = $articles->getArticle($id[0], $id[1], false, false, false, false)) !== false) {
                    $arr_res[$article['time']] = '<tr><td class="row' . $i . '"><a href="index.php?module=articles&c=' . $c . '&b=' . $id[0] . '&a=' . $id[1] . '"><abbr title="' . $article['author_nick'] . ', ' . rcms_format_time('d.m.Y H:i:s', $article['time']) . '">' . $article['title'] . ' </abbr><small><sup title="' . __('Comments') . ': ' . $article['comcnt'] . '">' . $article['comcnt'] . '</sup></small></a></td></tr>';
                    $i++;
                    if ($i > 3) {
                        $i = 2;
                    }
                }
            }
        }
    }
}
krsort($arr_res);
$arr_res = array_values($arr_res);
for ($k = 0; $k < $system->config['num_of_latest']; $k++) {
    $result .= @$arr_res[$k];
}
$result .= '</table>';
        echo show_avatar($post['author_name']);
        ?>
<br/>
        <?php 
        echo rcms_get_user_status($post['author_name']);
        ?>
<br />
        <?php 
        if (!pm_disabled() and $post['author_name'] != 'guest' and $system->user['username'] != 'guest') {
            print '<a href="?module=pm&for=' . $post['author_name'] . '">' . __('Send PM') . '</a><br />';
        }
        ?>
    </td>
    <td class="row2" align="left" width="100%">
        <small><?php 
        echo rcms_format_time('H:i:s d\\&\\n\\b\\s\\p\\;F\\&\\n\\b\\s\\p\\;Y', $post['date']);
        ?>
 <?php 
        if (isset($post['author_ip']) and $system->checkForRight('FORUM')) {
            ?>
 <?php 
            echo $post['author_ip'];
            ?>
 <?php 
        }
        ?>
 </small>
    </td>
    <td class="row2" align="right" nowrap="nowrap">
        <small>
            <?php 
Esempio n. 28
0
<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$forum = new forum();
$topics = $forum->getFreshTopics($system->config['num_of_latest']);
foreach ($topics as $topic_id) {
    $topic = $forum->getTopicData($topic_id);
    if ($topic['replies'] == 0) {
        $title = __('New topic') . ': ' . $topic['title'] . ' [' . $topic['author_nick'] . '/' . rcms_format_time('H:i:s d.m.Y', $topic['date']) . ']';
    } else {
        $title = __('New message in topic') . ': ' . $topic['title'] . ' [' . @$topic['last_reply_author'] . '/' . rcms_format_time('H:i:s d.m.Y', $topic['last_reply']) . ']';
    }
    $feed->addItem($title, $title . $topic['title'], 'http://' . $_SERVER['HTTP_HOST'] . '?module=' . $module . '&amp;action=topic&amp;id=' . $topic_id . '&amp;pid=' . (@$topic['last_reply_id'] + 2) . '#' . (@$topic['last_reply_id'] + 2), $topic['last_reply']);
}