Browse Source

+ Replaced name function from array_push_associative to array_push_assoc

+ Rewrited posting.php

git-svn-id: https://svn.pioder.pl/uf-svn/uF@32 72ec579a-5ced-4fa4-82f3-afba5d98df2f
master
pioder 15 years ago
parent
commit
93e5cae6f0
20 changed files with 228 additions and 298 deletions
  1. +1
    -1
      eprofile.php
  2. +2
    -2
      forum.php
  3. +1
    -1
      includes/errors.php
  4. +1
    -1
      includes/misc_functions.php
  5. +1
    -1
      includes/pms/pms_folder.php
  6. +1
    -1
      includes/pms/pms_view.php
  7. +1
    -1
      includes/pms/pms_write.php
  8. +1
    -1
      index.php
  9. +1
    -0
      lngs/Polish/main.php
  10. +2
    -2
      login.php
  11. +1
    -1
      moderate.php
  12. +206
    -228
      posting.php
  13. +1
    -1
      register.php
  14. +2
    -2
      search.php
  15. +0
    -49
      skins/subPurple/ntopic_body.tpl
  16. +1
    -1
      skins/subPurple/posting_body.tpl
  17. +1
    -1
      topic.php
  18. +1
    -1
      user.php
  19. +1
    -1
      users.php
  20. +2
    -2
      warns.php

+ 1
- 1
eprofile.php View File

@ -270,7 +270,7 @@ $skin = array(
'lavfile'=>$lng['avatar_file'], 'lavfile'=>$lng['avatar_file'],
'yes'=>$lng['yes'] 'yes'=>$lng['yes']
); );
$skin = array_push_associative($skin,GenerateHeader($lng['leprofile'],'</a>&gt; <a href="eprofile.php" class="navigator">'.$lng['leprofile']));
$skin = array_push_assoc($skin,GenerateHeader($lng['leprofile'],'</a>&gt; <a href="eprofile.php" class="navigator">'.$lng['leprofile']));
if ($msg=='') if ($msg=='')
{ {
$msg = './skins/'.$default_skin.'/blank.tpl'; $msg = './skins/'.$default_skin.'/blank.tpl';

+ 2
- 2
forum.php View File

@ -48,7 +48,7 @@ $skin = array(
'f_id' => $fid, 'f_id' => $fid,
'lang'=> $default_lang 'lang'=> $default_lang
); );
$skin = array_push_associative($skin,GenerateHeader($lng['showforum'].': '.$forum['name'], '</a>&gt; <a href="forum.php?f='.$_GET['f'].'" class="navigator">'.$forum['name']));
$skin = array_push_assoc($skin,GenerateHeader($lng['showforum'].': '.$forum['name'], '</a>&gt; <a href="forum.php?f='.$_GET['f'].'" class="navigator">'.$forum['name']));
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl'); include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/forum_body.tpl'); include('./skins/'.$default_skin.'/forum_body.tpl');
@ -76,7 +76,7 @@ else
{ {
$skin['noposts']='<tr><td width="'.TABLES_WIDTH.'" colspan="8" height="19" class="fitem"><p class="fstandard" align="center">'.$lng['nopost'].'!</p></td></tr>'; $skin['noposts']='<tr><td width="'.TABLES_WIDTH.'" colspan="8" height="19" class="fitem"><p class="fstandard" align="center">'.$lng['nopost'].'!</p></td></tr>';
} }
$skin = array_push_associative($skin, array(
$skin = array_push_assoc($skin, array(
'option_pages' => AddPages(), 'option_pages' => AddPages(),
'lwith' => $lng['with'], 'lwith' => $lng['with'],
'lpage' => $lng['page'], 'lpage' => $lng['page'],

+ 1
- 1
includes/errors.php View File

@ -52,7 +52,7 @@ function message_forum($text, $url, $interval = 1.8)
'queries' => '', 'queries' => '',
'pa_link' => '', 'pa_link' => '',
); );
$skin = array_push_associative($skin,GenerateHeader($lng['message_forum'], '&gt; '.$lng['message_forum']));
$skin = array_push_assoc($skin,GenerateHeader($lng['message_forum'], '&gt; '.$lng['message_forum']));
die( die(
include('./skins/'.ViewSkinName().'/message_body.tpl') include('./skins/'.ViewSkinName().'/message_body.tpl')
); );

+ 1
- 1
includes/misc_functions.php View File

@ -465,7 +465,7 @@ function TriggerStats($id, $type)
UpdateConfigPosts(); UpdateConfigPosts();
} }
function array_push_associative(&$arr)
function array_push_assoc(&$arr)
{ {
$ret = ''; $ret = '';
$args = func_get_args(); $args = func_get_args();

+ 1
- 1
includes/pms/pms_folder.php View File

@ -23,7 +23,7 @@ $skin = array(
'lmdate'=>$lng['date'] 'lmdate'=>$lng['date']
); );
$skin = array_push_associative($skin,GenerateHeader($lng['lpm'].': '.(($_GET['submode']=='sentbox') ? $lng['sentbox'] : $lng['inbox']), '</a> &gt; <a href="pms.php" class="navigator">'.$lng['lpm'].'</a> &gt; '.$folder));
$skin = array_push_assoc($skin,GenerateHeader($lng['lpm'].': '.(($_GET['submode']=='sentbox') ? $lng['sentbox'] : $lng['inbox']), '</a> &gt; <a href="pms.php" class="navigator">'.$lng['lpm'].'</a> &gt; '.$folder));
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl'); include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/msgs_is_body.tpl'); include('./skins/'.$default_skin.'/msgs_is_body.tpl');

+ 1
- 1
includes/pms/pms_view.php View File

@ -97,7 +97,7 @@ $skin = array(
'lpinfo'=>$lng['postinfo'] 'lpinfo'=>$lng['postinfo']
); );
$skin = array_push_associative($skin,GenerateHeader($lng['show_message'].': '.$result['name'], '</a> &gt; '.$folder.' &gt;
$skin = array_push_assoc($skin,GenerateHeader($lng['show_message'].': '.$result['name'], '</a> &gt; '.$folder.' &gt;
<a href="pms.php?mode=view&amp;submode='.$_GET['submode'].'&amp;id='. <a href="pms.php?mode=view&amp;submode='.$_GET['submode'].'&amp;id='.
$result['m_id'].'" class="navigator">'.$lng['show_message'] $result['m_id'].'" class="navigator">'.$lng['show_message']
.': '.$result['name'])); .': '.$result['name']));

+ 1
- 1
includes/pms/pms_write.php View File

@ -56,7 +56,7 @@ $skin = array(
'action'=>$_SERVER['REQUEST_URI'] 'action'=>$_SERVER['REQUEST_URI']
); );
$skin = array_push_associative($skin, GenerateHeader($lng['lpm'].': '.$lng['write_pm'], '</a>&gt;<a href="pms.php" class="navigator">'.$lng['lpm'].'</a> &gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['write_pm']));
$skin = array_push_assoc($skin, GenerateHeader($lng['lpm'].': '.$lng['write_pm'], '</a>&gt;<a href="pms.php" class="navigator">'.$lng['lpm'].'</a> &gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['write_pm']));
if ($msg=='') if ($msg=='')
{ {

+ 1
- 1
index.php View File

@ -45,7 +45,7 @@ $skin = array(
'lpm_msgs' => ($_SESSION['uid']>0) ? $lng['pm_messages'] : '', 'lpm_msgs' => ($_SESSION['uid']>0) ? $lng['pm_messages'] : '',
'amsgs' => ($_SESSION['uid']>0) ? User::UserMsgs() : '' 'amsgs' => ($_SESSION['uid']>0) ? User::UserMsgs() : ''
); );
$skin = array_push_associative($skin, GenerateHeader($lng['mainpage'], '</a>&gt; <a href="index.php" class="navigator">'.$lng['mainpage']));
$skin = array_push_assoc($skin, GenerateHeader($lng['mainpage'], '</a>&gt; <a href="index.php" class="navigator">'.$lng['mainpage']));
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl'); include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/index_body.tpl'); include('./skins/'.$default_skin.'/index_body.tpl');

+ 1
- 0
lngs/Polish/main.php View File

@ -220,6 +220,7 @@ $lng['invalidmode']='Nieprawidłowa opcja pliku';
$lng['no_group']='Grupa nie istnieje! <br /> Powrót do strony głównej grup.'; $lng['no_group']='Grupa nie istnieje! <br /> Powrót do strony głównej grup.';
$lng['message_sent']='Twoja wiadomość została wysłana <br> Powrót na forum <br>'; $lng['message_sent']='Twoja wiadomość została wysłana <br> Powrót na forum <br>';
$lng['perror_2']='Nie jesteś autorem tego postu albo moderatorem'; $lng['perror_2']='Nie jesteś autorem tego postu albo moderatorem';
$lng['perror_3']='Nazwa tematu nie została wypełniona bądź jest krótsza niż 5 znaków!';
$lng['empty password']='Podaj Hasło!'; $lng['empty password']='Podaj Hasło!';
$lng['empty email']='Podaj Email!'; $lng['empty email']='Podaj Email!';
$lng['warn_is_added']='Ostrzeżenie zostało dodane. <br /> Powrót na forum.'; $lng['warn_is_added']='Ostrzeżenie zostało dodane. <br /> Powrót na forum.';

+ 2
- 2
login.php View File

@ -125,7 +125,7 @@ if (isset($_GET['mode']))
'llog_in'=> $lng['llog_in'], 'llog_in'=> $lng['llog_in'],
'msg' => $msg 'msg' => $msg
); );
$skin = array_push_associative($skin, GenerateHeader($lng['llogin'],'</a>&gt; <a href="login.php?mode=login" class="navigator">'.$lng['llogin']));
$skin = array_push_assoc($skin, GenerateHeader($lng['llogin'],'</a>&gt; <a href="login.php?mode=login" class="navigator">'.$lng['llogin']));
include('./skins/'.$default_skin.'/overall_header.tpl'); include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/login_body.tpl'); include('./skins/'.$default_skin.'/login_body.tpl');
$skin['pa_link']=''; $skin['pa_link']='';
@ -166,7 +166,7 @@ if (isset($_GET['mode']))
'lsave' => $lng['save'], 'lsave' => $lng['save'],
'pa_link'=>'' 'pa_link'=>''
); );
$skin = array_push_associative($skin, GenerateHeader($lng['lforgot_pass2'], '</a>&gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['lforgot_pass2']));
$skin = array_push_assoc($skin, GenerateHeader($lng['lforgot_pass2'], '</a>&gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['lforgot_pass2']));
include('./skins/'.$default_skin.'/overall_header.tpl'); include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/newpass_body.tpl'); include('./skins/'.$default_skin.'/newpass_body.tpl');
$stop = TimeGeneration(); $stop = TimeGeneration();

+ 1
- 1
moderate.php View File

@ -129,7 +129,7 @@ switch(trim($_GET['action']))
'L.reset' => $lng['reset'], 'L.reset' => $lng['reset'],
'OPTIONS.select_forum' => Forum::AddForums($tid) 'OPTIONS.select_forum' => Forum::AddForums($tid)
); );
$skin = array_push_associative($skin, GenerateHeader($lng['move_topic'].': '.Topic::TopicInformation($tid,'name'),'</a><a href="moderate.php?action=move&id='.$tid.'" class="navigator">'
$skin = array_push_assoc($skin, GenerateHeader($lng['move_topic'].': '.Topic::TopicInformation($tid,'name'),'</a><a href="moderate.php?action=move&id='.$tid.'" class="navigator">'
.$lng['move_topic'].': </a><a href="topic.php?t='.$tid.'" class="navigator">' .$lng['move_topic'].': </a><a href="topic.php?t='.$tid.'" class="navigator">'
.Topic::TopicInformation($tid,'name'))); .Topic::TopicInformation($tid,'name')));
if ($_SESSION['uid']>0) if ($_SESSION['uid']>0)

+ 206
- 228
posting.php View File

@ -30,32 +30,16 @@ SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
$msg=''; $msg='';
if ($_SESSION['uid']<1) if ($_SESSION['uid']<1)
{ {
message_forum($lng['youarenotlogd'],'login.php?mode=login'); message_forum($lng['youarenotlogd'],'login.php?mode=login');
} }
/**foreach ($_POST as $name => $value)
{
if ($forum_config['use_censorlist'])
{
$_POST[$name] = Secure::UseCensorlist($value);
}
}
*/
$start = TimeGeneration(); $start = TimeGeneration();
//add skin variables //add skin variables
$skin = array(
'smiles'=>Post::SmilesShow(),
//labels
'lsmiles'=>$lng['smiles'],
'ltopicname'=>$lng['ltopicname'],
'lsave'=>$lng['save'],
'lreset'=>$lng['reset'],
'lmsg'=>$lng['message'],
'lsticky_topic'=>$lng['sticky_topic'],
'lwritetopic'=>$lng['writetopic'],
);
$skin = array_push_associative($skin, GenerateHeader('',''));
$skin = array();
$skin = array_push_assoc($skin, GenerateHeader('',''));
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
if(RANK=='2') if(RANK=='2')
@ -66,267 +50,261 @@ else
{ {
$skin['pa_link']=''; $skin['pa_link']='';
} }
switch(trim($_GET['mode']))
if (isset($_POST['textedit']))
{ {
/**
*
functions for reply: normal, editing, quoting...
*
**/
case 'qpost': //quote post
$errors = false;
//check post form
if (($_POST['textedit'] =='' ) or (strlen(trim($_POST['textedit']))<10))
{ {
$msg ='';
if (isset($_POST['textedit']))
{
if (($_POST['textedit'] !='' ) and (strlen(trim($_POST['textedit']))>10))
{
if (isset($_COOKIE['antiflood_time']))
{
if ($_COOKIE['antiflood_time']>time())
{
message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']);
}
}
else
{
setcookie('antiflood_time',(time() + $forum_config['time_antiflood']));
}
$_POST['textedit'] = Secure::TagsReplace($_POST['textedit']);
$id = Post::NewPost(intval($_GET['t']),$_POST['textedit'], $_SESSION['uid']);
$count = ceil(($id / 15 ));
if ($count >1)
{
$page= '&amp;page='.$count;
}
else
{
$page='';
}
$stop = TimeGeneration();
message_forum($lng['post_is_saved'],'topic.php?t='.$_GET['t'].$page.'#'.$id);
}
else
{
$message = $lng['perror_1'];
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
}
}
else
{
$_POST['textedit']='[quote]'.stripslashes(Topic::PostInformation($_GET['id'],'text')).'[/quote]';
$errors = true;
$message = $lng['perror_1'];
}
if ($_GET['mode'] == 'ntopic')
{
if (($_POST['ntopic']!='') or (strlen(trim($_POST['ntopic']))>5))
{
$errors = true;
$message = $lng['perror_3'];
} }
Secure::topic_exists(intval($_GET['t']));
Secure::TopicLocked(intval($_GET['t']));
$skin['mainpage'] = $lng['quote'];
$skin['lmainpage'] = '</a>&gt; <a href="posting.php?mode=qpost&amp;id='.$_GET['id'].'&amp;t='.$_GET['t'].'"
class="navigator">'.$lng['quote'];
$skin['f_id'] = $_GET['id'];
$skin['action'] = 'posting.php?mode=qpost&amp;id='.$_GET['id'].'&amp;t='.$_GET['t'];
if ($msg=='')
{
$msg='./skins/'.$default_skin.'/blank.tpl';
}
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/posting_body.tpl');
include('./skins/'.$default_skin.'/overall_footer.tpl');
break;
} }
case 'edit': //edit post
//antiflood lock
if (isset($_COOKIE['antiflood_time']))
{ {
if ((User::RankAdminMod($_SESSION['uid'])) or ($_SESSION['uid']==Topic::PostInformation($_GET['id'],'u_id')))
if ($_COOKIE['antiflood_time']>time())
{ {
$msg ='';
if (isset($_POST['textedit']))
{
if (($_POST['textedit'] !='' ) and (strlen(trim($_POST['textedit']))>10))
{
if (isset($_COOKIE['antiflood_time']))
{
if ($_COOKIE['antiflood_time']>time())
{
message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']);
}
}
else
{
setcookie('antiflood_time',(time() + $forum_config['time_antiflood']));
}
$_POST['textedit'] = Secure::TagsReplace($_POST['textedit']);
Post::EditPost(intval($_GET['id']),$_POST['textedit']);
$count = ceil((Topic::PostInformation(intval($_GET['id']),'tp_id') / 15 ));
if ($count >1)
{
$page= '&amp;page='.$count;
}
else
{
$page='';
}
$stop = TimeGeneration();
message_forum($lng['post_is_saved'],'topic.php?t='.Topic::PostInformation(intval($_GET['id']),'t_id').$page.'#p'.$_GET['id']);
}
else
message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']);
}
}
else
{
setcookie('antiflood_time',(time() + $forum_config['time_antiflood']));
}
//prepare post...
if (!$errors)
{
$_POST['textedit'] = Secure::TagsReplace($_POST['textedit']);
if ($_GET['mode']=='ntopic')
{
$_POST['ntopic'] = Secure::UseCensorlist(strip_tags(trim($_POST['ntopic'])));
if (isset($_POST['topic_sticky']))
{ {
$message = $lng['perror_1'];
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
}
$_POST['topic_sticky']='1';
} }
else else
{ {
$_POST['textedit']=stripslashes(Topic::PostInformation($_GET['id'],'text'));
$_POST['topic_sticky']='0';
} }
} }
$skin['mainpage'] = $lng['editpost'];
$skin['lmainpage'] = '</a>&gt; <a href="posting.php?mode=edit&amp;id='.intval($_GET['id']).'"
class="navigator">'.$lng['editpost'];
$skin['f_id'] = intval($_GET['id']);
$skin['action'] = 'posting.php?mode=edit&amp;id='.intval($_GET['id']);
if ($msg=='')
{
$msg='./skins/'.$default_skin.'/blank.tpl';
}
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/posting_body.tpl');
include('./skins/'.$default_skin.'/overall_footer.tpl');
break;
}
case 'rpost': //reply post
{
$msg ='';
if (isset($_POST['textedit']))
//do it!
switch ($_GET['mode'])
{ {
if (($_POST['textedit'] !='' ) and (strlen(trim($_POST['textedit']))>10))
case 'rpost':
{ {
if (isset($_COOKIE['antiflood']))
{
if ($_COOKIE['antiflood_time']>time())
{
message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']);
}
}
else
{
setcookie('antiflood_time',(time() + $forum_config['time_antiflood']));
}
$_POST['textedit'] = Secure::TagsReplace($_POST['textedit']);
$id = Post::NewPost(intval($_GET['id']),$_POST['textedit'], $_SESSION['uid']); $id = Post::NewPost(intval($_GET['id']),$_POST['textedit'], $_SESSION['uid']);
$count =ceil(($id / 15 )); $count =ceil(($id / 15 ));
if ($count >1) if ($count >1)
{ {
$page= '&amp;page='.$count;
$page= '&amp;page='.$count;
} }
else else
{ {
$page=''; $page='';
} }
$stop = TimeGeneration();
message_forum($lng['post_is_saved'],'topic.php?t='.$_GET['id'].$page.'#p'.$id);
$redirect_url = 'topic.php?t='.$_GET['id'].$page.'#p'.$id;
break;
} }
else
case 'qpost':
{ {
$message = $lng['perror_1'];
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
}
}
else
{
$_POST['textedit']='';
}
Secure::topic_exists(intval($_GET['id']));
Secure::TopicLocked(intval($_GET['id']));
$skin['mainpage'] = $lng['answer'].': '.Topic::TopicInformation(intval($_GET['id']),'name');
$skin['lmainpage'] = '</a>&gt; <a href="posting.php?mode=rpost&amp;id='.intval($_GET['id']).'"
class="navigator">'.$lng['answer'].': </a><a href="topic.php?t='.$_GET['id'].'"
class="navigator">'.Topic::TopicInformation(intval($_GET['id']),'name');
$skin['f_id'] = $_GET['id'];
$skin['action'] = 'posting.php?mode=rpost&amp;id='.$_GET['id'];
if ($msg=='')
{
$msg='./skins/'.$default_skin.'/blank.tpl';
}
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/posting_body.tpl');
include('./skins/'.$default_skin.'/overall_footer.tpl');
break;
}
/**
*
Select new TOPIC
*
**/
case 'ntopic': //new topic
{
$msg ='';
if ((isset($_POST['textedit'])) and (isset($_POST['ntopic'])))
{
if (($_POST['textedit'] !='' ) and ($_POST['ntopic']!='') and (strlen(trim($_POST['textedit']))>10) and (strlen(trim($_POST['ntopic']))>5))
{
$_POST['textedit'] = Secure::TagsReplace($_POST['textedit']);
if (isset($_COOKIE['antiflood_time']))
$id = Post::NewPost(intval($_GET['id']),$_POST['textedit'], $_SESSION['uid']);
$count =ceil(($id / 15 ));
if ($count >1)
{ {
if ($_COOKIE['antiflood_time']>time())
{
message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']);
}
$page= '&amp;page='.$count;
} }
else else
{ {
setcookie('antiflood_time',(time() + $forum_config['time_antiflood']));
$page='';
} }
$_POST['ntopic'] = strip_tags(addslashes($_POST['ntopic']));
if (isset($_POST['topic_sticky']))
$redirect_url = 'topic.php?t='.$_GET['id'].$page.'#p'.$id;
break;
}
case 'edit':
{
Post::EditPost(intval($_GET['id']),$_POST['textedit']);
$count = ceil((Topic::PostInformation(intval($_GET['id']),'tp_id') / 15 ));
if ($count >1)
{ {
$_POST['topic_sticky']='1';
$page= '&amp;page='.$count;
} }
else else
{ {
$_POST['topic_sticky']='0';
$page='';
} }
$last = Post::NewTopic($_POST['textedit'],$_POST['ntopic'], intval($_GET['f']), $_SESSION['uid'], $_POST['topic_sticky']);
$stop = TimeGeneration();
message_forum($lng['post_is_saved'],'topic.php?t='.$last);
$redirect_url = 'topic.php?t='.Topic::PostInformation(intval($_GET['id']),'t_id').$page.'#p'.$_GET['id'];
break;
} }
else
case 'ntopic':
{ {
$message = $lng['perror_1'];
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
$last = Post::NewTopic($_POST['textedit'],$_POST['ntopic'], intval($_GET['f']), $_SESSION['uid'], $_POST['topic_sticky']);
$redirect_url = 'topic.php?t='.$last;
break;
} }
} }
else
{
$_POST['ntopic'] = '';
$_POST['textedit']='';
//redirecting to topic page...
$stop = TimeGeneration();
message_forum($lng['post_is_saved'], $redirect_url);
}
else
{
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
}
}
else
{
switch($_GET['mode'])
{
case 'qpost':
{
$_POST['textedit'] = (empty($_POST['textedit'])) ? '[quote]'.stripslashes(Topic::PostInformation($_GET['id'],'text')).'[/quote]' : $_POST['textedit'];
break;
} }
$sql = "SELECT `lock`, `name`, `f_id` FROM ".FORUMS_TABLE." WHERE `f_id`='".intval($_GET['f'])."'";
$forum = DataBase::fetch(DataBase::sql_query($sql, GENERAL, 'Could not obtain forum information'));
if($forum['name']=='')
case 'edit':
{ {
message_forum($lng['no_forum'], 'index.php');
$_POST['textedit'] = (empty($_POST['textedit'])) ? stripslashes(Topic::PostInformation($_GET['id'],'text')) : $_POST['textedit'];
break;
} }
if($forum['lock']=='1')
case 'rpost':
{ {
message_forum($lng['no_posting_forum_locked'],'index.php');
$_POST['textedit'] = (empty($_POST['textedit'])) ? '' : $_POST['textedit'];
break;
} }
$skin['mainpage'] = $lng['writetopic'];
$skin['action'] = $_SERVER['REQUEST_URI'];
$skin['lmainpage'] = '</a>&gt; <a href="forum.php?f='.$_GET['f'].'" class="navigator">'.$forum['name'].'</a> &gt;<a href="posting.php?mode=ntopic&amp;f='.$_GET['f'].'" class="navigator">'.$lng['writetopic'];
$skin['f_id']=$_GET['f'];
if ($msg=='')
case 'ntopic':
{ {
$msg='./skins/'.$default_skin.'/blank.tpl';
$_POST['textedit'] = (empty($_POST['textedit'])) ? '' : $_POST['textedit'];
$_POST['ntopic'] = (empty($_POST['ntopic'])) ? '' : $_POST['ntopic'];
break;
} }
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/posting_body.tpl');
include('./skins/'.$default_skin.'/overall_footer.tpl');
}
}
//generating output page
if ($_GET['mode'] == 'rpost' || $_GET['mode'] == 'qpost')
{
Secure::topic_exists(intval($_GET['id']));
Secure::TopicLocked(intval($_GET['id']));
}
if ($_GET['mode'] == 'ntopic')
{
$sql = "SELECT `lock`, `name`, `f_id` FROM ".FORUMS_TABLE." WHERE `f_id`='".intval($_GET['f'])."'";
$forum = DataBase::fetch(DataBase::sql_query($sql, GENERAL, 'Could not obtain forum information'));
if($forum['name']=='')
{
message_forum($lng['no_forum'], 'index.php');
}
if($forum['lock']=='1')
{
message_forum($lng['no_posting_forum_locked'],'index.php', 5);
}
}
if ($_GET['mode']=='edit')
{
if (Topic::PostInformation(trim(strip_tags($_GET['id'])), 'p_id')== '')
{
message_forum($lng['no_message'], 'index.php');
}
if ((!User::RankAdminMod($_SESSION['uid'])) or ($_SESSION['uid']!=Topic::PostInformation($_GET['id'],'u_id')))
{
message_forum($lng['perror_2'], 'index.php');
}
}
switch ($_GET['mode'])
{
case 'ntopic':
{
$skin = array_push_assoc($skin, array(
'mainpage' => $lng['writetopic'],
'lmainpage' => '</a>&gt; <a href="forum.php?f='.$_GET['f'].'" class="navigator">'.$forum['name'].'</a> &gt;<a href="posting.php?mode=ntopic&amp;f='.$_GET['f'].'" class="navigator">'.$lng['writetopic']
));
break;
}
case 'edit':
{
$skin = array_push_assoc($skin, array(
'mainpage' => $lng['editpost'],
'lmainpage' => '</a>&gt; <a href="posting.php?mode=edit&amp;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>&gt; <a href="posting.php?mode=rpost&amp;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; break;
} }
case 'qpost':
{
$skin = array_push_assoc($skin, array(
'mainpage' => $lng['quote'],
'lmainpage' => '</a>&gt; <a href="posting.php?mode=qpost&amp;id='.$_GET['id'].'&amp;t='.$_GET['t'].'"
class="navigator">'.$lng['quote']
));
break;
}
// if no mode... :D // if no mode... :D
default: default:
{ {
$stop = TimeGeneration(); $stop = TimeGeneration();
message_forum($lng['invalidmode'],'index.php'); message_forum($lng['invalidmode'],'index.php');
break; break;
}
}
}
$skin = array_push_assoc($skin, array(
'smiles'=>Post::SmilesShow(),
//labels
'lsmiles'=>$lng['smiles'],
'ltopicname'=>$lng['ltopicname'],
'lsave'=>$lng['save'],
'lreset'=>$lng['reset'],
'lmsg'=>$lng['message'],
'lsticky_topic'=>$lng['sticky_topic'],
'lwritetopic'=>$lng['writetopic'],
));
if ($msg=='')
{
$msg='./skins/'.$default_skin.'/blank.tpl';
} }
//do it!
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/posting_body.tpl');
include('./skins/'.$default_skin.'/overall_footer.tpl');
?>

+ 1
- 1
register.php View File

@ -147,7 +147,7 @@ $skin = array(
'pa_link'=>'' 'pa_link'=>''
); );
$_POST['allow_gg']='1'; $_POST['allow_gg']='1';
$skin = array_push_associative($skin, GenerateHeader($lng['lregister'],'</a>&gt; <a href="register.php" class="navigator">'.$lng['lregister']));
$skin = array_push_assoc($skin, GenerateHeader($lng['lregister'],'</a>&gt; <a href="register.php" class="navigator">'.$lng['lregister']));
if ($msg=='') if ($msg=='')
{ {
$msg = './skins/'.$default_skin.'/blank.tpl'; $msg = './skins/'.$default_skin.'/blank.tpl';

+ 2
- 2
search.php View File

@ -226,7 +226,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
'ltopicname'=>$lng['ltopicname'], 'ltopicname'=>$lng['ltopicname'],
'lang'=> $default_lang 'lang'=> $default_lang
); );
$skin = array_push_associative($skin,GenerateHeader($window_title,$navigator_title));
$skin = array_push_assoc($skin,GenerateHeader($window_title,$navigator_title));
include('./skins/'.$default_skin.'/overall_header.tpl'); include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/forum_body.tpl'); include('./skins/'.$default_skin.'/forum_body.tpl');
$query = DataBase::sql_query($sql,GENERAL, 'Could not obtain topics information'); $query = DataBase::sql_query($sql,GENERAL, 'Could not obtain topics information');
@ -283,7 +283,7 @@ else
); );
$window_title = $lng['lsearch']; $window_title = $lng['lsearch'];
$navigator_title = '</a>&gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['lsearch']; $navigator_title = '</a>&gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['lsearch'];
$skin = array_push_associative($skin,GenerateHeader($window_title,$navigator_title));
$skin = array_push_assoc($skin,GenerateHeader($window_title,$navigator_title));
include('./skins/'.$default_skin.'/overall_header.tpl'); include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/search_body.tpl'); include('./skins/'.$default_skin.'/search_body.tpl');
} }

+ 0
- 49
skins/subPurple/ntopic_body.tpl View File

@ -1,49 +0,0 @@
<?php include $msg; ?>
<form method="POST" action="posting.php?mode=ntopic&amp;f=<?php echo $skin['f_id']; ?>" name="form_dsf">
<table border="1" class="maintable" width="<?= TABLES_WIDTH; ?>">
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('skins/subPurple/images/td_beam_left.gif')" class="beam"></td>
<td height="14" class="beam" style="background-image: url('skins/subPurple/images/td_beam_top.gif')"><?php echo $skin['lwritetopic']; ?></td>
<td width="17" style="background-image: url('skins/subPurple/images/td_beam_right.gif')" class="beam"></td>
</tr>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<tr>
<td class="fitem">
<p align="right"><span class="fsmall"><b><?php echo $skin['ltopicname']; ?>:&nbsp;</b></span>
</td>
<td class="fitem">
<input type="text" name="ntopic" style="width:400px" value="<?php echo $_POST['ntopic']; ?>">
</td>
</tr>
</table>
<span class="fverysmall">&nbsp;</span>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr>
<td width="17" style="background-image: url('skins/subPurple/images/td_beam_left.gif')" class="beam"></td>
<td height="14" width="116" class="beam" style="background-image: url('skins/subPurple/images/td_beam_top.gif')"><?php echo $skin['lsmiles']; ?></td>
<td class="beam" style="background-image: url('skins/subPurple/images/td_beam_top.gif')">Post</td>
<td width="17" style="background-image: url('skins/subPurple/images/td_beam_right.gif')" class="beam"></td>
</tr>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
<tr>
<td width="116" height="115" class="fitem" align="center" valign="top"><br> <? echo $skin['smiles']; ?> </td>
<td width="48%" height="116" class="fitem" align="center" valign="top">
<p align="left"><span class="fstandard"><b><?php echo $skin['lmsg']; ?>:</b></span><br>
<textarea name="textedit" id="textedit" rows="10" cols="56"><?php echo $_POST['textedit']; ?></textarea><br>
<script language="JavaScript" type="text/javascript">
make_wyzz('textedit');
</script>
<? if (RANK>0) { ?>
<input type="checkbox" name="topic_sticky"><span class="fstandard"><b><?php echo $skin['lsticky_topic']; ?></b></span>
<? } ?>
</td>
</tr>
<tr>
<td colspan="2" height="19" class="fitem" align="center">
<input type="submit" class="fbutton" value="<?php echo $skin['lsave']; ?>" />&nbsp;
<input type="submit" class="fbutton" value="<?php echo $skin['lreset']; ?>" />
</td>
</tr>
</table>
</form>

+ 1
- 1
skins/subPurple/posting_body.tpl View File

@ -1,5 +1,5 @@
<?php include $msg; ?> <?php include $msg; ?>
<form method="POST" action="<? echo $skin['action']; ?>" name="form_dsf">
<form method="POST" action="<? echo $_SERVER['REQUEST_URI']; ?>" name="form_dsf">
<? if ($_GET['mode']=='ntopic') { ?> <? if ($_GET['mode']=='ntopic') { ?>
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px"> <table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr> <tr>

+ 1
- 1
topic.php View File

@ -47,7 +47,7 @@ $skin = array(
onMouseOut="this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/reply.gif\'" border="0" alt="reply"></a>' onMouseOut="this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/reply.gif\'" border="0" alt="reply"></a>'
); );
$skin = array_push_associative($skin, GenerateHeader($lng['showtopic'].': '.$topic['name'], '</a>&gt; <a href="forum.php?f='.$fid.'" class="navigator">'.$forum['name'].'</a> &gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$topic['name']));
$skin = array_push_assoc($skin, GenerateHeader($lng['showtopic'].': '.$topic['name'], '</a>&gt; <a href="forum.php?f='.$fid.'" class="navigator">'.$forum['name'].'</a> &gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$topic['name']));
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl'); include('./skins/'.$default_skin.'/overall_header.tpl');

+ 1
- 1
user.php View File

@ -97,7 +97,7 @@ $skin = array(
'user_email'=>($user_info['allow_email']=='1') ? '<a href="mailto:'.$user_info['email'].'"><img border="0" src="skins/'.$default_skin.'/images/email.gif" onMouseOver="this.style.cursor=\'hand\'; this.src=\'skins/'.$default_skin.'/images/email_active.gif\'" 'user_email'=>($user_info['allow_email']=='1') ? '<a href="mailto:'.$user_info['email'].'"><img border="0" src="skins/'.$default_skin.'/images/email.gif" onMouseOver="this.style.cursor=\'hand\'; this.src=\'skins/'.$default_skin.'/images/email_active.gif\'"
onMouseOut="this.src=\'skins/'.$default_skin.'/images/email.gif\'" alt="email"></a>' : '', onMouseOut="this.src=\'skins/'.$default_skin.'/images/email.gif\'" alt="email"></a>' : '',
); );
$skin = array_push_associative($skin,GenerateHeader($lng['showprofile'].': '.$user_info['nick'], '</a>&gt; <a href="user.php?id='.$_GET['id'].'" class="navigator">'.$lng['showprofile'].': '.$user_info['nick']));
$skin = array_push_assoc($skin,GenerateHeader($lng['showprofile'].': '.$user_info['nick'], '</a>&gt; <a href="user.php?id='.$_GET['id'].'" class="navigator">'.$lng['showprofile'].': '.$user_info['nick']));
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl'); include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/user_body.tpl'); include('./skins/'.$default_skin.'/user_body.tpl');

+ 1
- 1
users.php View File

@ -162,7 +162,7 @@ $skin = array(
'luname'=>$lng['user_name'], 'luname'=>$lng['user_name'],
'lgo'=>$lng['lgo'] 'lgo'=>$lng['lgo']
); );
$skin = array_push_associative($skin, GenerateHeader($lng['lusers'],'</a>&gt; <a href="users.php" class="navigator">'.$lng['lusers']));
$skin = array_push_assoc($skin, GenerateHeader($lng['lusers'],'</a>&gt; <a href="users.php" class="navigator">'.$lng['lusers']));
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl'); include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/users_body.tpl'); include('./skins/'.$default_skin.'/users_body.tpl');

+ 2
- 2
warns.php View File

@ -109,7 +109,7 @@ switch(trim($_GET['mode']))
'lall_warns'=>$lng['all_warns'], 'lall_warns'=>$lng['all_warns'],
'queries'=>ShowQueries($start, TimeGeneration()) 'queries'=>ShowQueries($start, TimeGeneration())
); );
$skin = array_push_associative($skin, GenerateHeader($lng['add_warn'].': '.$nick_name,'</a>&gt; <a href="warns.php?mode=add&amp;id='.$uid.'" class="navigator">'.$lng['add_warn'].': '.$nick_name));
$skin = array_push_assoc($skin, GenerateHeader($lng['add_warn'].': '.$nick_name,'</a>&gt; <a href="warns.php?mode=add&amp;id='.$uid.'" class="navigator">'.$lng['add_warn'].': '.$nick_name));
if(User::UserInformation($_SESSION['uid'],'rank')=='2') if(User::UserInformation($_SESSION['uid'],'rank')=='2')
{ {
$skin['pa_link']='<a href="admin/index.php" class="fsmall"><b>'.$lng['pa_link'].'</b></a>'; $skin['pa_link']='<a href="admin/index.php" class="fsmall"><b>'.$lng['pa_link'].'</b></a>';
@ -138,7 +138,7 @@ switch(trim($_GET['mode']))
'lvalue' => $lng['value'], 'lvalue' => $lng['value'],
'lmotive' => $lng['motive'] 'lmotive' => $lng['motive']
); );
$skin = array_push_associative($skin, GenerateHeader($lng['show_warns'].': '.$user['nick'],'</a>&gt; <a href="warns.php?mode=view&amp;id='.$uid.'" class="navigator">'.$lng['show_warns'].': '.$user['nick']));
$skin = array_push_assoc($skin, GenerateHeader($lng['show_warns'].': '.$user['nick'],'</a>&gt; <a href="warns.php?mode=view&amp;id='.$uid.'" class="navigator">'.$lng['show_warns'].': '.$user['nick']));
include('./skins/'.$default_skin.'/overall_header.tpl'); include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/warns_view_body.tpl'); include('./skins/'.$default_skin.'/warns_view_body.tpl');
$sql = "SELECT * FROM `".WARNINGS_TABLE."` WHERE `u_id`='$uid'"; $sql = "SELECT * FROM `".WARNINGS_TABLE."` WHERE `u_id`='$uid'";

Loading…
Cancel
Save