PHP-Fusion Mods
Navigacija
Apsauga
Apsauga Neleista registracija: 45220
Šiandien: 39
Prisijungę nariai
» Svečių: 7
» Narių: 0

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

Prisijungimų istorija:
Zbigniew@ 1 Diena
tabuxnepamenu
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ą
PHP-Fusion Mods :: PHP-Fusion modifikacijų forumas :: Modifikacijų, įskiepių diegimas
 Spausdinti temą
V7 Reikalinga pagalba su Vip
Rinas
#41 Spausdinti pranešimą
parašyta 2010-02-05 16:38
Administratorius



Reputacija: 0

Pranešimai: 204
Įstojo: 2009-06-10

Oi, klaidà buvau padaræs. Pataisiau. Nustatyk dar ir grupës ID. Dël ?aukyklos ir online duok kodus.

Download source  Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: viewthread.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once \"../maincore.php\";
require_once INCLUDES.\"forum_include.php\";
require_once THEMES.\"templates/header.php\";
include LOCALE.LOCALESET.\"forum/main.php\";

$vip = \"''\"; //VIP paveiksliukas
$grupe = 1; //VIP grupes ID

$posts_per_page = 20;

add_to_title($locale['global_200'].$locale['400']);

if (!isset($_GET['thread_id']) || !isnum($_GET['thread_id'])) { redirect(\"index.php\"); }

if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }

$result = dbquery(
   \"SELECT t.*, f.*, f2.forum_name AS forum_cat_name
   FROM \".DB_THREADS.\" t
   LEFT JOIN \".DB_FORUMS.\" f ON t.forum_id=f.forum_id
   LEFT JOIN \".DB_FORUMS.\" f2 ON f.forum_cat=f2.forum_id
   WHERE t.thread_id='\".$_GET['thread_id'].\"'\"
);
if (dbrows($result)) {
   $fdata = dbarray($result);
   if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) { redirect(\"index.php\"); }
} else {
   redirect(\"index.php\");
}

if ($fdata['forum_post'] != 0 && checkgroup($fdata['forum_post'])) {
   $can_post = true;
} else {
   $can_post = false;
}

if ($fdata['forum_reply'] != 0 && checkgroup($fdata['forum_reply'])) {
   $can_reply = true;
} else {
   $can_reply = false;
}

if ($settings['forum_edit_lock'] == 1) {
   $lock_edit = true;
} else {
   $lock_edit = false;
}

//locale dependent forum buttons
if (is_array($fusion_images)) {
   if ($settings['locale'] != \"English\") {
      $newpath = \"\";
      $oldpath = explode(\"/\", $fusion_images['newthread']);
      for ($i = 0; $i < count($oldpath) - 1; $i++) {
         $newpath .= $oldpath[$i].\"/\";
      }
      if (is_dir($newpath.$settings['locale'])) {
         redirect_img_dir($newpath, $newpath.$settings['locale'].\"/\");
      }
   }
}
//locale dependent forum buttons

$mod_groups = explode(\".\", $fdata['forum_moderators']);

if (iSUPERADMIN) { define(\"iMOD\", true); }

if (!defined(\"iMOD\") && iMEMBER && $fdata['forum_moderators']) {
   foreach ($mod_groups as $mod_group) {
      if (!defined(\"iMOD\") && checkgroup($mod_group)) { define(\"iMOD\", true); }
   }
}

if (!defined(\"iMOD\")) { define(\"iMOD\", false); }

if (iMEMBER) {
   $thread_match = $fdata['thread_id'].\"\|\".$fdata['thread_lastpost'].\"\|\".$fdata['forum_id'];
   if (($fdata['thread_lastpost'] > $lastvisited) && !preg_match(\"(^\.{$thread_match}$|\.{$thread_match}\.|\.{$thread_match}$)\", $userdata['user_threads'])) {
      $result = dbquery(\"UPDATE \".DB_USERS.\" SET user_threads='\".$userdata['user_threads'].\".\".stripslashes($thread_match).\"' WHERE user_id='\".$userdata['user_id'].\"'\");
   }
}

$result = dbquery(\"UPDATE \".DB_THREADS.\" SET thread_views=thread_views+1 WHERE thread_id='\".$_GET['thread_id'].\"'\");

if ((iMOD || iSUPERADMIN) && isset($_POST['delete_posts']) && (isset($_POST['delete_post'])) && is_array($_POST['delete_post']) && count($_POST['delete_post'])) {
   $del_posts = \"\"; $i = 0; $post_count = 0;
   foreach ($_POST['delete_post'] as $del_post_id) {
      if (isnum($del_post_id)) { $del_posts .= ($del_posts ? \",\" : \"\").$del_post_id; $i++; }
   }
   if ($del_posts) {
      $result = dbquery(\"SELECT post_author, COUNT(post_id) as num_posts FROM \".DB_POSTS.\" WHERE post_id IN (\".$del_posts.\") GROUP BY post_author\");
      if (dbrows($result)) {
         while ($pdata = dbarray($result)) {
            $result2 = dbquery(\"UPDATE \".DB_USERS.\" SET user_posts=user_posts-\".$pdata['num_posts'].\" WHERE user_id='\".$pdata['post_author'].\"'\");
            $post_count = $post_count + $pdata['num_posts'];
         }
      }
      $result = dbquery(\"SELECT attach_name FROM \".DB_FORUM_ATTACHMENTS.\" WHERE post_id IN (\".$del_posts.\")\");
      if (dbrows($result)) {
         while ($data = dbarray($result)) {
            unlink(FORUM.\"attachments/\".$data['attach_name']);
         }
      }
      $result = dbquery(\"DELETE FROM \".DB_FORUM_ATTACHMENTS.\" WHERE thread_id='\".$_GET['thread_id'].\"' AND post_id IN(\".$del_posts.\")\");
      $result = dbquery(\"DELETE FROM \".DB_POSTS.\" WHERE thread_id='\".$_GET['thread_id'].\"' AND post_id IN(\".$del_posts.\")\");
   }
   if (!dbcount(\"(post_id)\", DB_POSTS, \"thread_id='\".$_GET['thread_id'].\"'\")) {
      $result = dbquery(\"DELETE FROM \".DB_THREADS.\" WHERE thread_id='\".$_GET['thread_id'].\"'\");
      $result = dbquery(\"DELETE FROM \".DB_THREAD_NOTIFY.\" WHERE thread_id='\".$_GET['thread_id'].\"'\");
      $result = dbquery(\"DELETE FROM \".DB_FORUM_POLL_VOTERS.\" WHERE thread_id='\".$_GET['thread_id'].\"'\");
      $result = dbquery(\"DELETE FROM \".DB_FORUM_POLL_OPTIONS.\" WHERE thread_id='\".$_GET['thread_id'].\"'\");
      $result = dbquery(\"DELETE FROM \".DB_FORUM_POLLS.\" WHERE thread_id='\".$_GET['thread_id'].\"'\");
      $thread_count = false;
   } else {
      $result = dbquery(\"SELECT post_datestamp, post_author, post_id FROM \".DB_POSTS.\" WHERE thread_id='\".$_GET['thread_id'].\"' ORDER BY post_datestamp DESC LIMIT 1\");
      $ldata = dbarray($result);
      $result = dbquery(\"UPDATE \".DB_THREADS.\" SET thread_lastpost='\".$ldata['post_datestamp'].\"', thread_lastpostid='\".$ldata['post_id'].\"', thread_postcount=thread_postcount-1, thread_lastuser='\".$ldata['post_author'].\"' WHERE thread_id='\".$_GET['thread_id'].\"'\");
      $thread_count = true; unset($ldata);
   }
   $result = dbquery(\"SELECT post_datestamp, post_author FROM \".DB_POSTS.\" WHERE forum_id='\".$fdata['forum_id'].\"' ORDER BY post_datestamp DESC LIMIT 1\");
   if (dbrows($result)) {
      $ldata = dbarray($result);
      $forum_lastpost = \"forum_lastpost='\".$ldata['post_datestamp'].\"', forum_lastuser='\".$ldata['post_author'].\"'\";
   } else {
      $forum_lastpost = \"forum_lastpost='0', forum_lastuser='0'\";
   }
   $result = dbquery(\"UPDATE \".DB_FORUMS.\" SET \".$forum_lastpost.(!$thread_count ? \"forum_threadcount=forum_threadcount-1,\" : \",\").\" forum_postcount=forum_postcount-\".$post_count.\" WHERE forum_id = '\".$fdata['forum_id'].\"'\");
   if (!$thread_count) { redirect(\"viewforum.php?forum_id=\".$fdata['forum_id']); }
}

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

$caption = $fdata['forum_cat_name'].\" :: \".$fdata['forum_name'].\"\";

if (iMEMBER && isset($_POST['cast_vote']) && (isset($_POST['poll_option']) && isnum($_POST['poll_option']))) {
   $result = dbquery(\"SELECT * FROM \".DB_FORUM_POLL_VOTERS.\" WHERE forum_vote_user_id='\".$userdata['user_id'].\"' AND thread_id='\".$_GET['thread_id'].\"'\");
   if (!dbrows($result)) {
      $result = dbquery(\"UPDATE \".DB_FORUM_POLL_OPTIONS.\" SET forum_poll_option_votes=forum_poll_option_votes+1 WHERE thread_id='\".$_GET['thread_id'].\"' AND forum_poll_option_id='\".$_POST['poll_option'].\"'\");
      $result = dbquery(\"UPDATE \".DB_FORUM_POLLS.\" SET forum_poll_votes=forum_poll_votes+1 WHERE thread_id='\".$_GET['thread_id'].\"'\");
      $result = dbquery(\"INSERT INTO \".DB_FORUM_POLL_VOTERS.\" (thread_id, forum_vote_user_id, forum_vote_user_ip) VALUES ('\".$_GET['thread_id'].\"', '\".$userdata['user_id'].\"', '\".USER_IP.\"')\");
   }
   redirect(FUSION_SELF.\"?thread_id=\".$_GET['thread_id']);
}

if (iMEMBER && $can_reply && !$fdata['thread_locked'] && isset($_POST['postquickreply'])) {
   $message = stripinput(censorwords($_POST['message']));
   if ($message != \"\") {
      require_once INCLUDES.\"flood_include.php\";
      if (!flood_control(\"post_datestamp\", DB_POSTS, \"post_author='\".$userdata['user_id'].\"'\")) {
         $sig = ($userdata['user_sig'] ? '1' :'0');
         $smileys = isset($_POST['disable_smileys']) || preg_match(\"#\[code\](.*?)\[/code\]#si\", $message) ? \"0\" : \"1\";
         $result = dbquery(\"INSERT INTO \".DB_POSTS.\" (forum_id, thread_id, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('\".$fdata['forum_id'].\"', '\".$_GET['thread_id'].\"', '$message', '$sig', '$smileys', '\".$userdata['user_id'].\"', '\".time().\"', '\".USER_IP.\"', '0', '0')\");
         $newpost_id = mysql_insert_id();
         $result = dbquery(\"UPDATE \".DB_FORUMS.\" SET forum_lastpost='\".time().\"', forum_postcount=forum_postcount+1, forum_lastuser='\".$userdata['user_id'].\"' WHERE forum_id='\".$fdata['forum_id'].\"'\");
         $result = dbquery(\"UPDATE \".DB_THREADS.\" SET thread_lastpost='\".time().\"', thread_lastpostid='\".$newpost_id.\"', thread_postcount=thread_postcount+1, thread_lastuser='\".$userdata['user_id'].\"' WHERE thread_id='\".$_GET['thread_id'].\"'\");
         $result = dbquery(\"UPDATE \".DB_USERS.\" SET user_posts=user_posts+1 WHERE user_id='\".$userdata['user_id'].\"'\");
         redirect(\"postify.php?post=reply&error=0&forum_id=\".$fdata['forum_id'].\"&thread_id=\".$_GET['thread_id'].\"&post_id=$newpost_id\");
      } else {
         redirect(\"viewthread.php?thread_id=\".$_GET['thread_id']);
      }
   }
}

$rows = dbcount(\"(thread_id)\", DB_POSTS, \"thread_id='\".$_GET['thread_id'].\"'\");

$last_post = dbarray(dbquery(\"SELECT post_id FROM \".DB_POSTS.\" WHERE thread_id='\".$_GET['thread_id'].\"' ORDER BY post_datestamp DESC LIMIT 1\"));

opentable($locale['500']);
echo \"
\".$settings['sitename'].\" :: \".$caption.\"
\n\";

if (($rows > $posts_per_page) || ($can_post || $can_reply)) {
   echo \"\n\n\";
   if ($rows > $posts_per_page) { echo \"\n\"; }
   if (iMEMBER && $can_post) {
      echo \"\n\";
      }
   }
   echo \"\n
\".makePageNav($_GET['rowstart'],$posts_per_page,$rows,3,FUSION_SELF.\"?thread_id=\".$_GET['thread_id'].\"&\").\"\n\";
      if (!$fdata['thread_locked'] && $can_reply) {
         echo \"'\".$locale['565'].\"'\n\";
      }
      if ($can_post) {
         echo \"'\".$locale['566'].\"'\n
\n\";
}

if ($rows != 0) {
   if ($_GET['rowstart'] == 0 && $fdata['thread_poll'] == \"1\") {
      if (iMEMBER) {
         $presult = dbquery(
            \"SELECT tfp.*, tfv.forum_vote_user_id FROM \".DB_FORUM_POLLS.\" tfp
            LEFT JOIN \".DB_FORUM_POLL_VOTERS.\" tfv
            ON tfp.thread_id=tfv.thread_id AND forum_vote_user_id='\".$userdata['user_id'].\"'
            WHERE tfp.thread_id='\".$_GET['thread_id'].\"'\"
         );
      } else {
         $presult = dbquery(
            \"SELECT tfp.* FROM \".DB_FORUM_POLLS.\" tfp
            WHERE tfp.thread_id='\".$_GET['thread_id'].\"'\"
         );
      }
      if (dbrows($presult)) {
         $pdata = dbarray($presult); $i = 1;
         if (iMEMBER) { echo \"
\n\"; }
         echo \"\n\n\";
         echo \"\n\n\n\n\n
\".$pdata['forum_poll_title'].\"
\n\";
         echo \"\n\";
         $presult = dbquery(\"SELECT * FROM \".DB_FORUM_POLL_OPTIONS.\" WHERE thread_id='\".$_GET['thread_id'].\"' ORDER BY forum_poll_option_id ASC\");
         $poll_options = dbrows($presult);
         while ($pvdata = dbarray($presult)) {
            if ((iMEMBER && isset($pdata['forum_vote_user_id']) || (!$fdata['forum_vote'] || !checkgroup($fdata['forum_vote'])))) {
               $option_votes = ($pdata['forum_poll_votes'] ? number_format(100 / $pdata['forum_poll_votes'] * $pvdata['forum_poll_option_votes']) : 0);
               echo \"\n\n\";
               echo \"\n\";
               echo \"\n\n\";
            } else {
               echo \"\n\n\n\";
               $i++;
            }
         }
         if ((iMEMBER && isset($pdata['forum_vote_user_id']) || (!$fdata['forum_vote'] || !checkgroup($fdata['forum_vote'])))) {
            echo \"\n\n\n\";
         } else {
            echo \"\n\n\n\";
         }
         echo \"
\".$pvdata['forum_poll_option_text'].\"'\".$pvdata['forum_poll_option_text'].\"'\".$option_votes.\"%[\".$pvdata['forum_poll_option_votes'].\" \".($pvdata['forum_poll_option_votes'] == 1 ? $locale['global_133'] : $locale['global_134']).\"]
\".$locale['480'].\" : \".$pdata['forum_poll_votes'].\"
\n
\n\";
         if (iMEMBER) { echo \"
\n\"; }
      }
   }
   $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_POSTS.\" p
      LEFT JOIN \".DB_FORUM_ATTACHMENTS.\" fa USING(post_id)
      LEFT JOIN \".DB_USERS.\" u ON p.post_author = u.user_id
      LEFT JOIN \".DB_USERS.\" u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
      WHERE p.thread_id='\".$_GET['thread_id'].\"' ORDER BY post_datestamp LIMIT \".$_GET['rowstart'].\",$posts_per_page\"
   );
   if (iMOD) { echo \"
\n\"; }
   echo \"\n\";
   $numrows = dbrows($result);
   $current_row = 1;
   while ($data = dbarray($result)) {
      $message = $data['post_message'];
      if ($data['post_smileys']) { $message = parsesmileys($message); }
      if ($current_row == 1) {
         echo \"\n\n\n\";
      }
      echo \"\n\";
      if ($current_row > 1) { echo \"\n\n\n\"; }
   $grupes = explode(\".\", $data['user_groups']);
   if (in_array($grupe, $grupes)) $vipas = true; else $vipas = false;
      echo \"\n\n\";
      echo \"\n\";
      echo \"\n\n\n\n\n\";
      echo \"\n\n\n\n\";
      $current_row++;
   }
}

echo \"
\n
\";
         if (iMEMBER && $settings['thread_notify']) {
            if (dbcount(\"(thread_id)\", DB_THREAD_NOTIFY, \"thread_id='\".$_GET['thread_id'].\"' AND notify_user='\".$userdata['user_id'].\"'\")) {
               $result2 = dbquery(\"UPDATE \".DB_THREAD_NOTIFY.\" SET notify_datestamp='\".time().\"', notify_status='1' WHERE thread_id='\".$_GET['thread_id'].\"' AND notify_user='\".$userdata['user_id'].\"'\");
               echo \"\".$locale['515'].\"\";
            } else {
               echo \"\".$locale['516'].\"\";
            }
         }
         echo \" '\".$locale['519'].\"'
\n\";
         add_to_title($locale['global_201'].$fdata['thread_subject']);
         echo \"
\".$fdata['thread_subject'].\"
\n
\".$data['user_name'].($vipas ? $vip : \"\").\"\n\";
      echo \"\n\";
      echo \"
\".$locale['505'].showdate(\"forumdate\", $data['post_datestamp']).\"
\n\";
      echo \"
\n\";
      if ($data['user_avatar'] && file_exists(IMAGES.\"avatars/\".$data['user_avatar'])) {
         echo \"'\".$locale['567'].\"'

\n\";
      }
      echo \"\";
      if ($data['user_level'] >= 102) {
         echo $settings['forum_ranks'] ? show_forum_rank($data['user_posts'], $data['user_level']) : getuserlevel($data['user_level']);
      } else {
         $is_mod = false;
         foreach ($mod_groups as $mod_group) {
            if (!$is_mod && preg_match(\"(^\.{$mod_group}$|\.{$mod_group}\.|\.{$mod_group}$)\", $data['user_groups'])) {
               $is_mod = true;
            }
         }
         if ($settings['forum_ranks']) {
            echo $is_mod ? show_forum_rank($data['user_posts'], 104) : show_forum_rank($data['user_posts'], $data['user_level']);
         } else {
            echo $is_mod ? $locale['user1'] : getuserlevel($data['user_level']);
         }
      }
      echo \"


\n\";
      echo \"\".$locale['502'].\" \".$data['user_posts'].\"
\n\";
      echo \"\".$locale['504'].\" \".showdate(\"%d.%m.%y\", $data['user_joined']).\"
\n\";
      echo \"
\n\";
      if (iMOD) { echo \"
\n\"; }
      echo nl2br(parseubb($message));
      echo \"\";
      if ($data['attach_id']) {
         if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM.\"attachments/\".$data['attach_name'])) {
            echo \"\n
\n\".$data['user_name'].$locale['506'].\"

\n\".display_image($data['attach_name']).\"
[\".parsebytesize(filesize(FORUM.\"attachments/\".$data['attach_name'])).\"]\n\";
         } else {
            echo \"\n
\n\".$data['user_name'].$locale['507'].\"
\n\".$data['attach_name'].\"\";
         }
      }
      if ($data['post_edittime'] != \"0\") {
         echo \"\n
\n\".$locale['508'].\"\".$data['edit_name'].\"\".$locale['509'].showdate(\"forumdate\", $data['post_edittime']);
      }
      if ($data['post_showsig'] && array_key_exists(\"user_sig\", $data) && $data['user_sig']) {
         echo \"\n
\".nl2br(parseubb(parsesmileys($data['user_sig']), \"b|i|u||center|small|url|mail|img|color\"));
      }
      echo \"
\";
      if (($settings['forum_ips'] && iMEMBER) || iMOD) { echo \"\".$locale['571'].\": \".$data['post_ip']; } else { echo \" \"; }
      echo \"
\n
\n\";
      if (array_key_exists(\"user_web\", $data) && $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['572'].\"'\n\";
      }
      echo \"
\n
\";
      if (iMEMBER && ($can_post || $can_reply)) {
         if (!$fdata['thread_locked']) {
            echo \"'\".$locale['569'].\"'\n\";
            if (iMOD || ($lock_edit && $last_post['post_id'] == $data['post_id'] && $userdata['user_id'] == $data['post_author']) || (!$lock_edit && $userdata['user_id'] == $data['post_author'])) {
               echo \"'\".$locale['568'].\"'\n\";
            }
         } else {
            if (iMOD) {
               echo \"'\".$locale['568'].\"'\n\";
            }
         }
      }
      echo \"
\n
\n\";

if (iMOD) {
   echo \"\n\n\n\";
   echo \"\n\";
   echo \"\n
\";
   echo \">\".$locale['460'].\" ::\n\";
   echo \">\".$locale['461'].\"
>
\n
\n\";
}

if ($rows > $posts_per_page) {
   echo \"
\n\";
   echo makePageNav($_GET['rowstart'],$posts_per_page,$rows,3,FUSION_SELF.\"?thread_id=\".$_GET['thread_id'].(isset($_GET['highlight']) ? \"&highlight=\".urlencode($_GET['highlight']):\"\").\"&\").\"\n\";
   echo \"
\n\";
}

$forum_list = \"\"; $current_cat = \"\";
$result = dbquery(
   \"SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name
   FROM \".DB_FORUMS.\" f
   INNER JOIN \".DB_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='selected'\" : \"\");
   $forum_list .= \"\n\";
}
$forum_list .= \"
\n\";
if (iMOD) { echo \"
\n\"; }
echo \"\n\n\";
echo \"\n\";

if (iMOD) {
   echo \"\n\";
}
echo \"\n
\".$locale['540'].\"
\n\";
echo \"
\n\";
   echo $locale['520'].\"
\n\n\n\";
   echo \"
\n\"; if (iMOD) { echo \"
\n\"; }

if ($can_post || $can_reply) {
   echo \"\n\n\";
   echo \"\n\n
\";
   if (!$fdata['thread_locked'] && $can_reply) {
      echo \"'\".$locale['565'].\"'\n\";
   }
   if ($can_post) {
      echo \"'\".$locale['566'].\"'\n\";
   }
   echo \"
\n\";
}
closetable();

if (iMEMBER && $can_reply && !$fdata['thread_locked']) {
   require_once INCLUDES.\"bbcode_include.php\";
   opentable($locale['512']);
   
   echo \"\n\n\";
   echo \"
\n\";
   
   echo \"
\n\";
   echo \"\n\n\";
   echo \"\n\";
   echo \"\n\n\";
   echo \"\n\";
   echo \"\n\n\";
   echo \"\n\";
   echo \"\n

\n\";
   echo display_bbcodes(\"360px\", \"message\").\"
\n
\n\";
   
   echo \"
\";
   closetable();
}

echo \"\n\";

list($postcount, $lastpid) = dbarraynum(dbquery(\"SELECT COUNT(post_id), MAX(post_id) FROM \".DB_POSTS.\" WHERE thread_id='\".$_GET['thread_id'].\"' GROUP BY thread_id\"));

if(isnum($postcount)){
   dbquery(\"UPDATE \".DB_THREADS.\" SET thread_postcount='$postcount', thread_lastpostid=$lastpid WHERE thread_id='\".$_GET['thread_id'].\"'\");
}

require_once THEMES.\"templates/footer.php\";
?>



 
PM
dasp
#42 Spausdinti pranešimą
parašyta 2010-02-05 17:02
Pradinukas



Reputacija: 0

Pranešimai: 44
Įstojo: 2009-10-03

online users:
Download source  Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2007 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: online_users_panel.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined(\"IN_FUSION\")) { die(\"Access Denied\"); }
   
$result = dbquery(\"SELECT * FROM \".DB_ONLINE.\" WHERE online_user=\".($userdata['user_level'] != 0 ? \"'\".$userdata['user_id'].\"'\" : \"'0' AND online_ip='\".USER_IP.\"'\"));
if (dbrows($result)) {
   $result = dbquery(\"UPDATE \".DB_ONLINE.\" SET online_lastactive='\".time().\"' WHERE online_user=\".($userdata['user_level'] != 0 ? \"'\".$userdata['user_id'].\"'\" : \"'0' AND online_ip='\".USER_IP.\"'\").\"\");
} else {
   $result = dbquery(\"INSERT INTO \".DB_ONLINE.\" (online_user, online_ip, online_lastactive) VALUES ('\".($userdata['user_level'] != 0 ? $userdata['user_id'] : \"0\").\"', '\".USER_IP.\"', '\".time().\"')\");
}
$result = dbquery(\"DELETE FROM \".DB_ONLINE.\" WHERE online_lastactive<\".(time()-60).\"\");

openside($locale['global_010']);
$result = dbquery(
   \"SELECT ton.*, tu.user_id,user_name FROM \".DB_ONLINE.\" ton
   LEFT JOIN \".DB_USERS.\" tu ON ton.online_user=tu.user_id\"
);
$guests = 0; $members = array();
while ($data = dbarray($result)) {
   if ($data['online_user'] == \"0\") {
      $guests++;
   } else {
      array_push($members, array($data['user_id'], $data['user_name']));
   }
}
echo THEME_BULLET.\" \".$locale['global_011'].\": \".$guests.\"

\n\";
echo THEME_BULLET.\" \".$locale['global_012'].\": \".count($members).\"
\n\";
if (count($members)) {
   $i = 1;
   while (list($key, $member) = each($members)) {
      echo \"\".$member[1].\"\";
      if ($i != count($members)) { echo \",\n\"; } else { echo \"
\n\"; }
      $i++;
   }
}
echo \"
\n\".THEME_BULLET.\" \".$locale['global_014'].\": \".number_format(dbcount(\"(user_id)\", DB_USERS, \"user_status<='1'\")).\"
\n\";
if (iADMIN && checkrights(\"M\") && $settings['admin_activation'] == \"1\") {
   echo THEME_BULLET.\" \".$locale['global_015'].\"\";
   echo \": \".dbcount(\"(user_id)\", DB_USERS, \"user_status='2'\").\"
\n\";
}
$data = dbarray(dbquery(\"SELECT user_id,user_name FROM \".DB_USERS.\" WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1\"));
echo THEME_BULLET.\" \".$locale['global_016'].\": \".$data['user_name'].\"\n\";
closeside();
?>








shoutbox:
Download source  Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: shoutbox_panel.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined(\"IN_FUSION\")) { die(\"Access Denied\"); }

$link = FUSION_SELF.(FUSION_QUERY ? \"?\".FUSION_QUERY : \"\");
$link = preg_replace(\"^(&|\?)s_action=(edit|delete)&shout_id=\d*^\", \"\", $link);
$sep = stristr($link, \"?\") ? \"&\" : \"?\";

if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == \"delete\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
   if ((iADMIN && checkrights(\"S\")) || (iMEMBER && dbcount(\"(shout_id)\", DB_SHOUTBOX, \"shout_id='\".$_GET['shout_id'].\"' AND shout_name='\".$userdata['user_id'].\"'\"))) {
      $result = dbquery(\"DELETE FROM \".DB_SHOUTBOX.\" WHERE shout_id='\".$_GET['shout_id'].\"'\".(iADMIN ? \"\" : \" AND shout_name='\".$userdata['user_id'].\"'\"));
   }
   redirect($link);
}

function sbwrap($text) {
   
   $i = 0; $tags = 0; $chars = 0; $res = \"\";

   $str_len = strlen($text);
   
   for ($i = 0; $i < $str_len; $i++) {
      $chr = substr($text, $i, 1);
      if ($chr == \"<\") {
         if (substr($text, ($i + 1), 6) == \"a href\" || substr($text, ($i + 1), 3) == \"img\") {
            $chr = \" \".$chr;
            $chars = 0;
         }
         $tags++;
      } elseif ($chr == \"&\") {
         if (substr($text, ($i + 1), 5) == \"quot;\") {
            $chars = $chars - 5;
         } elseif (substr($text, ($i + 1), 4) == \"amp;\" || substr($text, ($i + 1), 4) == \"#39;\" || substr($text, ($i + 1), 4) == \"#92;\") {
            $chars = $chars - 4;
         } elseif (substr($text, ($i + 1), 3) == \"lt;\" || substr($text, ($i + 1), 3) == \"gt;\") {
            $chars = $chars - 3;
         }
      } elseif ($chr == \">\") {
         $tags--;
      } elseif ($chr == \" \") {
         $chars = 0;
      } elseif (!$tags) {
         $chars++;
      }
      
      if (!$tags && $chars == 18) {
         $chr .= \"
\";
         $chars = 0;
      }
      $res .= $chr;
   }
   
   return $res;
}

openside($locale['global_150']);
   echo\"Pirkti/parduoti/keisti ?aukykloje grie?tai draud?iama! Bausmë ban 3d.

\n\";
if (iMEMBER || $settings['guestposts'] == \"1\") {
   include_once INCLUDES.\"bbcode_include.php\";
   if (isset($_POST['post_shout'])) {
      $flood = false;
      if (iMEMBER) {
         $shout_name = $userdata['user_id'];
      } elseif ($settings['guestposts'] == \"1\") {
         $shout_name = trim(stripinput($_POST['shout_name']));
         $shout_name = preg_replace(\"(^[0-9]*)\", \"\", $shout_name);
         if (isnum($shout_name)) { $shout_name = \"\"; }
         include_once INCLUDES.\"securimage/securimage.php\";
         $securimage = new Securimage();
         if (!isset($_POST['sb_captcha_code']) || $securimage->check($_POST['sb_captcha_code']) == false) { redirect($link); }
      }
      $shout_message = str_replace(\"\n\", \" \", $_POST['shout_message']);
      $shout_message = preg_replace(\"/^(.{255}).*$/\", \"$1\", $shout_message);
      $shout_message = trim(stripinput(censorwords($shout_message)));
      if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == \"edit\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
         $comment_updated = false;
         if ((iADMIN && checkrights(\"S\")) || (iMEMBER && dbcount(\"(shout_id)\", DB_SHOUTBOX, \"shout_id='\".$_GET['shout_id'].\"' AND shout_name='\".$userdata['user_id'].\"'\"))) {
            if ($shout_message) {
               $result = dbquery(\"UPDATE \".DB_SHOUTBOX.\" SET shout_message='$shout_message' WHERE shout_id='\".$_GET['shout_id'].\"'\".(iADMIN ? \"\" : \" AND shout_name='\".$userdata['user_id'].\"'\"));
            }
         }
         redirect($link);
      } elseif ($shout_name && $shout_message) {
         require_once INCLUDES.\"flood_include.php\";
         if (!flood_control(\"shout_datestamp\", DB_SHOUTBOX, \"shout_ip='\".USER_IP.\"'\")) {
            $result = dbquery(\"INSERT INTO \".DB_SHOUTBOX.\" (shout_name, shout_message, shout_datestamp, shout_ip) VALUES ('$shout_name', '$shout_message', '\".time().\"', '\".USER_IP.\"')\");
         }
      }
      redirect($link);
   }
   if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == \"edit\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
      $esresult = dbquery(
         \"SELECT ts.*, tu.user_id, tu.user_name FROM \".DB_SHOUTBOX.\" ts
         LEFT JOIN \".DB_USERS.\" tu ON ts.shout_name=tu.user_id
         WHERE ts.shout_id='\".$_GET['shout_id'].\"'\"
      );
      if (dbrows($esresult)) {
         $esdata = dbarray($esresult);
         if ((iADMIN && checkrights(\"S\")) || (iMEMBER && $esdata['shout_name'] == $userdata['user_id'] && isset($esdata['user_name']))) {
            if ((isset($_GET['s_action']) && $_GET['s_action'] == \"edit\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
               $edit_url = $sep.\"s_action=edit&shout_id=\".$esdata['shout_id'];
            } else {
               $edit_url = \"\";
            }
            $shout_link = $link.$edit_url;
            $shout_message = $esdata['shout_message'];
         }
      } else {
         $shout_link = $link;
         $shout_message = \"\";
      }
   } else {
      $shout_link = $link;
      $shout_message = \"\";
   }
   
   echo \"\n\";
   echo \"

\n\";
   if (iGUEST) {
      echo $locale['global_151'].\"
\n\";
      echo \"
\n\";
      echo $locale['global_152'].\"
\n\";
   }
   echo \"
\n\";
   echo display_bbcodes(\"150px;\", \"shout_message\", \"shout_form\", \"smiley|b|u|url|color\").\"\n\";
   if (iGUEST) {
      echo $locale['global_158'].\"
\n\";
      echo \"''
\n\";
    echo \"''\n\";
    echo \">''
\n\";
      echo $locale['global_159'].\"
\n
\n\";
   }
   echo \"
\n\";
   echo \"
\n
\n\";
} else {
   echo \"
\".$locale['global_154'].\"

\n\";
}
$numrows = dbcount(\"(shout_id)\", DB_SHOUTBOX);
$result = dbquery(
   \"SELECT ts.*, tu.user_id, tu.user_name FROM \".DB_SHOUTBOX.\" ts
   LEFT JOIN \".DB_USERS.\" tu ON ts.shout_name=tu.user_id
   ORDER BY ts.shout_datestamp DESC LIMIT 0,\".$settings['numofshouts']
);
if (dbrows($result)) {
   $i = 0;
   while ($data = dbarray($result)) {
      echo \"
\";
      if ($data['user_name']) {
         echo \"\".$data['user_name'].\"\n\";
      } else {
         echo $data['shout_name'].\"\n\";
      }
      echo \"
\n\";
      echo \"
\".showdate(\"shortdate\", $data['shout_datestamp']).\"
\";
      echo \"
\".sbwrap(parseubb(parsesmileys($data['shout_message']), \"b|i|u|url|color\")).\"
\n\";
      if ((iADMIN && checkrights(\"S\")) || (iMEMBER && $data['shout_name'] == $userdata['user_id'] && isset($data['user_name']))) {
         echo \"[\".$locale['global_076'].\"]\n\";
         echo \"[\".$locale['global_157'].\"]
\n\";
      }
      $i++;
      if ($i != $numrows) { echo \"
\n\"; }
   }
   if ($numrows > $settings['numofshouts']) {
      echo \"\n\";
   }
} else {
   echo \"
\".$locale['global_156'].\"
\n\";
}
closeside();
?>



 
PM
Rinas
#43 Spausdinti pranešimą
parašyta 2010-02-05 17:47
Administratorius



Reputacija: 0

Pranešimai: 204
Įstojo: 2009-06-10

Download source  Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2007 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: online_users_panel.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined(\"IN_FUSION\")) { die(\"Access Denied\"); }

$vip = \"''\"; //VIP paveiksliukas
$grupe = 1; //VIP grupes ID
   
$result = dbquery(\"SELECT * FROM \".DB_ONLINE.\" WHERE online_user=\".($userdata['user_level'] != 0 ? \"'\".$userdata['user_id'].\"'\" : \"'0' AND online_ip='\".USER_IP.\"'\"));
if (dbrows($result)) {
   $result = dbquery(\"UPDATE \".DB_ONLINE.\" SET online_lastactive='\".time().\"' WHERE online_user=\".($userdata['user_level'] != 0 ? \"'\".$userdata['user_id'].\"'\" : \"'0' AND online_ip='\".USER_IP.\"'\").\"\");
} else {
   $result = dbquery(\"INSERT INTO \".DB_ONLINE.\" (online_user, online_ip, online_lastactive) VALUES ('\".($userdata['user_level'] != 0 ? $userdata['user_id'] : \"0\").\"', '\".USER_IP.\"', '\".time().\"')\");
}
$result = dbquery(\"DELETE FROM \".DB_ONLINE.\" WHERE online_lastactive<\".(time()-60).\"\");

openside($locale['global_010']);
$result = dbquery(
   \"SELECT ton.*, tu.user_id,user_name,user_groups FROM \".DB_ONLINE.\" ton
   LEFT JOIN \".DB_USERS.\" tu ON ton.online_user=tu.user_id\"
);
$guests = 0; $members = array();
while ($data = dbarray($result)) {
   if ($data['online_user'] == \"0\") {
      $guests++;
   } else {
   $grupes = explode(\".\", $data['user_groups']);
   if (in_array($grupe, $grupes)) $vipas = true; else $vipas = false;
      array_push($members, array($data['user_id'], $data['user_name'], $vipas));
   }
}
echo THEME_BULLET.\" \".$locale['global_011'].\": \".$guests.\"

\n\";
echo THEME_BULLET.\" \".$locale['global_012'].\": \".count($members).\"
\n\";
if (count($members)) {
   $i = 1;
   while (list($key, $member) = each($members)) {
      echo \"\".$member[1].\"\".($member[2] ? $vip : \"\");
      if ($i != count($members)) { echo \",\n\"; } else { echo \"
\n\"; }
      $i++;
   }
}
echo \"
\n\".THEME_BULLET.\" \".$locale['global_014'].\": \".number_format(dbcount(\"(user_id)\", DB_USERS, \"user_status<='1'\")).\"
\n\";
if (iADMIN && checkrights(\"M\") && $settings['admin_activation'] == \"1\") {
   echo THEME_BULLET.\" \".$locale['global_015'].\"\";
   echo \": \".dbcount(\"(user_id)\", DB_USERS, \"user_status='2'\").\"
\n\";
}
$data = dbarray(dbquery(\"SELECT user_id,user_name FROM \".DB_USERS.\" WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1\"));
echo THEME_BULLET.\" \".$locale['global_016'].\": \".$data['user_name'].\"\n\";
closeside();
?>




Download source  Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: shoutbox_panel.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined(\"IN_FUSION\")) { die(\"Access Denied\"); }

$vip = \"''\"; //VIP paveiksliukas
$grupe = 1; //VIP grupes ID

$link = FUSION_SELF.(FUSION_QUERY ? \"?\".FUSION_QUERY : \"\");
$link = preg_replace(\"^(&|\?)s_action=(edit|delete)&shout_id=\d*^\", \"\", $link);
$sep = stristr($link, \"?\") ? \"&\" : \"?\";

if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == \"delete\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
   if ((iADMIN && checkrights(\"S\")) || (iMEMBER && dbcount(\"(shout_id)\", DB_SHOUTBOX, \"shout_id='\".$_GET['shout_id'].\"' AND shout_name='\".$userdata['user_id'].\"'\"))) {
      $result = dbquery(\"DELETE FROM \".DB_SHOUTBOX.\" WHERE shout_id='\".$_GET['shout_id'].\"'\".(iADMIN ? \"\" : \" AND shout_name='\".$userdata['user_id'].\"'\"));
   }
   redirect($link);
}

function sbwrap($text) {
   
   $i = 0; $tags = 0; $chars = 0; $res = \"\";

   $str_len = strlen($text);
   
   for ($i = 0; $i < $str_len; $i++) {
      $chr = substr($text, $i, 1);
      if ($chr == \"<\") {
         if (substr($text, ($i + 1), 6) == \"a href\" || substr($text, ($i + 1), 3) == \"img\") {
            $chr = \" \".$chr;
            $chars = 0;
         }
         $tags++;
      } elseif ($chr == \"&\") {
         if (substr($text, ($i + 1), 5) == \"quot;\") {
            $chars = $chars - 5;
         } elseif (substr($text, ($i + 1), 4) == \"amp;\" || substr($text, ($i + 1), 4) == \"#39;\" || substr($text, ($i + 1), 4) == \"#92;\") {
            $chars = $chars - 4;
         } elseif (substr($text, ($i + 1), 3) == \"lt;\" || substr($text, ($i + 1), 3) == \"gt;\") {
            $chars = $chars - 3;
         }
      } elseif ($chr == \">\") {
         $tags--;
      } elseif ($chr == \" \") {
         $chars = 0;
      } elseif (!$tags) {
         $chars++;
      }
     
      if (!$tags && $chars == 18) {
         $chr .= \"
\";
         $chars = 0;
      }
      $res .= $chr;
   }
   
   return $res;
}

openside($locale['global_150']);
   echo\"Pirkti/parduoti/keisti ?aukykloje grie?tai draud?iama! Bausmë ban 3d.

\n\";
if (iMEMBER || $settings['guestposts'] == \"1\") {
   include_once INCLUDES.\"bbcode_include.php\";
   if (isset($_POST['post_shout'])) {
      $flood = false;
      if (iMEMBER) {
         $shout_name = $userdata['user_id'];
      } elseif ($settings['guestposts'] == \"1\") {
         $shout_name = trim(stripinput($_POST['shout_name']));
         $shout_name = preg_replace(\"(^[0-9]*)\", \"\", $shout_name);
         if (isnum($shout_name)) { $shout_name = \"\"; }
         include_once INCLUDES.\"securimage/securimage.php\";
         $securimage = new Securimage();
         if (!isset($_POST['sb_captcha_code']) || $securimage->check($_POST['sb_captcha_code']) == false) { redirect($link); }
      }
      $shout_message = str_replace(\"\n\", \" \", $_POST['shout_message']);
      $shout_message = preg_replace(\"/^(.{255}).*$/\", \"$1\", $shout_message);
      $shout_message = trim(stripinput(censorwords($shout_message)));
      if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == \"edit\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
         $comment_updated = false;
         if ((iADMIN && checkrights(\"S\")) || (iMEMBER && dbcount(\"(shout_id)\", DB_SHOUTBOX, \"shout_id='\".$_GET['shout_id'].\"' AND shout_name='\".$userdata['user_id'].\"'\"))) {
            if ($shout_message) {
               $result = dbquery(\"UPDATE \".DB_SHOUTBOX.\" SET shout_message='$shout_message' WHERE shout_id='\".$_GET['shout_id'].\"'\".(iADMIN ? \"\" : \" AND shout_name='\".$userdata['user_id'].\"'\"));
            }
         }
         redirect($link);
      } elseif ($shout_name && $shout_message) {
         require_once INCLUDES.\"flood_include.php\";
         if (!flood_control(\"shout_datestamp\", DB_SHOUTBOX, \"shout_ip='\".USER_IP.\"'\")) {
            $result = dbquery(\"INSERT INTO \".DB_SHOUTBOX.\" (shout_name, shout_message, shout_datestamp, shout_ip) VALUES ('$shout_name', '$shout_message', '\".time().\"', '\".USER_IP.\"')\");
         }
      }
      redirect($link);
   }
   if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == \"edit\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
      $esresult = dbquery(
         \"SELECT ts.*, tu.user_id, tu.user_name FROM \".DB_SHOUTBOX.\" ts
         LEFT JOIN \".DB_USERS.\" tu ON ts.shout_name=tu.user_id
         WHERE ts.shout_id='\".$_GET['shout_id'].\"'\"
      );
      if (dbrows($esresult)) {
         $esdata = dbarray($esresult);
         if ((iADMIN && checkrights(\"S\")) || (iMEMBER && $esdata['shout_name'] == $userdata['user_id'] && isset($esdata['user_name']))) {
            if ((isset($_GET['s_action']) && $_GET['s_action'] == \"edit\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
               $edit_url = $sep.\"s_action=edit&shout_id=\".$esdata['shout_id'];
            } else {
               $edit_url = \"\";
            }
            $shout_link = $link.$edit_url;
            $shout_message = $esdata['shout_message'];
         }
      } else {
         $shout_link = $link;
         $shout_message = \"\";
      }
   } else {
      $shout_link = $link;
      $shout_message = \"\";
   }
   
   echo \"\n\";
   echo \"

\n\";
   if (iGUEST) {
      echo $locale['global_151'].\"
\n\";
      echo \"
\n\";
      echo $locale['global_152'].\"
\n\";
   }
   echo \"
\n\";
   echo display_bbcodes(\"150px;\", \"shout_message\", \"shout_form\", \"smiley|b|u|url|color\").\"\n\";
   if (iGUEST) {
      echo $locale['global_158'].\"
\n\";
      echo \"''
\n\";
    echo \"''\n\";
    echo \">''
\n\";
      echo $locale['global_159'].\"
\n
\n\";
   }
   echo \"
\n\";
   echo \"
\n
\n\";
} else {
   echo \"
\".$locale['global_154'].\"

\n\";
}
$numrows = dbcount(\"(shout_id)\", DB_SHOUTBOX);
$result = dbquery(
   \"SELECT ts.*, tu.user_id, tu.user_name, tu.user_groups FROM \".DB_SHOUTBOX.\" ts
   LEFT JOIN \".DB_USERS.\" tu ON ts.shout_name=tu.user_id
   ORDER BY ts.shout_datestamp DESC LIMIT 0,\".$settings['numofshouts']
);
if (dbrows($result)) {
   $i = 0;
   while ($data = dbarray($result)) {
      echo \"
\";
      if ($data['user_name']) {
      $grupes = explode(\".\", $data['user_groups']);
      if (in_array($grupe, $grupes)) $vipas = true; else $vipas = false;
         echo \"\".$data['user_name'].\"\".($vipas ? $vip : \"\").\"\n\";
      } else {
         echo $data['shout_name'].\"\n\";
      }
      echo \"
\n\";
      echo \"
\".showdate(\"shortdate\", $data['shout_datestamp']).\"
\";
      echo \"
\".sbwrap(parseubb(parsesmileys($data['shout_message']), \"b|i|u|url|color\")).\"
\n\";
      if ((iADMIN && checkrights(\"S\")) || (iMEMBER && $data['shout_name'] == $userdata['user_id'] && isset($data['user_name']))) {
         echo \"[\".$locale['global_076'].\"]\n\";
         echo \"[\".$locale['global_157'].\"]
\n\";
      }
      $i++;
      if ($i != $numrows) { echo \"
\n\"; }
   }
   if ($numrows > $settings['numofshouts']) {
      echo \"\n\";
   }
} else {
   echo \"
\".$locale['global_156'].\"
\n\";
}
closeside();
?>


 
PM
dasp
#44 Spausdinti pranešimą
parašyta 2010-02-06 08:01
Pradinukas



Reputacija: 0

Pranešimai: 44
Įstojo: 2009-10-03

èia kaip suprantu bus paveiksliukas VIP, o a? noriu nick spalvà pakeisti :(
 
PM
Rinas
#45 Spausdinti pranešimą
parašyta 2010-02-06 08:52
Administratorius



Reputacija: 0

Pranešimai: 204
Įstojo: 2009-06-10

Online useriai
Download source  Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2007 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: online_users_panel.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined(\"IN_FUSION\")) { die(\"Access Denied\"); }

$vip = \"#009900\"; //VIP spalva
$grupe = 1; //VIP grupes ID
   
$result = dbquery(\"SELECT * FROM \".DB_ONLINE.\" WHERE online_user=\".($userdata['user_level'] != 0 ? \"'\".$userdata['user_id'].\"'\" : \"'0' AND online_ip='\".USER_IP.\"'\"));
if (dbrows($result)) {
   $result = dbquery(\"UPDATE \".DB_ONLINE.\" SET online_lastactive='\".time().\"' WHERE online_user=\".($userdata['user_level'] != 0 ? \"'\".$userdata['user_id'].\"'\" : \"'0' AND online_ip='\".USER_IP.\"'\").\"\");
} else {
   $result = dbquery(\"INSERT INTO \".DB_ONLINE.\" (online_user, online_ip, online_lastactive) VALUES ('\".($userdata['user_level'] != 0 ? $userdata['user_id'] : \"0\").\"', '\".USER_IP.\"', '\".time().\"')\");
}
$result = dbquery(\"DELETE FROM \".DB_ONLINE.\" WHERE online_lastactive<\".(time()-60).\"\");

openside($locale['global_010']);
$result = dbquery(
   \"SELECT ton.*, tu.user_id,user_name,user_groups FROM \".DB_ONLINE.\" ton
   LEFT JOIN \".DB_USERS.\" tu ON ton.online_user=tu.user_id\"
);
$guests = 0; $members = array();
while ($data = dbarray($result)) {
   if ($data['online_user'] == \"0\") {
      $guests++;
   } else {
   $grupes = explode(\".\", $data['user_groups']);
   if (in_array($grupe, $grupes)) $vipas = true; else $vipas = false;
      array_push($members, array($data['user_id'], $data['user_name'], $vipas));
   }
}
echo THEME_BULLET.\" \".$locale['global_011'].\": \".$guests.\"

\n\";
echo THEME_BULLET.\" \".$locale['global_012'].\": \".count($members).\"
\n\";
if (count($members)) {
   $i = 1;
   while (list($key, $member) = each($members)) {
      echo \"\".$member[1].\"\";
      if ($i != count($members)) { echo \",\n\"; } else { echo \"
\n\"; }
      $i++;
   }
}
echo \"
\n\".THEME_BULLET.\" \".$locale['global_014'].\": \".number_format(dbcount(\"(user_id)\", DB_USERS, \"user_status<='1'\")).\"
\n\";
if (iADMIN && checkrights(\"M\") && $settings['admin_activation'] == \"1\") {
   echo THEME_BULLET.\" \".$locale['global_015'].\"\";
   echo \": \".dbcount(\"(user_id)\", DB_USERS, \"user_status='2'\").\"
\n\";
}
$data = dbarray(dbquery(\"SELECT user_id,user_name FROM \".DB_USERS.\" WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1\"));
echo THEME_BULLET.\" \".$locale['global_016'].\": \".$data['user_name'].\"\n\";
closeside();
?>





?aukykla
Download source  Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: shoutbox_panel.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined(\"IN_FUSION\")) { die(\"Access Denied\"); }

$vip = \"#009900\"; //VIP spalva
$grupe = 1; //VIP grupes ID

$link = FUSION_SELF.(FUSION_QUERY ? \"?\".FUSION_QUERY : \"\");
$link = preg_replace(\"^(&|\?)s_action=(edit|delete)&shout_id=\d*^\", \"\", $link);
$sep = stristr($link, \"?\") ? \"&\" : \"?\";

if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == \"delete\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
   if ((iADMIN && checkrights(\"S\")) || (iMEMBER && dbcount(\"(shout_id)\", DB_SHOUTBOX, \"shout_id='\".$_GET['shout_id'].\"' AND shout_name='\".$userdata['user_id'].\"'\"))) {
      $result = dbquery(\"DELETE FROM \".DB_SHOUTBOX.\" WHERE shout_id='\".$_GET['shout_id'].\"'\".(iADMIN ? \"\" : \" AND shout_name='\".$userdata['user_id'].\"'\"));
   }
   redirect($link);
}

function sbwrap($text) {
   
   $i = 0; $tags = 0; $chars = 0; $res = \"\";

   $str_len = strlen($text);
   
   for ($i = 0; $i < $str_len; $i++) {
      $chr = substr($text, $i, 1);
      if ($chr == \"<\") {
         if (substr($text, ($i + 1), 6) == \"a href\" || substr($text, ($i + 1), 3) == \"img\") {
            $chr = \" \".$chr;
            $chars = 0;
         }
         $tags++;
      } elseif ($chr == \"&\") {
         if (substr($text, ($i + 1), 5) == \"quot;\") {
            $chars = $chars - 5;
         } elseif (substr($text, ($i + 1), 4) == \"amp;\" || substr($text, ($i + 1), 4) == \"#39;\" || substr($text, ($i + 1), 4) == \"#92;\") {
            $chars = $chars - 4;
         } elseif (substr($text, ($i + 1), 3) == \"lt;\" || substr($text, ($i + 1), 3) == \"gt;\") {
            $chars = $chars - 3;
         }
      } elseif ($chr == \">\") {
         $tags--;
      } elseif ($chr == \" \") {
         $chars = 0;
      } elseif (!$tags) {
         $chars++;
      }
     
      if (!$tags && $chars == 18) {
         $chr .= \"
\";
         $chars = 0;
      }
      $res .= $chr;
   }
   
   return $res;
}

openside($locale['global_150']);
   echo\"Pirkti/parduoti/keisti ?aukykloje grie?tai draud?iama! Bausmë ban 3d.

\n\";
if (iMEMBER || $settings['guestposts'] == \"1\") {
   include_once INCLUDES.\"bbcode_include.php\";
   if (isset($_POST['post_shout'])) {
      $flood = false;
      if (iMEMBER) {
         $shout_name = $userdata['user_id'];
      } elseif ($settings['guestposts'] == \"1\") {
         $shout_name = trim(stripinput($_POST['shout_name']));
         $shout_name = preg_replace(\"(^[0-9]*)\", \"\", $shout_name);
         if (isnum($shout_name)) { $shout_name = \"\"; }
         include_once INCLUDES.\"securimage/securimage.php\";
         $securimage = new Securimage();
         if (!isset($_POST['sb_captcha_code']) || $securimage->check($_POST['sb_captcha_code']) == false) { redirect($link); }
      }
      $shout_message = str_replace(\"\n\", \" \", $_POST['shout_message']);
      $shout_message = preg_replace(\"/^(.{255}).*$/\", \"$1\", $shout_message);
      $shout_message = trim(stripinput(censorwords($shout_message)));
      if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == \"edit\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
         $comment_updated = false;
         if ((iADMIN && checkrights(\"S\")) || (iMEMBER && dbcount(\"(shout_id)\", DB_SHOUTBOX, \"shout_id='\".$_GET['shout_id'].\"' AND shout_name='\".$userdata['user_id'].\"'\"))) {
            if ($shout_message) {
               $result = dbquery(\"UPDATE \".DB_SHOUTBOX.\" SET shout_message='$shout_message' WHERE shout_id='\".$_GET['shout_id'].\"'\".(iADMIN ? \"\" : \" AND shout_name='\".$userdata['user_id'].\"'\"));
            }
         }
         redirect($link);
      } elseif ($shout_name && $shout_message) {
         require_once INCLUDES.\"flood_include.php\";
         if (!flood_control(\"shout_datestamp\", DB_SHOUTBOX, \"shout_ip='\".USER_IP.\"'\")) {
            $result = dbquery(\"INSERT INTO \".DB_SHOUTBOX.\" (shout_name, shout_message, shout_datestamp, shout_ip) VALUES ('$shout_name', '$shout_message', '\".time().\"', '\".USER_IP.\"')\");
         }
      }
      redirect($link);
   }
   if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == \"edit\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
      $esresult = dbquery(
         \"SELECT ts.*, tu.user_id, tu.user_name FROM \".DB_SHOUTBOX.\" ts
         LEFT JOIN \".DB_USERS.\" tu ON ts.shout_name=tu.user_id
         WHERE ts.shout_id='\".$_GET['shout_id'].\"'\"
      );
      if (dbrows($esresult)) {
         $esdata = dbarray($esresult);
         if ((iADMIN && checkrights(\"S\")) || (iMEMBER && $esdata['shout_name'] == $userdata['user_id'] && isset($esdata['user_name']))) {
            if ((isset($_GET['s_action']) && $_GET['s_action'] == \"edit\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
               $edit_url = $sep.\"s_action=edit&shout_id=\".$esdata['shout_id'];
            } else {
               $edit_url = \"\";
            }
            $shout_link = $link.$edit_url;
            $shout_message = $esdata['shout_message'];
         }
      } else {
         $shout_link = $link;
         $shout_message = \"\";
      }
   } else {
      $shout_link = $link;
      $shout_message = \"\";
   }
   
   echo \"\n\";
   echo \"

\n\";
   if (iGUEST) {
      echo $locale['global_151'].\"
\n\";
      echo \"
\n\";
      echo $locale['global_152'].\"
\n\";
   }
   echo \"
\n\";
   echo display_bbcodes(\"150px;\", \"shout_message\", \"shout_form\", \"smiley|b|u|url|color\").\"\n\";
   if (iGUEST) {
      echo $locale['global_158'].\"
\n\";
      echo \"''
\n\";
    echo \"''\n\";
    echo \">''
\n\";
      echo $locale['global_159'].\"
\n
\n\";
   }
   echo \"
\n\";
   echo \"
\n
\n\";
} else {
   echo \"
\".$locale['global_154'].\"

\n\";
}
$numrows = dbcount(\"(shout_id)\", DB_SHOUTBOX);
$result = dbquery(
   \"SELECT ts.*, tu.user_id, tu.user_name, tu.user_groups FROM \".DB_SHOUTBOX.\" ts
   LEFT JOIN \".DB_USERS.\" tu ON ts.shout_name=tu.user_id
   ORDER BY ts.shout_datestamp DESC LIMIT 0,\".$settings['numofshouts']
);
if (dbrows($result)) {
   $i = 0;
   while ($data = dbarray($result)) {
      echo \"
\";
      if ($data['user_name']) {
      $grupes = explode(\".\", $data['user_groups']);
      if (in_array($grupe, $grupes)) $vipas = true; else $vipas = false;
         echo \"\".$data['user_name'].\"\n\";
      } else {
         echo $data['shout_name'].\"\n\";
      }
      echo \"
\n\";
      echo \"
\".showdate(\"shortdate\", $data['shout_datestamp']).\"
\";
      echo \"
\".sbwrap(parseubb(parsesmileys($data['shout_message']), \"b|i|u|url|color\")).\"
\n\";
      if ((iADMIN && checkrights(\"S\")) || (iMEMBER && $data['shout_name'] == $userdata['user_id'] && isset($data['user_name']))) {
         echo \"[\".$locale['global_076'].\"]\n\";
         echo \"[\".$locale['global_157'].\"]
\n\";
      }
      $i++;
      if ($i != $numrows) { echo \"
\n\"; }
   }
   if ($numrows > $settings['numofshouts']) {
      echo \"\n\";
   }
} else {
   echo \"
\".$locale['global_156'].\"
\n\";
}
closeside();
?>


 
PM
dasp
#46 Spausdinti pranešimą
parašyta 2010-02-06 12:04
Pradinukas



Reputacija: 0

Pranešimai: 44
Įstojo: 2009-10-03

viskas puikiai veikia, labai dëkui Valio tik va dar kilo mintis, gal taip ámanoma: kai priskiria automati?kai á VIP grupæ (id=16) pa?alintø áspëjimus (t.y. pa?alintø i? tam tikros grupës)
Redagavo dasp 2010-02-06 12:42
 
PM
zDon
#47 Spausdinti pranešimą
parašyta 2010-02-06 15:19
Vartotojo avataras

Geradarys



Reputacija: 0

Pranešimai: 598
Įstojo: 2008-08-11

Pas tave automati?kai á grupæ priskiria ?
Kokià áspëjimø sistemà naudoji ?

1000 postas !!! Valio
Redagavo zDon 2010-02-06 15:19
ELECKTRIÈKÀÀ !!!
===================================
?i svetainë skirta padëti pasidaryti, o ne padaryti u? jus.
 
PM
Rinas
#48 Spausdinti pranešimą
parašyta 2010-02-06 16:09
Administratorius



Reputacija: 0

Pranešimai: 204
Įstojo: 2009-06-10

zDon para?ë:
Pas tave automati?kai á grupæ priskiria ?
Kokià áspëjimø sistemà naudoji ?

1000 postas !!! Valio

Taip priskiria, nes a? sukûriau panelæ, kuri priskirtø :D dasp, kokia sistemà áspëjimø naudoji? Snapso?
 
PM
dasp
#49 Spausdinti pranešimą
parašyta 2010-02-07 12:37
Pradinukas



Reputacija: 0

Pranešimai: 44
Įstojo: 2009-10-03

nenaudoju jokios, rankiniu bûdu á grupæ priskiriu, tai reikia kad i? jos pa?alintø. Beje, kas gali bût jei kai narys u?sisako vip, jam nesuteikia vip nustatytam laikui (nors mysql lentelëje viskas gerai) tik kai atsidarau nustatymus yra ?enklas "#"

cmon need help :o
Redagavo dasp 2010-02-08 19:25
 
PM
Rinas
#50 Spausdinti pranešimą
parašyta 2010-02-08 21:00
Administratorius



Reputacija: 0

Pranešimai: 204
Įstojo: 2009-06-10

Dabar pa?alins i? áspëjimø grupës. Dël to VIP u?sisakymo rytoj pa?iûrësiu...
Download source  Code
$id = 1; //VIP grupes ID
$ispejimai = 2; //Ispejimu grupes ID
if (VIP && !checkgroup($id)) {
$groups = $userdata['user_groups'].\".\".$id;
$groups = str_replace($ispejimai.\".\", \"\", $groups);
$result = dbquery(\"UPDATE \".DB_USERS.\" SET user_groups='\".$groups.\"' WHERE user_id='\".$userdata['user_id'].\"'\");
} elseif (!VIP && checkgroup($id)) {
$groups = str_replace(\".\".$id, \"\", $userdata['user_groups']);
$result = dbquery(\"UPDATE \".DB_USERS.\" SET user_groups='\".$groups.\"' WHERE user_id='\".$userdata['user_id'].\"'\");
}



Redagavo Rinas 2010-02-08 21:01
 
PM
skydragon
#51 Spausdinti pranešimą
parašyta 2010-02-09 00:03
Naujokas



Reputacija: 0

Pranešimai: 1
Įstojo: 2009-06-11

o kad pvz ATSKIRTOS paneles/downloadai butu tik VIP ? imanoma tai padaryt? :D
Redagavo skydragon 2010-02-09 00:03
 
PM
dasp
#52 Spausdinti pranešimą
parašyta 2010-02-09 05:46
Pradinukas



Reputacija: 0

Pranešimai: 44
Įstojo: 2009-10-03

rinas para?ë:
Dabar pa?alins i? áspëjimø grupës. Dël to VIP u?sisakymo rytoj pa?iûrësiu...
Download source  Code
$id = 1; //VIP grupes ID
$ispejimai = 2; //Ispejimu grupes ID
if (VIP && !checkgroup($id)) {
$groups = $userdata['user_groups'].\".\".$id;
$groups = str_replace($ispejimai.\".\", \"\", $groups);
$result = dbquery(\"UPDATE \".DB_USERS.\" SET user_groups='\".$groups.\"' WHERE user_id='\".$userdata['user_id'].\"'\");
} elseif (!VIP && checkgroup($id)) {
$groups = str_replace(\".\".$id, \"\", $userdata['user_groups']);
$result = dbquery(\"UPDATE \".DB_USERS.\" SET user_groups='\".$groups.\"' WHERE user_id='\".$userdata['user_id'].\"'\");
}




o nebus taip, kad jei priskirsiu vël á áspëtus nors dar bus vip ir vël pa?alins i? jos?
 
PM
Rinas
#53 Spausdinti pranešimą
parašyta 2010-02-09 15:54
Administratorius



Reputacija: 0

Pranešimai: 204
Įstojo: 2009-06-10

Nebus, nebent narys i? naujo VIP u?sisakys.
 
PM
dasp
#54 Spausdinti pranešimą
parašyta 2010-02-09 16:59
Pradinukas



Reputacija: 0

Pranešimai: 44
Įstojo: 2009-10-03

dar ?ita problema: "Beje, kas gali bût jei kai narys u?sisako vip, jam nesuteikia vip nustatytam laikui (nors mysql lentelëje viskas gerai) tik kai atsidarau nustatymus yra ?enklas "#" "
 
PM
Rinas
#55 Spausdinti pranešimą
parašyta 2010-02-10 15:24
Administratorius



Reputacija: 0

Pranešimai: 204
Įstojo: 2009-06-10

Nelabai supratau. Kur ten tie nustatymai, kà nustatai ir kà ra?o user_vip laukelyje nario, kuris u?sisako visam laikui.
 
PM
dasp
#56 Spausdinti pranešimą
parašyta 2010-02-11 17:39
Pradinukas



Reputacija: 0

Pranešimai: 44
Įstojo: 2009-10-03

nustatymuose ára?au kad bûtø 30 dienø, bet kai spaudi i?saugot u?krauna ir atsiranda #, o kai narys u?sisako vip, jam ra?o kad pasibaigë vip'as tai kaip suprantu nenusistato vip laikas, bet mysql lentelëje ra?o "vip_time 30"
 
PM
Rinas
#57 Spausdinti pranešimą
parašyta 2010-02-12 18:56
Administratorius



Reputacija: 0

Pranešimai: 204
Įstojo: 2009-06-10

Kokiuose tu nustatymuose kà keitei? Sukelk visus default vip failus.
 
PM
Logix
#58 Spausdinti pranešimą
parašyta 2010-02-14 14:19
Savekas



Reputacija: 0

Pranešimai: 111
Įstojo: 2009-07-20

Ka tas kdoas amn pades? As pvz. noriu akd siuntinius matytu tik vip logiskai mastant reiktu kist y downaods.php koda..
 
PM
Wyciokazz
#59 Spausdinti pranešimą
parašyta 2010-02-14 14:47
Vartotojo avataras

Administratorius



Reputacija: 1

Pranešimai: 2108
Įstojo: 2008-02-27

Nenu padarai su rino kodu kad vip narius auto imestu y grupe ir is jos ismestu tada nustatai siuntinius tik vipams aisku reikia but grupe sukurus ir viskas.
Kam kurti tai kas jau sukurta.

Nesu ekstrasensas ar dar koks čigonas tad iš nieko negaliu suprast kur bėda.

[img]http://27.media.tumblr.com/tumblr_m3hdwudgjG1rteofuo1_500.gif[/img]
 
PM
dasp
#60 Spausdinti pranešimą
parašyta 2010-02-15 09:52
Pradinukas



Reputacija: 0

Pranešimai: 44
Įstojo: 2009-10-03

Gal galit padaryt kad bûtø visi nariai vienam psl? arba i?taisyt, nes kai pvz spaudi kad rodytø antrà ar kità psl i?meta mainpage..
Download source  Code
require_once \"../maincore.php\";
require_once THEMES.\"templates/admin_header.php\";
if (!checkrights(\"VIP\") || !defined(\"iAUTH\") || $_GET['aid'] != iAUTH) redirect(\"../index.php\");
if (isset($_GET['delete_vip']) && !isNum($_GET['delete_vip'])) redirect(\"index.php\");
opentable(\"VIP administravimo kategorijos\");
$nustatymai='VIP Sistemos nustatymai'; $nariai='Nariø administravimas';
if (isset($_GET['users'])) { 
$nariai='Nariø administravimas';
} elseif(isset($_GET['system'])) {
$nustatymai='VIP Sistemos nustatymai';
}
echo \"
\".$nustatymai.\" || \".$nariai.\"
\";
closetable();
if (isset($_GET['users'])) { 
if(isset($_GET['add']) && $_GET['add']=='search') {
   opentable(\"Ie?komas narys\");
   if (!isset($_POST['search_users']) || !isset($_POST['search_criteria'])) {
      echo \"
\n\";
      echo \"\n\";
      echo \"\n\n\";
      echo \"\n\n\";
      echo \"\n
Surask nará, kuriam nori suteikti/pratæsti nemokamai VIP narystæ! Ára?yk norimo nario nikà, arba jo prad?ià.

\n\";
      echo \"\n
\n
\n\";
   } elseif (isset($_POST['search_users']) && isset($_POST['search_criteria'])) {
      $mysql_search = \"user_name LIKE '\".$_POST['search_criteria'].\"%' \";
   

         $result = dbquery(\"SELECT user_id, user_name FROM \".DB_PREFIX.\"users WHERE \".$mysql_search.\" AND user_vip<\".time().\" ORDER BY user_name\");
      
      if (isset($result) && dbrows($result)) {
         
         echo \"\n\";
         $i = 0; $users = \"\";
         while ($data = dbarray($result)) {
                     $i++;
            $users .= \"\n\n\";
         }
         if ($i > 0) {
            echo \"\n\n\n\";
            echo $users;
         } else {
            echo \"\n\n\n\";
            echo '
Grá?ti
';
         }
         echo \"
Rasti nariai:
Nariø nebuvo rasta\n\";
            echo \"\n
\n\n\";
      } else {
         echo \"\n\";
         echo \"\n\n\n
Nariø nebuvo rasta\";
         echo \"
\n\";
         echo '
Grá?ti
';
         
      }
   }
   closetable();
} else {
if (isset($_GET['delete']) && isnum($_GET['delete'])) {
$result=dbquery(\"SELECT user_name FROM \".DB_PREFIX.\"users WHERE user_id='{$_GET['delete']}'\");
if (dbrows($result)) {
$nik=dbarray($result);
opentable(\"Pabaigiama/Atimama VIP narystë nariui: \".$nik['user_name']);
$result=dbquery(\"UPDATE \".DB_PREFIX.\"users SET user_vip='\".time().\"' WHERE user_id='{$_GET['delete']}'\");
if ($result) {
echo \"
VIP narystë nariui sëkmingai atimta/pabaigta.
\";
echo '
Grá?ti
';
} else {
echo \"
Klaida: Nepavyko pabaigti/atimti nariui VIP narystës!
\";
echo '
Grá?ti
';
}
} else {
opentable('Klaida');
echo \"
Toks narys neegzistuoja
\";
}
closetable();
} else if (isset($_GET['add']) && isnum($_GET['add'])) {
$result=dbquery(\"SELECT user_name, user_vip FROM \".DB_PREFIX.\"users WHERE user_id='{$_GET['add']}'\");
if (dbrows($result)) {
$nik=dbarray($result);
if (!isset($_POST['pratesti'])) {
opentable('Koreguojama vip narystë nariui '.$nik['user_name']);
   echo \"

      
      
      
      
      
      
      \";
      echo \"\n
Galios iki:
      
      
MetaiMën.Dien.

      
--
      

      
\n
\";
} else {
opentable(\"Suteikiama/Pratesiama VIP narystë nariui: \".$nik['user_name']);
$result=dbquery(\"UPDATE \".DB_PREFIX.\"users SET user_vip='\".mktime(0, 0, 0, $_POST['month'], $_POST['day'], $_POST['year']).\"' WHERE user_id='{$_GET['add']}'\");
if ($result) {
echo \"
VIP narystë nariui sëkmingai pakoreguota
\";
echo '
Grá?ti
';
} else {
echo \"
Klaida: Nepavyko pakoreguoti nariui VIP narystës!
\";
echo '
Grá?ti
';
}
}
} else {
opentable('Klaida');
echo \"
Toks narys neegzistuoja
\";
}
closetable();
} else {
opentable('Nariø administravimas');
echo \"

Pridëti VIP nará

\";
if (!isset($sortby) || !preg_match(\"/^[0-9A-Z]$/\", $sortby)) $sortby = \"all\";
   $orderby = ($sortby == \"all\" ? \"\" : \" AND user_name LIKE '\".stripinput($sortby).\"%'\");
   $result = dbquery(\"SELECT * FROM \".$db_prefix.\"users WHERE user_vip!=''\".$orderby.\"\");
   $rows = dbrows($result);
   if (!isset($_GET['rowstart']) || !isNum($_GET['rowstart'])) $_GET['rowstart'] = 0;
   if ($rows != 0) {
      $i = 0;
      echo \"




\n\";
      $result = dbquery(\"SELECT * FROM \".$db_prefix.\"users WHERE user_vip!=''\".$orderby.\" ORDER BY user_vip DESC, user_name LIMIT \".$_GET['rowstart'].\",20\");
      while ($data = dbarray($result)) {
         $cell_color = ($i % 2 == 0 ? \"tbl1\" : \"tbl2\"); $i++;
         echo \"\n\n\";
         echo \"\n\";
               echo \"\n\";
      }
      echo \"
Vartotojo vardas Vartotojo tipas VIP
\n\".$data['user_name'].\"\".getuserlevel($data['user_level']).\"\";
               if (checkvip($data['user_id'])) {
               echo \"Baigsis: \".showdate('longdate', $data['user_vip']).\" - Atimti VIP! || Koreguoti VIP!\";
               } else {
               echo \"Baigësi: \".showdate('longdate', $data['user_vip']).\" - Suteikti VIP!\";
               }
               echo \"
\n\";
   } else {
      echo \"

Nariø kurie buvo nëra VIP nariai pagal jûsø kriterijus nerasta!

\n
\n\";
      echo '
Grá?ti
';
   }
   

/*} else {
   echo \"

\n\".$locale['003'].\"

\n
\n\";
}*/
closetable();
if ($rows > 20) echo \"
\".makePageNav($_GET['rowstart'],20,$rows,3,FUSION_SELF.\"?\").\"\n
\n\";
}}
} elseif(isset($_GET['system'])) {
opentable('VIP Sistemos nustatymai');
if (isset($_POST['atn']) && isset($_POST['vip_time']) && isnum($_POST['vip_time'])) {
$result=dbquery(\"UPDATE \".DB_PREFIX.\"vip SET vip_time='{$_POST['vip_time']}'\");
if ($result) {
echo \"
Nustatymai atnaujinti
\";
} else echo \"
Ávyko klaida
\";
echo '
Grá?ti
';
} else {
?>
'>






VIP laikotarpis:* ' maxlength='10' class='textbox' style='width:100px;' /> dienø.




}
closetable();
}
require_once THEMES.\"templates/footer.php\";
?>


 
PM
Peršokti į forumą: