Last update before closing project. Thank you!
git-svn-id: https://svn.pioder.pl/uf-svn/uF@38 72ec579a-5ced-4fa4-82f3-afba5d98df2f
This commit is contained in:
67
posting.php
67
posting.php
@@ -9,21 +9,21 @@
|
||||
**/
|
||||
define('IN_uF', true);
|
||||
//include files
|
||||
include('./config.php');
|
||||
include('./includes/constants.php');
|
||||
include('./includes/db.php');
|
||||
include('./includes/errors.php');
|
||||
require('./config.php');
|
||||
require('./includes/constants.php');
|
||||
require('./includes/db.php');
|
||||
require('./includes/errors.php');
|
||||
//connect to database
|
||||
DataBase::db_connect();
|
||||
include('./includes/sessions.php');
|
||||
include('./includes/classes/class_user.php');
|
||||
include('./common.php');
|
||||
include('./includes/misc_functions.php');
|
||||
include('./includes/classes/class_forum.php');
|
||||
include('./includes/classes/class_posting.php');
|
||||
include('./includes/classes/class_topic.php');
|
||||
include('./includes/classes/secure.php');
|
||||
include('./lngs/'.DefaultLang().'/main.php');
|
||||
require('./includes/sessions.php');
|
||||
require('./includes/classes/class_user.php');
|
||||
require('./common.php');
|
||||
require('./includes/misc_functions.php');
|
||||
require('./includes/classes/class_forum.php');
|
||||
require('./includes/classes/class_posting.php');
|
||||
require('./includes/classes/class_topic.php');
|
||||
require('./includes/classes/secure.php');
|
||||
require('./lngs/'.DefaultLang().'/main.php');
|
||||
$start = TimeGeneration();
|
||||
$default_skin = ViewSkinName();
|
||||
SessDelInvalid();
|
||||
@@ -65,14 +65,14 @@ if (isset($_POST['textedit']))
|
||||
//antiflood lock
|
||||
if (isset($_COOKIE['antiflood_time']))
|
||||
{
|
||||
if ($_COOKIE['antiflood_time']>time())
|
||||
if ($_COOKIE['antiflood_time']>$_SERVER['REQUEST_TIME'])
|
||||
{
|
||||
message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setcookie('antiflood_time',(time() + $forum_config['time_antiflood']));
|
||||
setcookie('antiflood_time',($_SERVER['REQUEST_TIME'] + $forum_config['time_antiflood']));
|
||||
}
|
||||
|
||||
//prepare post...
|
||||
@@ -231,41 +231,30 @@ switch ($_GET['mode'])
|
||||
{
|
||||
case 'ntopic':
|
||||
{
|
||||
$skin = array_push_assoc($skin, array(
|
||||
'mainpage' => $lng['writetopic'],
|
||||
'lmainpage' => '</a>> <a href="forum.php?f='.$_GET['f'].'" class="navigator">'.$forum['name'].'</a> ><a href="posting.php?mode=ntopic&f='.$_GET['f'].'" class="navigator">'.$lng['writetopic']
|
||||
));
|
||||
$window_title = $lng['writetopic'];
|
||||
$navigator_title = '<a href="forum.php?f='.$_GET['f'].'" class="navigator">'.$forum['name'].' » <a href="posting.php?mode=ntopic&f='.$_GET['f'].'" class="navigator">'.$lng['writetopic'];
|
||||
break;
|
||||
}
|
||||
|
||||
case 'edit':
|
||||
{
|
||||
$skin = array_push_assoc($skin, array(
|
||||
'mainpage' => $lng['editpost'],
|
||||
'lmainpage' => '</a>> <a href="posting.php?mode=edit&id='.intval($_GET['id']).'"
|
||||
class="navigator">'.$lng['editpost']
|
||||
));
|
||||
$window_title = $lng['editpost'];
|
||||
$navigator_title = '<a href="posting.php?mode=edit&id='.intval($_GET['id']).'" class="navigator">'.$lng['editpost'];
|
||||
break;
|
||||
}
|
||||
|
||||
case 'rpost':
|
||||
{
|
||||
$skin = array_push_assoc($skin, array(
|
||||
'mainpage' => $lng['answer'].': '.Topic::TopicInformation(intval($_GET['id']),'name'),
|
||||
'lmainpage' => '</a>> <a href="posting.php?mode=rpost&id='.intval($_GET['id']).'"
|
||||
class="navigator">'.$lng['answer'].': </a><a href="topic.php?t='.$_GET['id'].'"
|
||||
class="navigator">'.Topic::TopicInformation(intval($_GET['id']),'name')
|
||||
));
|
||||
$window_title = $lng['answer'].': '.Topic::TopicInformation(intval($_GET['id']),'name');
|
||||
$navigator_title = '<a href="posting.php?mode=rpost&id='.intval($_GET['id']).'" class="navigator">'.$lng['answer'].': </a><a href="topic.php?t='.$_GET['id'].'"
|
||||
class="navigator">'.Topic::TopicInformation(intval($_GET['id']),'name');
|
||||
break;
|
||||
}
|
||||
|
||||
case 'qpost':
|
||||
{
|
||||
$skin = array_push_assoc($skin, array(
|
||||
'mainpage' => $lng['quote'],
|
||||
'lmainpage' => '</a>> <a href="posting.php?mode=qpost&id='.$_GET['id'].'&t='.$_GET['t'].'"
|
||||
class="navigator">'.$lng['quote']
|
||||
));
|
||||
$window_title = $lng['quote'];
|
||||
$navigator_title = '<a href="posting.php?mode=qpost&id='.$_GET['id'].'&t='.$_GET['t'].'" class="navigator">'.$lng['quote'];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -277,7 +266,7 @@ switch ($_GET['mode'])
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$skin = array_push_assoc($skin, GenerateHeader($window_title, $navigator_title));
|
||||
$skin = array_push_assoc($skin, array(
|
||||
'smiles'=>Post::SmilesShow(),
|
||||
//labels
|
||||
@@ -296,7 +285,7 @@ if ($msg=='')
|
||||
}
|
||||
|
||||
//do it!
|
||||
include('./skins/'.$default_skin.'/overall_header.tpl');
|
||||
include('./skins/'.$default_skin.'/posting_body.tpl');
|
||||
include('./skins/'.$default_skin.'/overall_footer.tpl');
|
||||
require('./skins/'.$default_skin.'/overall_header.tpl');
|
||||
require('./skins/'.$default_skin.'/posting_body.tpl');
|
||||
require('./skins/'.$default_skin.'/overall_footer.tpl');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user