PHP-Fusion Mods
Navigacija
Apsauga
Apsauga Neleista registracija: 41303
Šiandien: 21
Prisijungę nariai
» Svečių: 6
» Narių: 0

» Viso narių: 10,235
» Naujausias: ruslanas tuk

Prisijungimų istorija:
tabuxnepamenu
Zbigniew@nepamenu
sanpernepamenu
CepelinasXnepamenu
VV91DDnepamenu
Minusnepamenu
priezilviciunepamenu
EdvinasG1337nepamenu
rolandas94nepamenu
Edis2nepamenu
klubogerbejasnepamenu
Miskinisnepamenu
Pask. modai
Prisijungti
Vardas

Slaptažodis



Dar ne narys?
Registruotis.

Pamiršai slaptažodį?
Prašyk naujo!.

Naujausi prašymai
[L] testas
Narių apklausa
Ar dar kuriate tinklalapius?

Ne
Ne
0% [0 Balsai]

Taip
Taip
88% [7 Balsai]

Naudojuosi socialiniais tinklais
Naudojuosi socialiniais tinklais
13% [1 Balsas]

Balsai: 8
Kad galėtum balsuoti, turi prisijungti.
Pradėta: 2022-05-29 19:54
Shoutbox
You must login to post a message.

2026-05-29 21:26
Ši sistema turi daug patobulinimų kurie kurti mūsų Šypsosi Buvo planuose pereiti ant v9, bet ....

2026-05-11 16:51
Sveiki. Norėjau pasveikinti jus su atkaklumu arba ištverme. Tai viena iš dviejų paskutinių svetainių, paremtų v7. Ar negaila švaistyti ilgametės patirties ir pereiti prie v9?

2025-07-13 17:07
svx, smagu kad dar atsiranda naujų narių Šypsosi2

2024-03-07 22:13
Oj Tabux… apkabinčiau už tą moderatorių 😁

2024-02-22 17:40
Šypsosi2 jo buvo laikai.. Senukai jau mes. Bega laikas greiciau nei noretusi. Smagu matyti kad uzsuka seni nariai, ne as vienas Šypsosi

Shoutbox Archive
Peržiūrėti temą
 Spausdinti temą
Padekit del Reputation 1.00 modifikacijos
bliogis
#1 Spausdinti pranešimą
parašyta 2008-04-11 19:53
Naujokas



Reputacija: 0

Pranešimai: 2
Įstojo: 2008-02-14

atsiprasu jai tokia tena jau buvo is anksto ;)

gal galite ideti koda i viewthread.php dekui is anksto

Download source  Code
# START
$countplius = dbcount(\"(type)\", \"reputation\", \" to_id='\".$data['user_id'].\"' AND type='1'\");
$countminus = dbcount(\"(type)\", \"reputation\", \" to_id='\".$data['user_id'].\"' AND type='0'\");
$counttotal = $countplius - $countminus;
echo \"Reputacija: \".$counttotal.\"\";
if (iMEMBER) {
echo \" [+$countplius/-$countminus]

\n\";
} else {
echo \"

\";
}
# END




Prideti prie sito




Download source  Code
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once \"../maincore.php\";
require_once INCLUDES.\"forum_functions_include.php\";
require_once BASEDIR.\"subheader.php\";
require_once BASEDIR.\"side_left.php\";
include LOCALE.LOCALESET.\"forum/main.php\";

$posts_per_page = 20;

if (!FUSION_QUERY || !isset($forum_id) || !isNum($forum_id) || !isset($thread_id) || !isNum($thread_id)) fallback(\"index.php\");

$result = dbquery(
   \"SELECT f.*, f2.forum_name AS forum_cat_name
   FROM \".$db_prefix.\"forums f
   LEFT JOIN \".$db_prefix.\"forums f2 ON f.forum_cat=f2.forum_id
   WHERE f.forum_id='\".$forum_id.\"'\"
);
if (dbrows($result)) {
   $fdata = dbarray($result);
   if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) fallback(\"index.php\");
} else {
   fallback(\"index.php\");
}
$can_post = checkgroup($fdata['forum_posting']);

$forum_mods = explode(\".\", $fdata['forum_moderators']);
if (iMEMBER && in_array($userdata['user_id'], $forum_mods)) { define(\"iMOD\", true); } else { define(\"iMOD\", false); }

$result = dbquery(\"SELECT * FROM \".$db_prefix.\"threads WHERE thread_id='\".$thread_id.\"' AND forum_id='\".$fdata['forum_id'].\"'\");
if (dbrows($result)) { $tdata = dbarray($result); } else { fallback(\"index.php\"); }

$caption = $fdata['forum_cat_name'].\" | \".$fdata['forum_name'].\"\";
$result = dbquery(\"UPDATE \".$db_prefix.\"threads SET thread_views=thread_views+1 WHERE thread_id='$thread_id'\");

if (iMEMBER && $can_post && !$tdata['thread_locked'] && isset($_POST['postquickreply'])) {
   $flood = false;
   $message = stripinput(censorwords($_POST['message']));
   if ($message != \"\") {
      $result = dbquery(\"SELECT MAX(post_datestamp) AS last_post FROM \".$db_prefix.\"posts WHERE post_author='\".$userdata['user_id'].\"'\");
      if (dbrows($result) > 0) {
         $data = dbarray($result);
         if ((time() - $data['last_post']) < $settings['flood_interval']) {
            $flood = true;
            $result = dbquery(\"INSERT INTO \".$db_prefix.\"flood_control (flood_ip, flood_timestamp) VALUES ('\".USER_IP.\"', '\".time().\"')\");
            if (dbcount(\"(flood_ip)\", \"flood_control\", \"flood_ip='\".USER_IP.\"'\") > 4) {
               $result = dbquery(\"UPDATE \".$db_prefix.\"users SET user_status='1' WHERE user_id='\".$userdata['user_id'].\"'\");
            }
            fallback(\"viewforum.php?forum_id=$forum_id\");
         }
      }
      if (!$flood) {
         $sig = ($userdata['user_sig'] ? '1' :'0');
         $smileys = isset($_POST['disable_smileys']) ? \"0\" : \"1\";
         $subject = \"RE: \".$tdata['thread_subject'];
         $result = dbquery(\"UPDATE \".$db_prefix.\"forums SET forum_lastpost='\".time().\"', forum_lastuser='\".$userdata['user_id'].\"' WHERE forum_id='$forum_id'\");
         $result = dbquery(\"UPDATE \".$db_prefix.\"threads SET thread_lastpost='\".time().\"', thread_lastuser='\".$userdata['user_id'].\"' WHERE thread_id='$thread_id'\");
         $result = dbquery(\"INSERT INTO \".$db_prefix.\"posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '\".$userdata['user_id'].\"', '\".time().\"', '\".USER_IP.\"', '0', '0')\");
         $newpost_id = mysql_insert_id();
         $result = dbquery(\"UPDATE \".$db_prefix.\"users SET user_posts=user_posts+1 WHERE user_id='\".$userdata['user_id'].\"'\");
         redirect(\"postify.php?post=reply&error=0&forum_id=$forum_id&thread_id=$thread_id&post_id=$newpost_id\");
      }
   }
}

opentable($locale['500']);
echo \"

\n\";
if (iMEMBER && $can_post) {
   echo \"\n\";
}
echo \"
\".$settings['sitename'].\" | $caption\n\";
   if (!$tdata['thread_locked']) {
      echo \"'\".$locale['565'].\"'\n\";
   }
   echo \"'\".$locale['566'].\"'
\n\";

$rows = dbcount(\"(thread_id)\", \"posts\", \"thread_id='$thread_id'\");

if (isset($pid) && isNum($pid)) {
   $reply_count = dbcount(\"(post_id)\", \"posts\", \"thread_id='\".$tdata['thread_id'].\"' AND post_id<='\".$pid.\"'\");
   if ($reply_count > $posts_per_page) $rowstart = ((ceil($reply_count / $posts_per_page)-1)*$posts_per_page);
}

if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;

if ($rows > $posts_per_page) {
   echo \"

\".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF.\"?forum_id=$forum_id&thread_id=$thread_id&\").\"
\n\";
}

echo \"\n\";

if ($rows != 0) {
   $result = dbquery(
      \"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM \".$db_prefix.\"posts p
      LEFT JOIN \".$db_prefix.\"forum_attachments fa USING(post_id)
      LEFT JOIN \".$db_prefix.\"users u ON p.post_author = u.user_id
      LEFT JOIN \".$db_prefix.\"users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
      WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page\"
   );
   $numrows = dbrows($result);
   while ($data = dbarray($result)) {
       $message = $data['post_message'];
      if ($data['post_showsig']) { $message = $message.\"\n\n
\".$data['user_sig']; }
      if ($data['post_smileys']) { $message = parsesmileys($message); }
      $message = parseubb($message);
      $message = nl2br($message);
      if ($data['post_edittime'] != \"0\") {
         $edituser = \"\".$data['edit_name'].\"\";
         $edittime = showdate(\"forumdate\", $data['post_edittime']);
      }
      $is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < \"102\" ? true : false;
      echo \"












\n\";
   }
}

echo \"
\".$locale['501'].\" \".$data['post_subject'].\"

\".$data['user_name'].\"

\".($is_mod ? $locale['userf1'] : getuserlevel($data['user_level'])).\"

\n\";
      if ($data['user_avatar'] != \"\") {
         echo \"'\".$locale['567'].\"'

\n\";
         $height = \"185\";
      } else {
         $height = \"70\";
      }
      echo \"\".$locale['502'].\" \".$data['user_posts'].\"
\n\";
      if ($data['user_location']) echo \"\".$locale['503'].\" \".$data['user_location'].\"
\n\";
      echo \"\".$locale['504'].\" \".showdate(\"%d.%m.%y\", $data['user_joined']).\"






\".$locale['505'].showdate(\"forumdate\", $data['post_datestamp']).\" \n\";
      if (iMEMBER && $can_post) {
         if (!$tdata['thread_locked']) {
            if ($userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
               echo \"'\".$locale['568'].\"'\n\";
            }
            echo \"'\".$locale['569'].\"'\n\";
            if (iMOD || iSUPERADMIN && $data['post_ip'] != \"0.0.0.0\" && file_exists(THEME.\"forum/ip.gif\")) echo \"'\".$locale['570'].\"'\n\";
         } else {
            if (iMOD || iSUPERADMIN) {
               echo \"'\".$locale['568'].\"'\n\";
               if ($data['post_ip'] != \"0.0.0.0\" && file_exists(THEME.\"forum/ip.gif\")) echo \"'\".$locale['570'].\"'\n\";
            }
         }
      }
      echo \"


$message\";
      if ($data['attach_id']) {
         if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM.\"attachments/\".$data['attach_name'])) {
            echo \"
\n\".$data['user_name'].$locale['506'].\"

\n\";
         } else {
            echo \"
\n\".$data['user_name'].$locale['507'].\"
\n\".$data['attach_name'].\"\";
         }
      }
      if ($data['post_edittime'] != \"0\") {
         echo \"
\n\".$locale['508'].$edituser.$locale['509'].\"$edittime\";
      }
echo \"
\n\";
      if ($data['user_aim']) {
         echo \"'\".$data['user_aim'].\"' \";
      }
      if ($data['user_icq']) {
         echo \"'\".$data['user_icq'].\"' \";
      }
      if ($data['user_msn']) {
         echo \"'\".$data['user_msn'].\"' \";
      }
      if ($data['user_yahoo']) {
         echo \"'\".$data['user_yahoo'].\"' \";
      }
      if ($data['user_web']) {
         if (!strstr($data['user_web'], \"http://\")) { $urlprefix = \"http://\"; } else { $urlprefix = \"\"; }
         echo \"'\".$data['user_web'].\"' \";
      }
      if (iMEMBER && $data['user_id'] != $userdata['user_id']) echo \"'\".$locale['571'].\"'\n\";
echo \"
\n\";

if ($rows > $posts_per_page) {
   echo \"

\".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF.\"?forum_id=$forum_id&thread_id=$thread_id&\").\"
\n\";
}

echo \"\n\n\";
$forum_list = \"\"; $current_cat = \"\";
$result = dbquery(
   \"SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name
   FROM \".$db_prefix.\"forums f
   INNER JOIN \".$db_prefix.\"forums f2 ON f.forum_cat=f2.forum_id
   WHERE \".groupaccess('f.forum_access').\" AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC\"
);
while ($data = dbarray($result)) {
   if ($data['forum_cat_name'] != $current_cat) {
      if ($current_cat != \"\") $forum_list .= \"\n\";
      $current_cat = $data['forum_cat_name'];
      $forum_list .= \"\n\";
   }
   $sel = ($data['forum_id'] == $fdata['forum_id'] ? \" selected\" : \"\");
   $forum_list .= \"\n\";
}
$forum_list .= \"
\n\";
echo \"\n\";

if (iMEMBER && $can_post) {
   if (iMOD || iSUPERADMIN) {
      echo \"
\n\";
   }
}
echo \"
\".$locale['540'].\"



\".$locale['520'].\"




\n\";
if (iMEMBER) {
   echo \"\n\n\";
   if ($settings['thread_notify']) {
      echo \"\n\";
   }
   if ($can_post) {
      echo \"\n\";
   }
   echo \"\n
\";
      if (dbcount(\"(thread_id)\", \"thread_notify\", \"thread_id='$thread_id' AND notify_user='\".$userdata['user_id'].\"'\")) {
         $result = dbquery(\"UPDATE \".$db_prefix.\"thread_notify SET notify_datestamp='\".time().\"', notify_status='1' WHERE thread_id='$thread_id' AND notify_user='\".$userdata['user_id'].\"'\");
         $notify_link = \"\".$locale['515'].\"\";
      } else {
         $notify_link = \"\".$locale['516'].\"\";
      }
      echo \"$notify_link
\";
      if (!$tdata['thread_locked']) {
         echo \"'\".$locale['565'].\"'\n\";
      }
      echo \"'\".$locale['566'].\"'\n\";
      echo \"
\n\";
}
closetable();
tablebreak();

if (iMEMBER && $can_post && !$tdata['thread_locked']) {
   opentable($locale['512']);
   echo \"













>', '');\\">
>', '');\\">
>', '');\\">
>
>
>
>
>', '');\\">
>
Download source  Code
', '


');\\">
>', '');\\">
\".displaysmileys(\"message\").\"

\".$locale['513'].\"

\n\";
   closetable();
}

echo \"\n\";

require_once BASEDIR.\"side_right.php\";
require_once BASEDIR.\"footer.php\";
?>



Redagavo bliogis 2008-04-11 19:58
 
PM
Andrejus
#2 Spausdinti pranešimą
parašyta 2008-04-11 20:08
Vartotojo avataras

Geradarys



Reputacija: 0

Pranešimai: 701
Įstojo: 2007-05-28

Download source  Code
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once \"../maincore.php\";
require_once INCLUDES.\"forum_functions_include.php\";
require_once BASEDIR.\"subheader.php\";
require_once BASEDIR.\"side_left.php\";
include LOCALE.LOCALESET.\"forum/main.php\";

$posts_per_page = 20;

if (!FUSION_QUERY || !isset($forum_id) || !isNum($forum_id) || !isset($thread_id) || !isNum($thread_id)) fallback(\"index.php\");

$result = dbquery(
   \"SELECT f.*, f2.forum_name AS forum_cat_name
   FROM \".$db_prefix.\"forums f
   LEFT JOIN \".$db_prefix.\"forums f2 ON f.forum_cat=f2.forum_id
   WHERE f.forum_id='\".$forum_id.\"'\"
);
if (dbrows($result)) {
   $fdata = dbarray($result);
   if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) fallback(\"index.php\");
} else {
   fallback(\"index.php\");
}
$can_post = checkgroup($fdata['forum_posting']);

$forum_mods = explode(\".\", $fdata['forum_moderators']);
if (iMEMBER && in_array($userdata['user_id'], $forum_mods)) { define(\"iMOD\", true); } else { define(\"iMOD\", false); }

$result = dbquery(\"SELECT * FROM \".$db_prefix.\"threads WHERE thread_id='\".$thread_id.\"' AND forum_id='\".$fdata['forum_id'].\"'\");
if (dbrows($result)) { $tdata = dbarray($result); } else { fallback(\"index.php\"); }

$caption = $fdata['forum_cat_name'].\" | \".$fdata['forum_name'].\"\";
$result = dbquery(\"UPDATE \".$db_prefix.\"threads SET thread_views=thread_views+1 WHERE thread_id='$thread_id'\");

if (iMEMBER && $can_post && !$tdata['thread_locked'] && isset($_POST['postquickreply'])) {
   $flood = false;
   $message = stripinput(censorwords($_POST['message']));
   if ($message != \"\") {
      $result = dbquery(\"SELECT MAX(post_datestamp) AS last_post FROM \".$db_prefix.\"posts WHERE post_author='\".$userdata['user_id'].\"'\");
      if (dbrows($result) > 0) {
         $data = dbarray($result);
         if ((time() - $data['last_post']) < $settings['flood_interval']) {
            $flood = true;
            $result = dbquery(\"INSERT INTO \".$db_prefix.\"flood_control (flood_ip, flood_timestamp) VALUES ('\".USER_IP.\"', '\".time().\"')\");
            if (dbcount(\"(flood_ip)\", \"flood_control\", \"flood_ip='\".USER_IP.\"'\") > 4) {
               $result = dbquery(\"UPDATE \".$db_prefix.\"users SET user_status='1' WHERE user_id='\".$userdata['user_id'].\"'\");
            }
            fallback(\"viewforum.php?forum_id=$forum_id\");
         }
      }
      if (!$flood) {
         $sig = ($userdata['user_sig'] ? '1' :'0');
         $smileys = isset($_POST['disable_smileys']) ? \"0\" : \"1\";
         $subject = \"RE: \".$tdata['thread_subject'];
         $result = dbquery(\"UPDATE \".$db_prefix.\"forums SET forum_lastpost='\".time().\"', forum_lastuser='\".$userdata['user_id'].\"' WHERE forum_id='$forum_id'\");
         $result = dbquery(\"UPDATE \".$db_prefix.\"threads SET thread_lastpost='\".time().\"', thread_lastuser='\".$userdata['user_id'].\"' WHERE thread_id='$thread_id'\");
         $result = dbquery(\"INSERT INTO \".$db_prefix.\"posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '\".$userdata['user_id'].\"', '\".time().\"', '\".USER_IP.\"', '0', '0')\");
         $newpost_id = mysql_insert_id();
         $result = dbquery(\"UPDATE \".$db_prefix.\"users SET user_posts=user_posts+1 WHERE user_id='\".$userdata['user_id'].\"'\");
         redirect(\"postify.php?post=reply&error=0&forum_id=$forum_id&thread_id=$thread_id&post_id=$newpost_id\");
      }
   }
}

opentable($locale['500']);
echo \"

\n\";
if (iMEMBER && $can_post) {
   echo \"\n\";
}
echo \"
\".$settings['sitename'].\" | $caption\n\";
   if (!$tdata['thread_locked']) {
      echo \"'\".$locale['565'].\"'\n\";
   }
   echo \"'\".$locale['566'].\"'
\n\";

$rows = dbcount(\"(thread_id)\", \"posts\", \"thread_id='$thread_id'\");

if (isset($pid) && isNum($pid)) {
   $reply_count = dbcount(\"(post_id)\", \"posts\", \"thread_id='\".$tdata['thread_id'].\"' AND post_id<='\".$pid.\"'\");
   if ($reply_count > $posts_per_page) $rowstart = ((ceil($reply_count / $posts_per_page)-1)*$posts_per_page);
}

if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;

if ($rows > $posts_per_page) {
   echo \"

\".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF.\"?forum_id=$forum_id&thread_id=$thread_id&\").\"
\n\";
}

echo \"\n\";

if ($rows != 0) {
   $result = dbquery(
      \"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM \".$db_prefix.\"posts p
      LEFT JOIN \".$db_prefix.\"forum_attachments fa USING(post_id)
      LEFT JOIN \".$db_prefix.\"users u ON p.post_author = u.user_id
      LEFT JOIN \".$db_prefix.\"users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
      WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page\"
   );
   $numrows = dbrows($result);
   while ($data = dbarray($result)) {
       $message = $data['post_message'];
      if ($data['post_showsig']) { $message = $message.\"\n\n
\".$data['user_sig']; }
      if ($data['post_smileys']) { $message = parsesmileys($message); }
      $message = parseubb($message);
      $message = nl2br($message);
      if ($data['post_edittime'] != \"0\") {
         $edituser = \"\".$data['edit_name'].\"\";
         $edittime = showdate(\"forumdate\", $data['post_edittime']);
      }
      $is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < \"102\" ? true : false;
      echo \"












\n\";
   }
}

echo \"
\".$locale['501'].\" \".$data['post_subject'].\"

\".$data['user_name'].\"

\".($is_mod ? $locale['userf1'] : getuserlevel($data['user_level'])).\"

\n\";
      if ($data['user_avatar'] != \"\") {
         echo \"'\".$locale['567'].\"'

\n\";
         $height = \"185\";
      } else {
         $height = \"70\";
      }
      echo \"\".$locale['502'].\" \".$data['user_posts'].\"
\n\";
# START
$countplius = dbcount(\"(type)\", \"reputation\", \" to_id='\".$data['user_id'].\"' AND type='1'\");
$countminus = dbcount(\"(type)\", \"reputation\", \" to_id='\".$data['user_id'].\"' AND type='0'\");
$counttotal = $countplius - $countminus;
echo \"Reputacija: \".$counttotal.\"\";
if (iMEMBER) {
echo \" [+$countplius/-$countminus]

\n\";
} else {
echo \"

\";
}
# END

      if ($data['user_location']) echo \"\".$locale['503'].\" \".$data['user_location'].\"
\n\";
      echo \"\".$locale['504'].\" \".showdate(\"%d.%m.%y\", $data['user_joined']).\"






\".$locale['505'].showdate(\"forumdate\", $data['post_datestamp']).\" \n\";
      if (iMEMBER && $can_post) {
         if (!$tdata['thread_locked']) {
            if ($userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
               echo \"'\".$locale['568'].\"'\n\";
            }
            echo \"'\".$locale['569'].\"'\n\";
            if (iMOD || iSUPERADMIN && $data['post_ip'] != \"0.0.0.0\" && file_exists(THEME.\"forum/ip.gif\")) echo \"'\".$locale['570'].\"'\n\";
         } else {
            if (iMOD || iSUPERADMIN) {
               echo \"'\".$locale['568'].\"'\n\";
               if ($data['post_ip'] != \"0.0.0.0\" && file_exists(THEME.\"forum/ip.gif\")) echo \"'\".$locale['570'].\"'\n\";
            }
         }
      }
      echo \"


$message\";
      if ($data['attach_id']) {
         if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM.\"attachments/\".$data['attach_name'])) {
            echo \"
\n\".$data['user_name'].$locale['506'].\"

\n\";
         } else {
            echo \"
\n\".$data['user_name'].$locale['507'].\"
\n\".$data['attach_name'].\"\";
         }
      }
      if ($data['post_edittime'] != \"0\") {
         echo \"
\n\".$locale['508'].$edituser.$locale['509'].\"$edittime\";
      }
echo \"
\n\";
      if ($data['user_aim']) {
         echo \"'\".$data['user_aim'].\"' \";
      }
      if ($data['user_icq']) {
         echo \"'\".$data['user_icq'].\"' \";
      }
      if ($data['user_msn']) {
         echo \"'\".$data['user_msn'].\"' \";
      }
      if ($data['user_yahoo']) {
         echo \"'\".$data['user_yahoo'].\"' \";
      }
      if ($data['user_web']) {
         if (!strstr($data['user_web'], \"http://\")) { $urlprefix = \"http://\"; } else { $urlprefix = \"\"; }
         echo \"'\".$data['user_web'].\"' \";
      }
      if (iMEMBER && $data['user_id'] != $userdata['user_id']) echo \"'\".$locale['571'].\"'\n\";
echo \"
\n\";

if ($rows > $posts_per_page) {
   echo \"

\".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF.\"?forum_id=$forum_id&thread_id=$thread_id&\").\"
\n\";
}

echo \"\n\n\";
$forum_list = \"\"; $current_cat = \"\";
$result = dbquery(
   \"SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name
   FROM \".$db_prefix.\"forums f
   INNER JOIN \".$db_prefix.\"forums f2 ON f.forum_cat=f2.forum_id
   WHERE \".groupaccess('f.forum_access').\" AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC\"
);
while ($data = dbarray($result)) {
   if ($data['forum_cat_name'] != $current_cat) {
      if ($current_cat != \"\") $forum_list .= \"\n\";
      $current_cat = $data['forum_cat_name'];
      $forum_list .= \"\n\";
   }
   $sel = ($data['forum_id'] == $fdata['forum_id'] ? \" selected\" : \"\");
   $forum_list .= \"\n\";
}
$forum_list .= \"
\n\";
echo \"\n\";

if (iMEMBER && $can_post) {
   if (iMOD || iSUPERADMIN) {
      echo \"
\n\";
   }
}
echo \"
\".$locale['540'].\"



\".$locale['520'].\"




\n\";
if (iMEMBER) {
   echo \"\n\n\";
   if ($settings['thread_notify']) {
      echo \"\n\";
   }
   if ($can_post) {
      echo \"\n\";
   }
   echo \"\n
\";
      if (dbcount(\"(thread_id)\", \"thread_notify\", \"thread_id='$thread_id' AND notify_user='\".$userdata['user_id'].\"'\")) {
         $result = dbquery(\"UPDATE \".$db_prefix.\"thread_notify SET notify_datestamp='\".time().\"', notify_status='1' WHERE thread_id='$thread_id' AND notify_user='\".$userdata['user_id'].\"'\");
         $notify_link = \"\".$locale['515'].\"\";
      } else {
         $notify_link = \"\".$locale['516'].\"\";
      }
      echo \"$notify_link
\";
      if (!$tdata['thread_locked']) {
         echo \"'\".$locale['565'].\"'\n\";
      }
      echo \"'\".$locale['566'].\"'\n\";
      echo \"
\n\";
}
closetable();
tablebreak();

if (iMEMBER && $can_post && !$tdata['thread_locked']) {
   opentable($locale['512']);
   echo \"













>', '');\\">
>', '');\\">
>', '');\\">
>
>
>
>
>', '');\\">
>
Download source  Code
', '


');\\">
>', '');\\">
\".displaysmileys(\"message\").\"

\".$locale['513'].\"

\n\";
   closetable();
}

echo \"\n\";

require_once BASEDIR.\"side_right.php\";
require_once BASEDIR.\"footer.php\";
?>



[url="http://andrejus.eu"]Andrejaus tinklalapis[/url] - Naujienos apie IT, grafika bei daug kit "geek" straipsni
Dmesio!!! Kuriu modulius php-fusion, ra?ykit e-pa?t arba privai ?inut.
 
PM
bliogis
#3 Spausdinti pranešimą
parašyta 2008-04-11 20:13
Naujokas



Reputacija: 0

Pranešimai: 2
Įstojo: 2008-02-14

meta erora kaip bandau ijaiti i foruma db
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/hsgame/hs-game.xz.lt/forum/viewthread.php on line 164
 
PM
Paranoja
#4 Spausdinti pranešimą
parašyta 2008-04-11 22:28
Vartotojo avataras

Draugas



Reputacija: 0

Pranešimai: 302
Įstojo: 2007-06-12

Download source  Code
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once \"../maincore.php\";
require_once INCLUDES.\"forum_functions_include.php\";
require_once BASEDIR.\"subheader.php\";
require_once BASEDIR.\"side_left.php\";
include LOCALE.LOCALESET.\"forum/main.php\";

$posts_per_page = 20;

if (!FUSION_QUERY || !isset($forum_id) || !isNum($forum_id) || !isset($thread_id) || !isNum($thread_id)) fallback(\"index.php\");

$result = dbquery(
   \"SELECT f.*, f2.forum_name AS forum_cat_name
   FROM \".$db_prefix.\"forums f
   LEFT JOIN \".$db_prefix.\"forums f2 ON f.forum_cat=f2.forum_id
   WHERE f.forum_id='\".$forum_id.\"'\"
);
if (dbrows($result)) {
   $fdata = dbarray($result);
   if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) fallback(\"index.php\");
} else {
   fallback(\"index.php\");
}
$can_post = checkgroup($fdata['forum_posting']);

$forum_mods = explode(\".\", $fdata['forum_moderators']);
if (iMEMBER && in_array($userdata['user_id'], $forum_mods)) { define(\"iMOD\", true); } else { define(\"iMOD\", false); }

$result = dbquery(\"SELECT * FROM \".$db_prefix.\"threads WHERE thread_id='\".$thread_id.\"' AND forum_id='\".$fdata['forum_id'].\"'\");
if (dbrows($result)) { $tdata = dbarray($result); } else { fallback(\"index.php\"); }

$caption = $fdata['forum_cat_name'].\" | \".$fdata['forum_name'].\"\";
$result = dbquery(\"UPDATE \".$db_prefix.\"threads SET thread_views=thread_views+1 WHERE thread_id='$thread_id'\");

if (iMEMBER && $can_post && !$tdata['thread_locked'] && isset($_POST['postquickreply'])) {
   $flood = false;
   $message = stripinput(censorwords($_POST['message']));
   if ($message != \"\") {
      $result = dbquery(\"SELECT MAX(post_datestamp) AS last_post FROM \".$db_prefix.\"posts WHERE post_author='\".$userdata['user_id'].\"'\");
      if (dbrows($result) > 0) {
         $data = dbarray($result);
         if ((time() - $data['last_post']) < $settings['flood_interval']) {
            $flood = true;
            $result = dbquery(\"INSERT INTO \".$db_prefix.\"flood_control (flood_ip, flood_timestamp) VALUES ('\".USER_IP.\"', '\".time().\"')\");
            if (dbcount(\"(flood_ip)\", \"flood_control\", \"flood_ip='\".USER_IP.\"'\") > 4) {
               $result = dbquery(\"UPDATE \".$db_prefix.\"users SET user_status='1' WHERE user_id='\".$userdata['user_id'].\"'\");
            }
            fallback(\"viewforum.php?forum_id=$forum_id\");
         }
      }
      if (!$flood) {
         $sig = ($userdata['user_sig'] ? '1' :'0');
         $smileys = isset($_POST['disable_smileys']) ? \"0\" : \"1\";
         $subject = \"RE: \".$tdata['thread_subject'];
         $result = dbquery(\"UPDATE \".$db_prefix.\"forums SET forum_lastpost='\".time().\"', forum_lastuser='\".$userdata['user_id'].\"' WHERE forum_id='$forum_id'\");
         $result = dbquery(\"UPDATE \".$db_prefix.\"threads SET thread_lastpost='\".time().\"', thread_lastuser='\".$userdata['user_id'].\"' WHERE thread_id='$thread_id'\");
         $result = dbquery(\"INSERT INTO \".$db_prefix.\"posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '\".$userdata['user_id'].\"', '\".time().\"', '\".USER_IP.\"', '0', '0')\");
         $newpost_id = mysql_insert_id();
         $result = dbquery(\"UPDATE \".$db_prefix.\"users SET user_posts=user_posts+1 WHERE user_id='\".$userdata['user_id'].\"'\");
         redirect(\"postify.php?post=reply&error=0&forum_id=$forum_id&thread_id=$thread_id&post_id=$newpost_id\");
      }
   }
}

opentable($locale['500']);
echo \"

\n\";
if (iMEMBER && $can_post) {
   echo \"\n\";
}
echo \"
\".$settings['sitename'].\" | $caption\n\";
   if (!$tdata['thread_locked']) {
      echo \"'\".$locale['565'].\"'\n\";
   }
   echo \"'\".$locale['566'].\"'
\n\";

$rows = dbcount(\"(thread_id)\", \"posts\", \"thread_id='$thread_id'\");

if (isset($pid) && isNum($pid)) {
   $reply_count = dbcount(\"(post_id)\", \"posts\", \"thread_id='\".$tdata['thread_id'].\"' AND post_id<='\".$pid.\"'\");
   if ($reply_count > $posts_per_page) $rowstart = ((ceil($reply_count / $posts_per_page)-1)*$posts_per_page);
}

if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;

if ($rows > $posts_per_page) {
   echo \"

\".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF.\"?forum_id=$forum_id&thread_id=$thread_id&\").\"
\n\";
}

echo \"\n\";

if ($rows != 0) {
   $result = dbquery(
      \"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM \".$db_prefix.\"posts p
      LEFT JOIN \".$db_prefix.\"forum_attachments fa USING(post_id)
      LEFT JOIN \".$db_prefix.\"users u ON p.post_author = u.user_id
      LEFT JOIN \".$db_prefix.\"users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
      WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page\"
   );
   $numrows = dbrows($result);
   while ($data = dbarray($result)) {
       $message = $data['post_message'];
      if ($data['post_showsig']) { $message = $message.\"\n\n
\".$data['user_sig']; }
      if ($data['post_smileys']) { $message = parsesmileys($message); }
      $message = parseubb($message);
      $message = nl2br($message);
      if ($data['post_edittime'] != \"0\") {
         $edituser = \"\".$data['edit_name'].\"\";
         $edittime = showdate(\"forumdate\", $data['post_edittime']);
      }
      $is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < \"102\" ? true : false;
      echo \"












\n\";
   }
}

echo \"
\".$locale['501'].\" \".$data['post_subject'].\"

\".$data['user_name'].\"

\".($is_mod ? $locale['userf1'] : getuserlevel($data['user_level'])).\"

\n\";
      if ($data['user_avatar'] != \"\") {
         echo \"'\".$locale['567'].\"'

\n\";
         $height = \"185\";
      } else {
         $height = \"70\";
      }
      echo \"\".$locale['502'].\" \".$data['user_posts'].\"
\n\";
# START
$countplius = dbcount(\"(type)\", \"reputation\", \" to_id='\".$data['user_id'].\"' AND type='1'\");
$countminus = dbcount(\"(type)\", \"reputation\", \" to_id='\".$data['user_id'].\"' AND type='0'\");
$counttotal = $countplius - $countminus;
echo \"Reputacija: \".$counttotal.\"\";
if (iMEMBER) {
echo \" [+$countplius/-$countminus]

\n\";
} else {
echo \"

\";
}
# END

      if ($data['user_location']) echo \"\".$locale['503'].\" \".$data['user_location'].\"
\n\";
      echo \"\".$locale['504'].\" \".showdate(\"%d.%m.%y\", $data['user_joined']).\"






\".$locale['505'].showdate(\"forumdate\", $data['post_datestamp']).\" \n\";
      if (iMEMBER && $can_post) {
         if (!$tdata['thread_locked']) {
            if ($userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
               echo \"'\".$locale['568'].\"'\n\";
            }
            echo \"'\".$locale['569'].\"'\n\";
            if (iMOD || iSUPERADMIN && $data['post_ip'] != \"0.0.0.0\" && file_exists(THEME.\"forum/ip.gif\")) echo \"'\".$locale['570'].\"'\n\";
         } else {
            if (iMOD || iSUPERADMIN) {
               echo \"'\".$locale['568'].\"'\n\";
               if ($data['post_ip'] != \"0.0.0.0\" && file_exists(THEME.\"forum/ip.gif\")) echo \"'\".$locale['570'].\"'\n\";
            }
         }
      }
      echo \"


$message\";
      if ($data['attach_id']) {
         if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM.\"attachments/\".$data['attach_name'])) {
            echo \"
\n\".$data['user_name'].$locale['506'].\"

\n\";
         } else {
            echo \"
\n\".$data['user_name'].$locale['507'].\"
\n\".$data['attach_name'].\"\";
         }
      }
      if ($data['post_edittime'] != \"0\") {
         echo \"
\n\".$locale['508'].$edituser.$locale['509'].\"$edittime\";
      }
echo \"
\n\";
      if ($data['user_aim']) {
         echo \"'\".$data['user_aim'].\"' \";
      }
      if ($data['user_icq']) {
         echo \"'\".$data['user_icq'].\"' \";
      }
      if ($data['user_msn']) {
         echo \"'\".$data['user_msn'].\"' \";
      }
      if ($data['user_yahoo']) {
         echo \"'\".$data['user_yahoo'].\"' \";
      }
      if ($data['user_web']) {
         if (!strstr($data['user_web'], \"http://\")) { $urlprefix = \"http://\"; } else { $urlprefix = \"\"; }
         echo \"'\".$data['user_web'].\"' \";
      }
      if (iMEMBER && $data['user_id'] != $userdata['user_id']) echo \"'\".$locale['571'].\"'\n\";
echo \"
\n\";

if ($rows > $posts_per_page) {
   echo \"

\".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF.\"?forum_id=$forum_id&thread_id=$thread_id&\").\"
\n\";
}

echo \"\n\n\";
$forum_list = \"\"; $current_cat = \"\";
$result = dbquery(
   \"SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name
   FROM \".$db_prefix.\"forums f
   INNER JOIN \".$db_prefix.\"forums f2 ON f.forum_cat=f2.forum_id
   WHERE \".groupaccess('f.forum_access').\" AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC\"
);
while ($data = dbarray($result)) {
   if ($data['forum_cat_name'] != $current_cat) {
      if ($current_cat != \"\") $forum_list .= \"\n\";
      $current_cat = $data['forum_cat_name'];
      $forum_list .= \"\n\";
   }
   $sel = ($data['forum_id'] == $fdata['forum_id'] ? \" selected\" : \"\");
   $forum_list .= \"\n\";
}
$forum_list .= \"
\n\";
echo \"\n\";

if (iMEMBER && $can_post) {
   if (iMOD || iSUPERADMIN) {
      echo \"
\n\";
   }
}
echo \"
\".$locale['540'].\"



\".$locale['520'].\"




\n\";
if (iMEMBER) {
   echo \"\n\n\";
   if ($settings['thread_notify']) {
      echo \"\n\";
   }
   if ($can_post) {
      echo \"\n\";
   }
   echo \"\n
\";
      if (dbcount(\"(thread_id)\", \"thread_notify\", \"thread_id='$thread_id' AND notify_user='\".$userdata['user_id'].\"'\")) {
         $result = dbquery(\"UPDATE \".$db_prefix.\"thread_notify SET notify_datestamp='\".time().\"', notify_status='1' WHERE thread_id='$thread_id' AND notify_user='\".$userdata['user_id'].\"'\");
         $notify_link = \"\".$locale['515'].\"\";
      } else {
         $notify_link = \"\".$locale['516'].\"\";
      }
      echo \"$notify_link
\";
      if (!$tdata['thread_locked']) {
         echo \"'\".$locale['565'].\"'\n\";
      }
      echo \"'\".$locale['566'].\"'\n\";
      echo \"
\n\";
}
closetable();
tablebreak();

if (iMEMBER && $can_post && !$tdata['thread_locked']) {
   opentable($locale['512']);
   echo \"













>
>
>
>
>
>
>
>
>
>
\".displaysmileys(\"message\").\"

\".$locale['513'].\"

\n\";
   closetable();
}

echo \"\n\";

require_once BASEDIR.\"side_right.php\";
require_once BASEDIR.\"footer.php\";
?>





Ten kur zalia spalva paryskinau , nuimk tarpus ant bb kodu , pvz > [ b] [ /b] , ties [ ir b tarbas ir [ /b tarpas , juos pasalink , ir tiap ant visu kurie zaliai pabresti ...



Zodziu jei nesupranti te prisegu ....
Paranoja prisegė šį failą:
viewthread.zip
Redagavo Paranoja 2008-04-11 22:33
 
PM
Peršokti į forumą: