PHP-Fusion Mods
Navigacija
Apsauga
Apsauga Neleista registracija: 28674
Šiandien: 24
Prisijungę nariai
» Svečių: 19
» Narių: 0

» Viso narių: 10,232
» Naujausias: EdvinasG1337

Prisijungimų istorija:
tabux 2 Dienos
EdvinasG1337nepamenu
rolandas94nepamenu
Zbigniew@nepamenu
Edis2nepamenu
klubogerbejasnepamenu
Miskinisnepamenu
mast3rnepamenu
N1nt3ndnepamenu
Matze1987nepamenu
Piter_NSnepamenu
MariukasRnepamenu
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.

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

2024-02-20 22:18
Zodziu.. Nostalgija. Sorry Tabux uz spam’a, netelpa viskas i viena shout’a. 😁

2024-02-20 22:14
Aisku dabar tokie laikai, kai turinio valdymo sistemas valdome one-click principu. Ne kaip seniau kode ieskodavom klaidu, norint moda pasileist.. :D paciam reikdavo susidiegt viska i ftp..

2024-02-20 22:03
Sveiki kolegos 👌 kazkada rasiau greit 11 metu bet ziuriu greit 14 metu. 😄 baisuu, reik ta proga kazka sugalvot su php-f kaip jaunima itraukt.

Shoutbox Archive
Peržiūrėti temą
PHP-Fusion Mods :: PHP-Fusion modifikacijų forumas :: Taisymas
 Spausdinti temą
v7 roboto taisimas
Taskas
#1 Spausdinti pranešimą
parašyta 2012-08-22 08:41
Vartotojo avataras

Apšylantis



Reputacija: 0

Pranešimai: 91
Įstojo: 2011-05-23

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']);
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)));
            //pradedam boto koda
     
      $h = date(\"H\", time());
     
      if ($h > 00 && $h <= 05) {
      $time = \"Laba naktis\";
      $timemsg = \"Ne laikas miegoti dar?\";
      } elseif ($h > 05 && $h <= 10) {
      $time = \"Labas rytas\";
      $timemsg = \"Kaip miegojai?\";
      } elseif ($h > 10 && $h <= 18) {
      $time = \"Laba diena\";
      $timemsg = \"Kaip einasi?\";
      } elseif ($h > 18 && $h <= 21) {
      $time = \"Labas vakaras\";
      $timemsg = \"Kaip sekasi?\";
      } elseif ($h > 21 && $h <= 23) {
      $time = \"Laba naktis\";
      $timemsg = \"Ne laikas miegoti dar?\";
      }
     
   $msg = strtolower($_POST['shout_message']);
   $msg = str_replace(array(\":\",\"<\",\">\",\"@\",\"#\",\"$\",\"%\",\"^\",\"&\",\"*\",\"(\",\")\",\"_\",\"=\",\"+\",\"/\",\"-\", \"?\", \",\", \"'\", \"`\", \"!\", \".\"), \"\", $msg);
   $msg = str_replace(array(\"ą\", \"č\", \"ę\", \"ė\", \"į\", \"š\", \"ų\", \"ū\", \"ž\"), array(\"a\", \"c\", \"e\", \"e\", \"i\", \"s\", \"u\", \"u\", \"z\"), $msg);
   
   // klausimus rasom be zenklu, kurie yra $pakeisti array'uje
      $QA = array (
         
         \"(.{0,10}(sveik|laba|swx|svx|sveix).*[a-z,0-9]*\040(ro){0,1}bot.*|.{0,10}(ro){0,1}bot[a-z,0-9]*\040(sveik|laba|swx|svx|sveix).*)\" => \"$time, $userdata[user_name]. $timemsg\",
         \".{0,7}(norm|ger|nuosta|ideal).*[a-z,0-9]*\040(ro){0,1}bot.*\" => \"Nuostabu :D Džiaugiuosi dėl tavęs :)\",
         \"(dux|duch|lox|loch|ble|nx|nach|nah|nax|pisk|cbb|bbd|debi|peder|pydar|rupus miltai|posimts pypkiu|paci|a?).*\" => \"\".$userdata['user_name'].\", Nesikeik! :|\",
         \".{0,10}(ro){0,1}bot[a-z,0-9]*\040(uzmu|nuzud|papj).*\" => \"Jau bėgu :D\",
         \"[^[a-z,0-9]]*.*bot.*\" => \"Aš robotas :). Kas kvietėt?\"
         
      );
         
     
     
      $rezas = false;
      foreach ($QA as $q => $a) {
      if (ereg($q, $msg)) {
      $rezas = true;
      $atsakymas = $a;
      break;
      }
      }
     
      //botas baigesi

     
      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) {
         //boto uzklausa
            $result = dbquery(\"INSERT INTO \".DB_SHOUTBOX.\" (shout_name, shout_message, shout_datestamp, shout_ip) VALUES ('Pagalbos Robotukas', '$atsakymas', '\".(time() + 1).\"', '0.0.0.0')\");
            $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\", \"chatform\", \"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();
?>




Sita radau internete bet jis neveikia,kaip speju cia senai v7 versijai,gal kas galetumet padaryt ant naujausio v7? vakar iki 4 ryto meginau visokius variantus ir nieko gero nesigavo....
Redagavo Taskas 2012-08-22 08:41
AntKablio.LT - Zvejybos asu namai tau ir tavo draugams...
Greitu metu pasirodys naujas projektas *galvoju*

Padejau? uzmesk 10+ aciu ;]
 
PM
domas3215
#2 Spausdinti pranešimą
parašyta 2012-09-13 19:46
Pradinukas



Reputacija: 0

Pranešimai: 26
Įstojo: 2011-01-22

aga ir man reiketu ant php v7.02
 
PM
tabux
#3 Spausdinti pranešimą
parašyta 2012-09-14 06:46
Vartotojo avataras

S.Administratorius



Reputacija: 0

Pranešimai: 1009
Įstojo: 2008-10-16

persiskaitykit straipsniuk� ir suprasit kod�l met� klaid� http://phpfusion....rsijos,s45
Redagavo Wyciokazz 2012-09-14 10:16
 
PM
jawa
#4 Spausdinti pranešimą
parašyta 2012-11-29 11:58
Vartotojo avataras

Savekas



Reputacija: 0

Pranešimai: 126
Įstojo: 2007-04-24

na tai o kaip tada pataisyti sita bota ? tabux, gal gali padeti ?
http://sensation-...
 
PM
MariukasR
#5 Spausdinti pranešimą
parašyta 2012-11-29 13:21
Vartotojo avataras

Moderatorius



Reputacija: 0

Pranešimai: 435
Įstojo: 2010-11-12

Yra para?yta pvz ereg() funkcij� pakeisti � prerg_match().

Taip yra tod�l, kad tobul�jame ne vien mes programavime, bet tobul�ja ir m�s� mylimoji PHP kalba ;) Kuri leid?ia vis papras�iau dirbti :P
moderator
 
PM
Exceptio
#6 Spausdinti pranešimą
parašyta 2012-11-29 17:52
Vartotojo avataras

Administratorius



Reputacija: 0

Pranešimai: 438
Įstojo: 2008-11-10

Kad viskas puikiai veikia isimetus i shoutbox ta kodo iskarpa..

Download source  Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 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\"); }

include_once INFUSIONS.\"shoutbox_panel/infusion_db.php\";
include_once INCLUDES.\"infusions_include.php\";

// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS.\"shoutbox_panel/locale/\".$settings['locale'].\".php\")) {
   // Load the locale file matching the current site locale setting.
   include INFUSIONS.\"shoutbox_panel/locale/\".$settings['locale'].\".php\";
} else {
   // Load the infusion's default locale file.
   include INFUSIONS.\"shoutbox_panel/locale/English.php\";
}

$shout_settings = get_settings(\"shoutbox_panel\");

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

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);
}

if (!function_exists(\"sbwrap\")) {
   function sbwrap($text) {
      global $locale;

      $i = 0; $tags = 0; $chars = 0; $res = \"\";

      $str_len = strlen($text);

      for ($i = 0; $i < $str_len; $i++) {
         $chr = mb_substr($text, $i, 1, $locale['charset']);
         if ($chr == \"<\") {
            if (mb_substr($text, ($i + 1), 6, $locale['charset']) == \"a href\" || mb_substr($text, ($i + 1), 3, $locale['charset']) == \"img\") {
               $chr = \" \".$chr;
               $chars = 0;
            }
            $tags++;
         } elseif ($chr == \"&\") {
            if (mb_substr($text, ($i + 1), 5, $locale['charset']) == \"quot;\") {
               $chars = $chars - 5;
            } elseif (mb_substr($text, ($i + 1), 4, $locale['charset']) == \"amp;\" || mb_substr($text, ($i + 1), 4, $locale['charset']) == \"#39;\" || mb_substr($text, ($i + 1), 4, $locale['charset']) == \"#92;\") {
               $chars = $chars - 4;
            } elseif (mb_substr($text, ($i + 1), 3, $locale['charset']) == \"lt;\" || mb_substr($text, ($i + 1), 3, $locale['charset']) == \"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['SB_title']);
if (iMEMBER || $shout_settings['guest_shouts'] == \"1\") {
   include_once INCLUDES.\"bbcode_include.php\";
   if (isset($_POST['post_shout'])) {
      $flood = false;
      if (iMEMBER) {
         $shout_name = $userdata['user_id'];
      } elseif ($shout_settings['guest_shouts'] == \"1\") {
         $shout_name = trim(stripinput($_POST['shout_name']));
         $shout_name = preg_replace(\"(^[+0-9\s]*)\", \"\", $shout_name);
         if (isnum($shout_name)) { $shout_name = \"\"; }
         include_once INCLUDES.\"captchas/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)));
      
      
      
      
      
       //pradedam boto koda
     
      $h = date(\"H\", time());
     
      if ($h > 00 && $h <= 05) {
      $time = \"Laba naktis\";
      $timemsg = \"Ne laikas miegoti dar?\";
      } elseif ($h > 05 && $h <= 10) {
      $time = \"Labas rytas\";
      $timemsg = \"Kaip miegojai?\";
      } elseif ($h > 10 && $h <= 18) {
      $time = \"Laba diena\";
      $timemsg = \"Kaip einasi?\";
      } elseif ($h > 18 && $h <= 21) {
      $time = \"Labas vakaras\";
      $timemsg = \"Kaip sekasi?\";
      } elseif ($h > 21 && $h <= 23) {
      $time = \"Laba naktis\";
      $timemsg = \"Ne laikas miegoti dar?\";
      }
     
   $msg = strtolower($_POST['shout_message']);
   $msg = str_replace(array(\":\",\"<\",\">\",\"@\",\"#\",\"$\",\"%\",\"^\",\"&\",\"*\",\"(\",\")\",\"_\",\"=\",\"+\",\"/\",\"-\", \"?\", \",\", \"'\", \"`\", \"!\", \".\"), \"\", $msg);
   $msg = str_replace(array(\"ą\", \"č\", \"ę\", \"ė\", \"į\", \"š\", \"ų\", \"ū\", \"ž\"), array(\"a\", \"c\", \"e\", \"e\", \"i\", \"s\", \"u\", \"u\", \"z\"), $msg);
   
   // klausimus rasom be zenklu, kurie yra $pakeisti array'uje
      $QA = array (
         
         \"(.{0,10}(sveik|laba|swx|svx|sveix).*[a-z,0-9]*\040(ro){0,1}bot.*|.{0,10}(ro){0,1}bot[a-z,0-9]*\040(sveik|laba|swx|svx|sveix).*)\" => \"$time, $userdata[user_name]. $timemsg\",
         \".{0,7}(norm|ger|nuosta|ideal).*[a-z,0-9]*\040(ro){0,1}bot.*\" => \"Nuostabu :D Džiaugiuosi dėl tavęs :)\",
         \"(dux|duch|lox|loch|ble|nx|nach|nah|nax|pisk|cbb|bbd|debi|peder|pydar|rupus miltai|posimts pypkiu|paci|a?).*\" => \"\".$userdata['user_name'].\", Nesikeik! :|\",
         \".{0,10}(ro){0,1}bot[a-z,0-9]*\040(uzmu|nuzud|papj).*\" => \"Jau bėgu :D\",
         \"[^[a-z,0-9]]*.*bot.*\" => \"Aš robotas :). Kas kvietėt?\"
         
      );
         
     
     
      $rezas = false;
      foreach ($QA as $q => $a) {
      if (ereg($q, $msg)) {
      $rezas = true;
      $atsakymas = $a;
      break;
      }
      }
     
      //botas baigesi
      
      
      
      
      
      
      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 ('Pagalbos Robotukas', '$atsakymas', '\".(time() + 1).\"', '0.0.0.0')\");

         $result = dbquery(\"INSERT INTO \".DB_SHOUTBOX.\" (shout_name, shout_message, shout_datestamp, shout_ip, shout_ip_type, shout_hidden) VALUES ('$shout_name', '$shout_message', '\".time().\"', '\".USER_IP.\"', '\".USER_IP_TYPE.\"', '0')\");
         }
      }
      redirect($link);
   }
   if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == \"edit\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
      $esresult = dbquery(
         \"SELECT ts.shout_id, ts.shout_name, ts.shout_message, 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['SB_name'].\"
\n\";
      echo \"
\n\";
      echo $locale['SB_message'].\"
\n\";
   }
   echo \"
\n\";
   echo display_bbcodes(\"150px;\", \"shout_message\", \"shout_form\", \"smiley|b|u|url|color\").\"\n\";
   if (iGUEST) {
      echo $locale['SB_validation_code'].\"
\n\";
      echo \"''
\n\";
      echo \"''\n\";
      echo \">''
\n\";
      echo $locale['SB_enter_validation_code'].\"
\n
\n\";
   }
   echo \"
\n\";
   echo \"
\n
\n\";
} else {
   echo \"
\".$locale['SB_login_req'].\"

\n\";
}
$numrows = dbcount(\"(shout_id)\", DB_SHOUTBOX, \"shout_hidden='0'\");
$result = dbquery(
   \"SELECT ts.shout_id, ts.shout_name, ts.shout_message, ts.shout_datestamp, tu.user_id, tu.user_name, tu.user_status
   FROM \".DB_SHOUTBOX.\" ts
   LEFT JOIN \".DB_USERS.\" tu ON ts.shout_name=tu.user_id
   WHERE shout_hidden='0'
   ORDER BY ts.shout_datestamp DESC LIMIT 0,\".$shout_settings['visible_shouts']
);
if (dbrows($result)) {
   $i = 0;
   while ($data = dbarray($result)) {
      echo \"
\";
      if ($data['user_name']) {
         echo \"\".profile_link($data['shout_name'], $data['user_name'], $data['user_status']).\"\n\";
      } else {
         echo $data['shout_name'].\"\n\";
      }
      echo \"
\n\";
      echo \"
\".showdate(\"forumdate\", $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['SB_edit'].\"]\n\";
         echo \"[>\".$locale['SB_delete'].\"]
\n\";
      }
      $i++;
      if ($i != $numrows) { echo \"
\n\"; }
   }
   if ($numrows > $shout_settings['visible_shouts']) {
      echo \"\n\";
   }
} else {
   echo \"
\".$locale['SB_no_msgs'].\"
\n\";
}
closeside();
?>



Redagavo Exceptio 2012-11-29 17:53
 
PM
MariukasR
#7 Spausdinti pranešimą
parašyta 2012-11-29 17:56
Vartotojo avataras

Moderatorius



Reputacija: 0

Pranešimai: 435
Įstojo: 2010-11-12

Neveiks ant naujausios PHP versijos nes naudojama ereg f-ja :)

Gal ne visk� pakei�iau, bet jei Neono nesuveiks variantas meginkit mano ki?ti *nezinau*

Download source  Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 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\"); }

include_once INFUSIONS.\"shoutbox_panel/infusion_db.php\";
include_once INCLUDES.\"infusions_include.php\";

// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS.\"shoutbox_panel/locale/\".$settings['locale'].\".php\")) {
   // Load the locale file matching the current site locale setting.
   include INFUSIONS.\"shoutbox_panel/locale/\".$settings['locale'].\".php\";
} else {
   // Load the infusion's default locale file.
   include INFUSIONS.\"shoutbox_panel/locale/English.php\";
}

$shout_settings = get_settings(\"shoutbox_panel\");

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

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);
}

if (!function_exists(\"sbwrap\")) {
   function sbwrap($text) {
      global $locale;

      $i = 0; $tags = 0; $chars = 0; $res = \"\";

      $str_len = strlen($text);

      for ($i = 0; $i < $str_len; $i++) {
         $chr = mb_substr($text, $i, 1, $locale['charset']);
         if ($chr == \"<\") {
            if (mb_substr($text, ($i + 1), 6, $locale['charset']) == \"a href\" || mb_substr($text, ($i + 1), 3, $locale['charset']) == \"img\") {
               $chr = \" \".$chr;
               $chars = 0;
            }
            $tags++;
         } elseif ($chr == \"&\") {
            if (mb_substr($text, ($i + 1), 5, $locale['charset']) == \"quot;\") {
               $chars = $chars - 5;
            } elseif (mb_substr($text, ($i + 1), 4, $locale['charset']) == \"amp;\" || mb_substr($text, ($i + 1), 4, $locale['charset']) == \"#39;\" || mb_substr($text, ($i + 1), 4, $locale['charset']) == \"#92;\") {
               $chars = $chars - 4;
            } elseif (mb_substr($text, ($i + 1), 3, $locale['charset']) == \"lt;\" || mb_substr($text, ($i + 1), 3, $locale['charset']) == \"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['SB_title']);
if (iMEMBER || $shout_settings['guest_shouts'] == \"1\") {
   include_once INCLUDES.\"bbcode_include.php\";
   if (isset($_POST['post_shout'])) {
      $flood = false;
      if (iMEMBER) {
         $shout_name = $userdata['user_id'];
      } elseif ($shout_settings['guest_shouts'] == \"1\") {
         $shout_name = trim(stripinput($_POST['shout_name']));
         $shout_name = preg_replace(\"(^[+0-9\s]*)\", \"\", $shout_name);
         if (isnum($shout_name)) { $shout_name = \"\"; }
         include_once INCLUDES.\"captchas/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)));
     
     
     
     
     
       //pradedam boto koda
     
      $h = date(\"H\", time());
     
      if ($h > 00 && $h <= 05) {
      $time = \"Laba naktis\";
      $timemsg = \"Ne laikas miegoti dar?\";
      } elseif ($h > 05 && $h <= 10) {
      $time = \"Labas rytas\";
      $timemsg = \"Kaip miegojai?\";
      } elseif ($h > 10 && $h <= 18) {
      $time = \"Laba diena\";
      $timemsg = \"Kaip einasi?\";
      } elseif ($h > 18 && $h <= 21) {
      $time = \"Labas vakaras\";
      $timemsg = \"Kaip sekasi?\";
      } elseif ($h > 21 && $h <= 23) {
      $time = \"Laba naktis\";
      $timemsg = \"Ne laikas miegoti dar?\";
      }
     
   $msg = strtolower($_POST['shout_message']);
   $msg = str_replace(array(\":\",\"<\",\">\",\"@\",\"#\",\"$\",\"%\",\"^\",\"&\",\"*\",\"(\",\")\",\"_\",\"=\",\"+\",\"/\",\"-\", \"?\", \",\", \"'\", \"`\", \"!\", \".\"), \"\", $msg);
   $msg = str_replace(array(\"ą\", \"č\", \"ę\", \"ė\", \"į\", \"š\", \"ų\", \"ū\", \"ž\"), array(\"a\", \"c\", \"e\", \"e\", \"i\", \"s\", \"u\", \"u\", \"z\"), $msg);
   
   // klausimus rasom be zenklu, kurie yra $pakeisti array'uje
      $QA = array (
         
         \"(.{0,10}(sveik|laba|swx|svx|sveix).*[a-z,0-9]*\040(ro){0,1}bot.*|.{0,10}(ro){0,1}bot[a-z,0-9]*\040(sveik|laba|swx|svx|sveix).*)\" => \"$time, $userdata[user_name]. $timemsg\",
         \".{0,7}(norm|ger|nuosta|ideal).*[a-z,0-9]*\040(ro){0,1}bot.*\" => \"Nuostabu :D Džiaugiuosi dėl tavęs :)\",
         \"(dux|duch|lox|loch|ble|nx|nach|nah|nax|pisk|cbb|bbd|debi|peder|pydar|rupus miltai|posimts pypkiu|paci|a?).*\" => \"\".$userdata['user_name'].\", Nesikeik! :|\",
         \".{0,10}(ro){0,1}bot[a-z,0-9]*\040(uzmu|nuzud|papj).*\" => \"Jau bėgu :D\",
         \"[^[a-z,0-9]]*.*bot.*\" => \"Aš robotas :). Kas kvietėt?\"
         
      );
         
     
     
      $rezas = false;
      foreach ($QA as $q => $a) {
      if (preg_match($q, $msg)) {
      $rezas = true;
      $atsakymas = $a;
      break;
      }
      }
     
      //botas baigesi
     
     
     
     
     
     
      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 ('Pagalbos Robotukas', '$atsakymas', '\".(time() + 1).\"', '0.0.0.0')\");

         $result = dbquery(\"INSERT INTO \".DB_SHOUTBOX.\" (shout_name, shout_message, shout_datestamp, shout_ip, shout_ip_type, shout_hidden) VALUES ('$shout_name', '$shout_message', '\".time().\"', '\".USER_IP.\"', '\".USER_IP_TYPE.\"', '0')\");
         }
      }
      redirect($link);
   }
   if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == \"edit\") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
      $esresult = dbquery(
         \"SELECT ts.shout_id, ts.shout_name, ts.shout_message, 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['SB_name'].\"
\n\";
      echo \"
\n\";
      echo $locale['SB_message'].\"
\n\";
   }
   echo \"
\n\";
   echo display_bbcodes(\"150px;\", \"shout_message\", \"shout_form\", \"smiley|b|u|url|color\").\"\n\";
   if (iGUEST) {
      echo $locale['SB_validation_code'].\"
\n\";
      echo \"''
\n\";
      echo \"''\n\";
      echo \">''
\n\";
      echo $locale['SB_enter_validation_code'].\"
\n
\n\";
   }
   echo \"
\n\";
   echo \"
\n
\n\";
} else {
   echo \"
\".$locale['SB_login_req'].\"

\n\";
}
$numrows = dbcount(\"(shout_id)\", DB_SHOUTBOX, \"shout_hidden='0'\");
$result = dbquery(
   \"SELECT ts.shout_id, ts.shout_name, ts.shout_message, ts.shout_datestamp, tu.user_id, tu.user_name, tu.user_status
   FROM \".DB_SHOUTBOX.\" ts
   LEFT JOIN \".DB_USERS.\" tu ON ts.shout_name=tu.user_id
   WHERE shout_hidden='0'
   ORDER BY ts.shout_datestamp DESC LIMIT 0,\".$shout_settings['visible_shouts']
);
if (dbrows($result)) {
   $i = 0;
   while ($data = dbarray($result)) {
      echo \"
\";
      if ($data['user_name']) {
         echo \"\".profile_link($data['shout_name'], $data['user_name'], $data['user_status']).\"\n\";
      } else {
         echo $data['shout_name'].\"\n\";
      }
      echo \"
\n\";
      echo \"
\".showdate(\"forumdate\", $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['SB_edit'].\"]\n\";
         echo \"[>\".$locale['SB_delete'].\"]
\n\";
      }
      $i++;
      if ($i != $numrows) { echo \"
\n\"; }
   }
   if ($numrows > $shout_settings['visible_shouts']) {
      echo \"\n\";
   }
} else {
   echo \"
\".$locale['SB_no_msgs'].\"
\n\";
}
closeside();
?>




Redagavo MariukasR 2012-11-29 17:58
moderator
 
PM
jawa
#8 Spausdinti pranešimą
parašyta 2012-11-29 19:26
Vartotojo avataras

Savekas



Reputacija: 0

Pranešimai: 126
Įstojo: 2007-04-24

pas mane ajax shoutas. galite i ji ikishti, stai shoutas ;)

http://cshard.lt/..._panel.rar
http://sensation-...
 
PM
gipsy
#9 Spausdinti pranešimą
parašyta 2012-11-29 21:50
Vartotojo avataras

Moderatorius



Reputacija: 0

Pranešimai: 585
Įstojo: 2009-10-21

Neveik su naujausiu Mariuk..
Gryzau Valio
 
PM
MariukasR
#10 Spausdinti pranešimą
parašyta 2012-11-29 22:16
Vartotojo avataras

Moderatorius



Reputacija: 0

Pranešimai: 435
Įstojo: 2010-11-12

O su neono ?
moderator
 
PM
gipsy
#11 Spausdinti pranešimą
parašyta 2012-11-29 22:37
Vartotojo avataras

Moderatorius



Reputacija: 0

Pranešimai: 585
Įstojo: 2009-10-21

Tai pat.
Uzduodant koki nors klausima pvz: Kiek valandu arba Labas rytas
Gale ismeta tesiog nauja post be teksto.
Cia ant abieju kodu
www.part.lt/img/99b12321268d856f6b99578d61032032334.png
Redagavo gipsy 2012-11-29 22:38
Gryzau Valio
 
PM
MariukasR
#12 Spausdinti pranešimą
parašyta 2012-11-29 22:46
Vartotojo avataras

Moderatorius



Reputacija: 0

Pranešimai: 435
Įstojo: 2010-11-12

Reikia perdaryti vis� exp�, nes jau�iu iki atsakymo nedaeina :S
moderator
 
PM
jawa
#13 Spausdinti pranešimą
parašyta 2012-11-30 06:46
Vartotojo avataras

Savekas



Reputacija: 0

Pranešimai: 126
Įstojo: 2007-04-24

Ai beto, pas mane botas po kiekvieno posto atrasho. bet ka rasai i shoutboxa, jis vistiek raso tuscia zinute.

P.S. pas mane tai pat nei MariukasR nei Neono neveikia
http://sensation-...
 
PM
gipsy
#14 Spausdinti pranešimą
parašyta 2012-11-30 20:16
Vartotojo avataras

Moderatorius



Reputacija: 0

Pranešimai: 585
Įstojo: 2009-10-21

Na jaigu kas gales su savo svelniomis ir sventomis rankutemes prisilieskit prie koduko sio ir istaisikit :D:|
Gryzau Valio
 
PM
lux66x
#15 Spausdinti pranešimą
parašyta 2012-12-02 21:33
Naujokas



Reputacija: 0

Pranešimai: 7
Įstojo: 2010-09-04

Turiu padaryta ant v7 ajax ?aukyklos. Tik jis integruotas su minecraft servu
 
PM
jawa
#16 Spausdinti pranešimą
parašyta 2012-12-03 14:33
Vartotojo avataras

Savekas



Reputacija: 0

Pranešimai: 126
Įstojo: 2007-04-24

lux66x , numesk cia failus jeigu gali, pasiziuresim ...

Na tai viskas. pakeleme tema, o dabar tyla ? ...
Redagavo jawa 2012-12-05 15:26
http://sensation-...
 
PM
Peršokti į forumą: