Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: WeberiZ VIP sistema

Parašė weberiz· 2011 Lap. 23 21:11:08
#1

Sukūrė WeberiZ
puslapis: http://weberiz.tt.lt

Versija: 0.9.0 BETA
Versija: 0.9.1 BETA Ištaisyta keleta klaidu
php-fusion: 7.1 ištestuota
Ka galiu pasakyt man lietuviu kalbos gramatika nieka gera :) tai nepykit galit pataisyt jei nesunku :)
SKAITYTI.txt ->
---APRAŠIMAS---
Šios vip sistemos kurėjais yra weberiz
ši sistema skirta php-fusion kad surinkti
mokėjimus už vip ši sistema yra daugiašalyste
galite naudoti su bet kokia šalimi ir ji veiks
wvip.php failas yra padarytas tik šeip kad paroditi
kaip reikia siusti
---Instaliacija---
webtopay versija: 1.5

1.Sukelkite files folderije esančius folderius į savo pagrindine direktorija puslapio tai pvz public_html
2.Nueikite administracija->sistemos admin->injekcijos ir instaliokite
3.Atsidarykite maincore.php faila kuris yra pagrindineje direktorijoje ir prieš
?>
įdėkite koda
include_once INFUSIONS."weberiz_vip/wfunctions.php";
4. eikite i admin ir i paskutine skilti-> WVIP sistema-> nustatimai ir redaguokite mokejimai kur paslaptis dėkite savo mokėjimai.lt projekto slaptažodi
5.kurti raktažodi su nuoroda http://puslapis.lt/infusions/web...ip_get.php
sukure raktažodžius nueja i nustatimai ikelkite tokia tvarka
pavadinimas:"suma centais"-"šalis 2 raidžiu"-"numeris kurio siusti" pvz: 100-LT-1379
Nustatimas: įrašykite kiek dienu gaus už ta suma
6. instaliacija baigta :) nepamirškite wvip.php redaguotis pagal save kaip atrodytu :)

---NAUDOJIMAS---

norit kad tik vip narys matytu naudokite
iVIP
pvz:

if (iVIP) {
	echo "tu vip narys";
}

galima dar naudoti

echo iVIPPAV;

su šio kodu jei bus vip rodis vip ženkleli nariui kuris yra vip
norit kad forume ar dar kur prie nariu nick ar dar kur butu kas nors naudokite
VIP(nario id)
pvz:

if(VIP($data['user_id'])) {
	echo "šis narys vip";
}

yra dar viena šios funcijos galimybe tai paroditi vip ženkleli

echo VIP($data['user_id'],true);





Siustis: weberiz_vip-0,9,1.rar - 18.7 Kb
Mano paslaugos : https://webdnd.com/weberiz-vip-s...

Redagavo weberiz· 2011 Lap. 26 16:11:07

Parašė acTesT.· 2011 Lap. 23 22:11:39
#2

Kuo šis VIP skiriasi nuo kito VIP kuris taipogi yra šiame forume?

Tik tuo, kad yra daugiau šalių?

Redagavo acTesT.· 2011 Lap. 23 22:11:05

Parašė weberiz· 2011 Lap. 24 11:11:34
#3

anas išvis neveik :D gedimas yra vienas
daugiau funkciju ir tiek :)
gali visas šalis naudoti
mokejimai pass admine o ne faile kaip anam :)

beto laukiu patarimu patobulinimui :)

Redagavo weberiz· 2011 Lap. 24 11:11:59

Parašė Skirmantas.· 2011 Lap. 24 12:11:10
#4

Kokiai sistemai pritaikyta parašyk.

Parašė weberiz· 2011 Lap. 24 13:11:54
#5

7.1 bent testavau su ja :) turėtu ir su kitom V7 veikti manau :)

Parašė KiraLT· 2011 Lap. 24 15:11:57
#6

Kai turesiu laiko ištestuosiu ir parašysiu ką reiktu patobulinti.

Parašė FTW· 2011 Lap. 24 23:11:31
#7

Gal kas patikrinot šią VIP sistemą?
?|

Beje Gintarai, kuri sistemas pagal užsakymus? ;]

Parašė weberiz· 2011 Lap. 25 12:11:47
#8

taip kuriu viska tam ir įdėjau kad pasidaryt reklama sau :D

Parašė ZW· 2011 Lap. 25 20:11:24
#9

Parsisiunciau...

Ziuresim kas cia naujo...

Dekui... +11 :)

Parašė weberiz· 2011 Lap. 26 16:11:31
#10

Rasta keleta klaidu, siuskites nauja versija :) 0.9.1
jei jau idėgete 0.9.0 tik failus tuomet pakeiskite :)

Parašė DEMONAS.LT· 2011 Lap. 26 17:11:06
#11

Juokas suiimė dėl puslapio išvaizdos kurią nukopijavai iš themeforest.com :]:D

Redagavo DEMONAS.LT· 2011 Lap. 26 18:11:22

Parašė weberiz· 2011 Lap. 26 18:11:36
#12

Nekopijavau o mokėjau 8dolerius ;)

Redagavo weberiz· 2011 Lap. 26 18:11:01

Parašė tata· 2011 Gru. 13 12:12:58
#13

O galit kas pasakyti kaip panaikinti ta VIP, nes dar pas mane padare kad turini matytu tik VIP nariai, bet noriu jau visiems leisti kad matytu, bet ne as dejau ta vip tad nezinau ka redaguoti

Parašė weberiz· 2011 Gru. 13 19:12:16
#14

surask iVIP ir panaikink if(iVIP) { ir surask jo gala } toki ir ji panaikink

neradot dar klaidų?

Parašė weberiz· 2012 Vas. 25 18:02:28
#15

Sveiki taigi neradote klaidų? senoka jau tema tai gal nesupyks ka 2post iš eilės

Redagavo weberiz· 2012 Vas. 25 18:02:52

Parašė T-Boy· 2012 Bal. 4 19:04:37
#16

Ši sistema pritaikyti naujausiai PHP-Fusiono versijai? T.y. v7.02.04

Parašė ZW· 2012 Bal. 4 20:04:26
#17

T-Boy parašė:
Ši sistema pritaikyti naujausiai PHP-Fusiono versijai? T.y. v7.02.04


Bandziau su naujausia...

Lyg viskas veikia...

Parašė BUZ FM· 2012 Bal. 6 12:04:05
#18

si vip sistema tikrai veikia... as jau isbandes;)

Parašė iGolf· 2012 Bal. 6 12:04:48
#19

Čia senoka yra naujesnė, ir patogesnė mano manymu: http://modai.webdnd.com/moduliai...mai.LT,960 :)

Parašė weberiz· 2012 Bal. 6 20:04:06
#20

na nežinau kaip kam bet daugumai nepatink per failus lakstyt bei mano vip sistema gali naudot su visom šalim :) ir gali keleta imest tai pvz 1 sav 1men ir 1metus atskirus raktus :) bet aišku dėl šito biški sudetinga pasidaro instaliacijai :) bet taip tai jei ne pirma kaipsakant kart prie fusion tai nekyla problemu

Parašė Artis1393· 2013 Bir. 18 18:06:06
#21

Kur tuos kodus rašyti kur ant pabaigos įvairus variantai yra.

Parašė weberiz· 2013 Bir. 19 17:06:03
#22

žiurint ka nori padaryt

Parašė Kižas· 2013 Lie. 13 23:07:29
#23

Bandau padaryti, kad rodytu vip zenkleli prie nario niko komentaru skiltyje tarkim naujienu komentaruose, taigi kodas toks taciau nieko nerodo .... kame dela ?


  $gold = "";
if (VIP($data['comment_name'])) {
        $gold = "<img src='http://name.lt/images/auksas.gif'title='VIP Narys'>";
    }else{
         $gold = "";
}

Parašė weberiz· 2013 Lie. 14 00:07:12
#24

tu name naudoji kuriame yra vartotojo vardas o reikia kad butu vartotojo id (user_id) gal but kad tiktu $data['comment_id'] beto else nenaudok nes jau taip padariai gold tuščia :)

Parašė Kižas· 2013 Lie. 14 19:07:04
#25

Niekaip nepavyksta ideti sito kodo kad normaliai rodytu ta zenkliuka prie pakomentavusio nario nick, stai pridedu comments_include.php faila

<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright � 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------+
| Created for PHP-FUSION 6.01.12
| � 2007 by AlexALX
| http://www.alexalx-soft.com/
+----------------------------------------------------*/

/*
  Created for PHP-FUSION 6.01.12
  � 2007 by AlexALX
  http://www.alexalx-soft.com/
*/

if (!defined("IN_FUSION")) { header("Location:../index.php"); exit; }

include LOCALE.LOCALESET."comments.php";

function make_codes0_captcha() {
   global $settings;
   srand((double)microtime() * 1000000);
   $temp_num = md5(rand(0,9999));
   $captcha_string = substr($temp_num, 17, 5);
   $captcha_encode = md5($temp_num);
   $result = mysql_query("INSERT INTO ".DB_PREFIX."captcha (captcha_datestamp, captcha_ip, captcha_encode, captcha_string) VALUES('".time()."', '".USER_IP."', '$captcha_encode', '$captcha_string')");
   $result = dbquery("SELECT * FROM ".DB_PREFIX."comments_settings");
   $data = dbarray($result);
if ($data['code1'] == "0") {
      return "<input type='hidden' name='captcha_encode' value='".$captcha_encode."'><img src='".INCLUDES."captcha_include.php?captcha_code=".$captcha_encode."' alt='' />\n";
   } else {
      return "<input type='hidden' name='captcha_encode' value='".$captcha_encode."'><strong>".$captcha_string."</strong>\n";
   }
}
function check_captcha_cods($captchs_encode, $captcha_string) {
   if (preg_match("/^[0-9a-z]+$/", $captchs_encode) && preg_match("/^[0-9a-z]+$/", $captcha_string)) {
      $result = dbquery("SELECT * FROM ".DB_PREFIX."captcha WHERE captcha_ip='".USER_IP."' AND captcha_encode='".$captchs_encode."' AND captcha_string='".$captcha_string."'");
      if (dbrows($result)) {
         $result = dbquery("DELETE FROM ".DB_PREFIX."captcha WHERE captcha_ip='".USER_IP."' AND captcha_encode='".$captchs_encode."' AND captcha_string='".$captcha_string."'");
         return true;
      } else {
         return false;
      }
   } else {
      return false;
   }
}



   //$result = dbquery("SELECT * FROM ".DB_PREFIX."comments_settings");
   ////$data = dbarray($result);   
   //$enable_post = $data['enable_post'];
   //$enable_kod = $data['enable_kod'];
   //$post1 = $data['post1'];
function showcomments($ctype,$cdb,$ccol,$cid,$clink) {

   global $settings,$locale,$userdata,$aidlink;

   $result = dbquery("SELECT * FROM ".DB_PREFIX."comments_settings");
   $data = dbarray($result);   
   $enable_post = $data['enable_post'];
   $enable_kod = $data['enable_kod'];
   $post1 = $data['post1'];
if ($enable_kod == "1") {

if (iGUEST) {
if (isset($_POST['post_comment'])) {
if (!check_captcha_cods($_POST['captcha_encode'], $_POST['captcha_code'])) {
         $error .= $locale['c108']."<br />\n";
      }  else {

$error = "";
      $flood = false;
if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
         fallback(BASEDIR."index.php");
      }

$comment_name = trim(stripinput($_POST['comment_name']));
         $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
if (isNum($comment_name)) $comment_name="";
      $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
      $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
if ($comment_name != "" && $comment_message != "") {
         $result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'");
         if (!iSUPERADMIN || dbrows($result) > 0) {
            $data = dbarray($result);
            if ((time() - $data['last_comment']) < $settings['flood_interval']) {
               $flood = true;
               $result = dbquery("INSERT INTO ".DB_PREFIX."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
               if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
                  if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
               }
            }
         }      
if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");                           
      } redirect($clink);
   tablebreak();

}
}
}
   $result = dbquery("SELECT * FROM ".DB_PREFIX."comments_settings");
   $data = dbarray($result);   
   $enable_post = $data['enable_post'];
   $enable_kod = $data['enable_kod'];
   $post1 = $data['post1'];
if ($post1 == "0") {
if (isset($_POST['post_comment'])) {
if (iMEMBER) {
$error = "";
//$error = $locale['c108']."<br />\n";
      $flood = false;
if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
         fallback(BASEDIR."index.php");
      }
$comment_name = $userdata['user_id'];
//$comment_name = trim(stripinput($_POST['comment_name']));

      //   $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
//if (isNum($comment_name)) $comment_name="";
      $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
      $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
if ($comment_name != "" && $comment_message != "") {
         $result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'");
         if (!iSUPERADMIN || dbrows($result) > 0) {
            $data = dbarray($result);
            if ((time() - $data['last_comment']) < $settings['flood_interval']) {
               $flood = true;
               $result = dbquery("INSERT INTO ".DB_PREFIX."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
               if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
                  if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
               }
            }
         }      
if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
      } redirect($clink);
   tablebreak();
}
}
}
   $result = dbquery("SELECT * FROM ".DB_PREFIX."comments_settings");
   $data = dbarray($result);   
   $enable_post = $data['enable_post'];
   $enable_kod = $data['enable_kod'];
   $post1 = $data['post1'];
if ($post1 == "1") {
if (isset($_POST['post_comment'])) {
if (iMEMBER && !iADMIN) {
if (!check_captcha_cods($_POST['captcha_encode'], $_POST['captcha_code'])) {
         $error .= $locale['c108']."<br />\n";
      }  else {

//$error = "";
//$error = $locale['c108']."<br />\n";
      $flood = false;
if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
         fallback(BASEDIR."index.php");
      }
$comment_name = $userdata['user_id'];
//$comment_name = trim(stripinput($_POST['comment_name']));

      //   $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
//if (isNum($comment_name)) $comment_name="";
      $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
      $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
if ($comment_name != "" && $comment_message != "") {
         $result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'");
         if (!iSUPERADMIN || dbrows($result) > 0) {
            $data = dbarray($result);
            if ((time() - $data['last_comment']) < $settings['flood_interval']) {
               $flood = true;
               $result = dbquery("INSERT INTO ".DB_PREFIX."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
               if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
                  if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
               }
            }
         }      
if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
      } redirect($clink);
   tablebreak();

}
} else if (iADMIN) {

      $flood = false;
if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
         fallback(BASEDIR."index.php");
      }
$comment_name = $userdata['user_id'];
//$comment_name = trim(stripinput($_POST['comment_name']));

      //   $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
//if (isNum($comment_name)) $comment_name="";
      $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
      $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
if ($comment_name != "" && $comment_message != "") {
         $result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'");
         if (!iSUPERADMIN || dbrows($result) > 0) {
            $data = dbarray($result);
            if ((time() - $data['last_comment']) < $settings['flood_interval']) {
               $flood = true;
               $result = dbquery("INSERT INTO ".DB_PREFIX."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
               if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
                  if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
               }
            }
         }      
if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
      } redirect($clink);
   tablebreak();

}
}
}




   $result = dbquery("SELECT * FROM ".DB_PREFIX."comments_settings");
   $data = dbarray($result);   
   $enable_post = $data['enable_post'];
   $enable_kod = $data['enable_kod'];
   $post1 = $data['post1'];
if ($post1 == "2") {
if (isset($_POST['post_comment'])) {
if (iMEMBER && !iSUPERADMIN) {
if (!check_captcha_cods($_POST['captcha_encode'], $_POST['captcha_code'])) {
         $error .= $locale['c108']."<br />\n";
      }  else {

//$error = "";
//$error = $locale['c108']."<br />\n";
      $flood = false;
if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
         fallback(BASEDIR."index.php");
      }
$comment_name = $userdata['user_id'];
//$comment_name = trim(stripinput($_POST['comment_name']));

      //   $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
//if (isNum($comment_name)) $comment_name="";
      $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
      $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
if ($comment_name != "" && $comment_message != "") {
         $result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'");
         if (!iSUPERADMIN || dbrows($result) > 0) {
            $data = dbarray($result);
            if ((time() - $data['last_comment']) < $settings['flood_interval']) {
               $flood = true;
               $result = dbquery("INSERT INTO ".DB_PREFIX."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
               if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
                  if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
               }
            }
         }      
if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
      } redirect($clink);
   tablebreak();

}
} else if (iSUPERADMIN) {

      $flood = false;
if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
         fallback(BASEDIR."index.php");
      }
$comment_name = $userdata['user_id'];
//$comment_name = trim(stripinput($_POST['comment_name']));

      //   $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
//if (isNum($comment_name)) $comment_name="";
      $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
      $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
if ($comment_name != "" && $comment_message != "") {
         $result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'");
         if (!iSUPERADMIN || dbrows($result) > 0) {
            $data = dbarray($result);
            if ((time() - $data['last_comment']) < $settings['flood_interval']) {
               $flood = true;
               $result = dbquery("INSERT INTO ".DB_PREFIX."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
               if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
                  if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
               }
            }
         }      
if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
      } redirect($clink);
   tablebreak();

}
}
}




   $result = dbquery("SELECT * FROM ".DB_PREFIX."comments_settings");
   $data = dbarray($result);   
   $enable_post = $data['enable_post'];
   $enable_kod = $data['enable_kod'];
   $post1 = $data['post1'];

if ($post1 == "3") {
if (isset($_POST['post_comment'])) {
if (iMEMBER) {
if (!check_captcha_cods($_POST['captcha_encode'], $_POST['captcha_code'])) {
         $error .= $locale['c108']."<br />\n";
      }  else {

//$error = "";
//$error = $locale['c108']."<br />\n";
      $flood = false;
if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
         fallback(BASEDIR."index.php");
      }
$comment_name = $userdata['user_id'];
//$comment_name = trim(stripinput($_POST['comment_name']));

      //   $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
//if (isNum($comment_name)) $comment_name="";
      $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
      $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
if ($comment_name != "" && $comment_message != "") {
         $result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'");
         if (!iSUPERADMIN || dbrows($result) > 0) {
            $data = dbarray($result);
            if ((time() - $data['last_comment']) < $settings['flood_interval']) {
               $flood = true;
               $result = dbquery("INSERT INTO ".DB_PREFIX."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
               if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
                  if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
               }
            }
         }      
if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
      } redirect($clink);
   tablebreak();

}
}
}
}




} else {
if (isset($_POST['post_comment'])) {
      $flood = false;
if (dbrows(dbquery("SELECT $ccol FROM ".DB_PREFIX."$cdb WHERE $ccol='$cid'"))==0) {
         fallback(BASEDIR."index.php");
      }
if (iGUEST) {

$comment_name = trim(stripinput($_POST['comment_name']));
      
         $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
if (isNum($comment_name)) $comment_name="";
} else {
$comment_name = $userdata['user_id'];
}
      $comment_message = trim(stripinput(censorwords($_POST['comment_message'])));
      $comment_smileys = isset($_POST['disable_smileys']) ? "0" : "1";
if ($comment_name != "" && $comment_message != "") {
         $result = dbquery("SELECT MAX(comment_datestamp) AS last_comment FROM ".DB_PREFIX."comments WHERE comment_ip='".USER_IP."'");
         if (!iSUPERADMIN || dbrows($result) > 0) {
            $data = dbarray($result);
            if ((time() - $data['last_comment']) < $settings['flood_interval']) {
               $flood = true;
               $result = dbquery("INSERT INTO ".DB_PREFIX."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
               if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
                  if (iMEMBER) $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
               }
            }
         }      
if (!$flood) $result = dbquery("INSERT INTO ".DB_PREFIX."comments (comment_item_id, comment_type, comment_name, comment_message, comment_smileys, comment_datestamp, comment_ip) VALUES ('$cid', '$ctype', '$comment_name', '$comment_message', '$comment_smileys', '".time()."', '".USER_IP."')");
paygold($userdata['user_name'],$userdata['user_id'],1);
      } redirect($clink);
   tablebreak();

}
}

   opentable($locale['c100']);
   $result = dbquery(
      "SELECT tcm.*,user_name,user_avatar,enable_kod,enable_post,enable_avatar,post1,code1 FROM ".DB_PREFIX."comments tcm
      LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id
      LEFT JOIN ".DB_PREFIX."comments_settings ON
enable_kod=enable_kod
AND enable_post=enable_post
AND enable_avatar=enable_avatar
AND post1=post1
AND code1=code1
      WHERE comment_item_id='$cid' AND comment_type='$ctype'
      ORDER BY comment_datestamp ASC"
   );


   if (dbrows($result) != 0) {
      $i = 0;
      echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
      while ($data = dbarray($result)) {

         if ($data['enable_avatar'] == "1") {
         if ($data['user_avatar'] != "") {
            $avatar = "<td class='".($i% 2==0?"tbl1":"tbl2")."' width='1'><div
style='border: 2px dashed rgb(0, 255, 0); padding: 5px; height: 128px; width:100px;'><center><a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."'><img height='100' width='100' border='0'  src='".IMAGES."avatars/".$data['user_avatar']."'></a></center><span style='color:black'>Komentarų:</span> <span style='color:red'>".number_format(dbcount("(comment_id)", "comments", "comment_name='".$data['comment_name']."'"))."</span><br><span style='color:black'>Naujienų:</span> <span style='color:red'>".number_format(dbcount("(news_id)","news","news_name='".$data['comment_name']."'"))."</span></div></td>\n";
         } else {
            $avatar = "<td class='".($i% 2==0?"tbl1":"tbl2")."' width='1'><div
style='border: 2px dashed rgb(0, 255, 0); padding: 5px; height: 128px; width:100px;'><center><a href='".INFUSIONS."avatar_studio/avatar_studio.php'><img src='http://topwarez.lt/themes/TOPWAREZ/images/noimage.gif' border='0'title='Pasirinkite Avatara'></a></center><span style='color:black'>Komentarų:</span> <span style='color:red'>".number_format(dbcount("(comment_id)", "comments", "comment_name='".$data['comment_name']."'"))."</span><br><span style='color:black'>Naujienų:</span> <span style='color:red'>".number_format(dbcount("(news_id)","news","news_name='".$data['comment_name']."'"))."</span></div></td>";
         }
 
         echo "<tr>".$avatar."<td class='".($i% 2==0?"tbl1":"tbl2")."' valign='top'><span class='comment-name'>\n";
} else {
echo "<tr><td class='".($i% 2==0?"tbl1":"tbl2")."' valign='top'><span class='comment-name'>\n";
}
         if ($data['user_name']) {
            echo "<a class='side' href='".BASEDIR."profile.php?lookup=".$data['comment_name']."'><span style='color:red'>[</span>".$data['user_name']."<span style='color:red'>]</span></a>";
         } else {
            echo $data['comment_name'];
         }
         if ($data['comment_smileys'] == "1") {
            $comment_message = parsesmileys($data['comment_message']);
         } else {
            $comment_message = $data['comment_message'];
         }
         $comment_message = nl2br(parseubb($comment_message));
         echo "</span>\n<span class='small'>".$locale['041'].showdate("longdate", $data['comment_datestamp'])."</span><br>\n";
         echo $comment_message."</td>\n</tr>\n";
         $i++;
      }
//align='right'
      if (checkrights("C")) {
echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."' colspan=2><div align='right'><a href='".ADMIN."comments.php".$aidlink."&amp;ctype=$ctype&amp;cid=$cid'>".$locale['c106']."</a><br>".$locale['copy']."</div></td>\n</tr>\n";
   } else {
echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."' colspan=2>".$locale['copy']."</td>\n</tr>\n";
}
   echo "</table>\n";
   } else {
      echo $locale['c101']."\n";
   }
   closetable();
   tablebreak();
   $result = dbquery("SELECT * FROM ".DB_PREFIX."comments_settings");
   $data = dbarray($result);
   $enable_post = $data['enable_post'];
   opentable($locale['c102']);
//if ($enable_post == "1") {
   if (iMEMBER || $enable_post == "1") {
      echo "<form name='inputform' method='post' action='$clink'>
<table align='center' cellspacing='0' cellpadding='0' class='tbl'>\n";
      if (iGUEST) {
         echo "<tr>
<td>".$locale['c103']."</td>
</tr>
<tr>
<td><input type='text' name='comment_name' maxlength='30' class='textbox' style='width:100%;'></td>
</tr>\n";
}
   $result = dbquery("SELECT * FROM ".DB_PREFIX."comments_settings");
   $data = dbarray($result);
   $enable_post = $data['enable_post'];
   $enable_kod = $data['enable_kod'];
         if ($enable_kod == "1") {
   $result = dbquery("SELECT * FROM ".DB_PREFIX."comments_settings");
   $data = dbarray($result);
   $enable_post = $data['enable_post'];
   $enable_kod = $data['enable_kod'];
echo "<center><span style='color:#ff0000'>".$error."</span></center>";

if (iGUEST) {

      echo "<tr>\n<td class='tbl'>".$locale['c109'].": ";
      echo make_codes0_captcha();
      echo "<span style='color:#ff0000'>*</span><input type='text' name='captcha_code' class='textbox' style='width:100px'></td></tr>";
} if ($data['post1'] == "1") {
if (iMEMBER && !iADMIN) {

      echo "<tr>\n<td class='tbl'>".$locale['c109'].": ";
      echo make_codes0_captcha();
      echo "<span style='color:#ff0000'>*</span><input type='text' name='captcha_code' class='textbox' style='width:100px'></td></tr>";
}
} if ($data['post1'] == "2") {
if (iMEMBER && !iSUPERADMIN) {

      echo "<tr>\n<td class='tbl'>".$locale['c109'].": ";
      echo make_codes0_captcha();
      echo "<span style='color:#ff0000'>*</span><input type='text' name='captcha_code' class='textbox' style='width:100px'></td></tr>";
}
} if ($data['post1'] == "3") {
if (iMEMBER) {
      echo "<tr>\n<td class='tbl'>".$locale['c109'].": ";
      echo make_codes0_captcha();
      echo "<span style='color:#ff0000'>*</span><input type='text' name='captcha_code' class='textbox' style='width:100px'></td></tr>";
}
}


}
$home = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

      echo "<tr>
<td align='center'><textarea name='comment_message' rows='6' class='textbox' style='width:400px'></textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('comment_message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('comment_message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('comment_message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('comment_message', '
', '
');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('comment_message', '', '');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('comment_message', '
', '


');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('comment_message', '
', '
');\">
<br><br>
".displaysmileys("comment_message")."
</tr>
<tr>
<td align='center'><input type='checkbox' name='disable_smileys' value='1'>".$locale['c107']."<br><br>
<form name='reportform' method='post' action='".$home."'><input type='submit' name='post_comment' value='".$locale['c102']."' class='button'></td></form>
</table>
</form>\n";

   } else {
      echo $locale['c105']."\n";
   }
opentable("<center>Rašyti komentarą į facebook'ą:</center>");

 

$curlink = 'http://';

$curlink .= $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];

$curlink = urlencode($curlink);

 

echo "<table cellpadding='0' cellspacing='0' width='auto' class='center tbl-border'>\n<tr>\n";

 

                echo "</tr>\n<tr>\n";

                echo "<td class='tbl1'>\n";

                echo "<div id='fb-root'></div>

                                <script>

                                window.fbAsyncInit = function() {

                                FB.init({appId: '179795698741741', status: true, cookie: true,

                                         xfbml: true});

                                };

                                (function() {

                                var e = document.createElement('script'); e.async = true;

                                e.src = document.location.protocol +

                                '//connect.facebook.net/lt_LT/all.js';

                                document.getElementById('fb-root').appendChild(e);

                                }());

                                </script>\n";

                echo "<fb:comments xid='179795698741741' href='".$curlink."' numposts='5' width='auto' publish_feed='false' migrated='1'></fb:comments>\n";

                echo "</td></tr>\n</table>\n";

closetable();
   closetable();
}

?>



Parašė weberiz· 2013 Lie. 15 02:07:33
#26


   $result = dbquery(
      "SELECT tcm.*,user_name,user_avatar,enable_kod,enable_post,enable_avatar,post1,code1 FROM ".DB_PREFIX."comments tcm
      LEFT JOIN ".DB_PREFIX."users tcu ON tcm.comment_name=tcu.user_id
      LEFT JOIN ".DB_PREFIX."comments_settings ON
enable_kod=enable_kod
AND enable_post=enable_post
AND enable_avatar=enable_avatar
AND post1=post1
AND code1=code1
      WHERE comment_item_id='$cid' AND comment_type='$ctype'
      ORDER BY comment_datestamp ASC"
   );

pridėk dar user_id
kad trauktu
ir tada naudok $data['user_id']