No changes
This commit is contained in:
parent
8680a02b13
commit
b6b398f5bf
17374 changed files with 2475441 additions and 0 deletions
60
ControlPanel/modules/circular/show_circular.php
Normal file
60
ControlPanel/modules/circular/show_circular.php
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
* OGP - Open Game Panel
|
||||
* Copyright (C) 2008 - 2018 The OGP Development Team
|
||||
*
|
||||
* http://www.opengamepanel.org/
|
||||
*
|
||||
* 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
include 'modules/circular/functions.php';
|
||||
function exec_ogp_module()
|
||||
{
|
||||
$circulars = get_circulars();
|
||||
if(isset($_GET['list']))
|
||||
{
|
||||
echo '<h2>'.get_lang('your_circulars').'</h2>';
|
||||
rsort($circulars);
|
||||
echo "<table id='circular_list'>\n".
|
||||
"<thead><tr><th>".get_lang('status')."</th><th>".get_lang('subject')."</th><th>".get_lang('date')."</th></tr></thead><tbody>\n";
|
||||
foreach($circulars as $key => $circular)
|
||||
{
|
||||
echo '<tr><td><i class="status_'.$circular['status'].'"></i></td><td><a href="?m=circular&p=show_circular&read_circular='.$circular['circular_id'].'">'.$circular['subject']."</a></td><td>".$circular['timestamp']."</td></tr>\n";
|
||||
}
|
||||
echo "</tbody></table>\n";
|
||||
}
|
||||
elseif(isset($_GET['read_circular']) and is_numeric($_GET['read_circular']))
|
||||
{
|
||||
foreach($circulars as $circular)
|
||||
if($circular['circular_id'] == $_GET['read_circular'])
|
||||
break;
|
||||
echo '<div id="circular_message">'.$circular['message']."</div>\n".
|
||||
'<p><a href="?m=circular&p=show_circular&list"><< '.get_lang('back')."</a></p>\n";
|
||||
if($circular['status'] == "0")
|
||||
set_circular_readed($circular['circular_id']);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($circulars as $key => $circular)
|
||||
if($circular['status'] == "1")
|
||||
unset($circulars[$key]);
|
||||
sort($circulars);
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($circulars);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue