PHP-Fusion Mods
Navigacija
Apsauga
Apsauga Neleista registracija: 38943
Šiandien: 20
Prisijungę nariai
» Svečių: 14
» Narių: 0

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

Prisijungimų istorija:
tabux19:59:38
sanpernepamenu
Zbigniew@nepamenu
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-03-21 19:07

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

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

Shoutbox Archive
Peržiūrėti temą
PHP-Fusion Mods :: PHP-Fusion modifikacijų forumas :: Taisymas
 Spausdinti temą
v7 ip_poll_panel
ChipsasMD
#1 Spausdinti pranešimą
parašyta 2011-02-25 04:09
Vartotojo avataras

Naujokas



Reputacija: 0

Pranešimai: 6
Įstojo: 2010-07-23

Sveiki, manau daugumai ?inoma modifikacija ip_poll_panel. Bet kiek ie?kojau, visur jinai palaiko iki 10-ies atsakym pasirinkim, gal kas galt padti pasidaryti daugiau? Kad ir 15, u?vedus ant kelio pasidaryiau ir pats, nes kiek band?iau, tiek meta errorus.

Redaguotini failai:

infusion.php

Download source  Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 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
+--------------------------------------------------------+
Przystosowanie do v7: bartek124
E-Mail: bartek124@php-fusion.pl
+--------------------------------------------------------*/
if (!defined(\"IN_FUSION\")) { die(\"Access Denied\"); }

include INFUSIONS.\"ip_poll_panel/infusion_db.php\";

if (file_exists(INFUSIONS.\"ip_poll_panel/locale/\".$settings['locale'].\".php\")) {
   include INFUSIONS.\"ip_poll_panel/locale/\".$settings['locale'].\".php\";
} else {
   include INFUSIONS.\"ip_poll_panel/locale/English.php\";
}

$inf_title = $locale['PLAN_TITLE'];
$inf_description = $locale['PLAN_DESC'];
$inf_version = \"1.0\";
$inf_developer = \"Digitanium & bartek124\";
$inf_email = \"digitanium@php-fusion.co.uk\";
$inf_weburl = \"http://www.php-fusion.co.uk\";

$inf_folder = \"ip_poll_panel\";

$inf_newtable[1] = DB_IP_POLLS.\" (
      poll_id mediumint(8) unsigned NOT NULL auto_increment,
      poll_title varchar(200) NOT NULL default '',
      poll_opt_0 varchar(200) NOT NULL default '',
      poll_opt_1 varchar(200) NOT NULL default '',
      poll_opt_2 varchar(200) NOT NULL default '',
      poll_opt_3 varchar(200) NOT NULL default '',
      poll_opt_4 varchar(200) NOT NULL default '',
      poll_opt_5 varchar(200) NOT NULL default '',
      poll_opt_6 varchar(200) NOT NULL default '',
      poll_opt_7 varchar(200) NOT NULL default '',
      poll_opt_8 varchar(200) NOT NULL default '',
      poll_opt_9 varchar(200) NOT NULL default '',
      poll_votes_0 MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
      poll_votes_1 MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
      poll_votes_2 MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
      poll_votes_3 MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
      poll_votes_4 MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
      poll_votes_5 MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
      poll_votes_6 MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
      poll_votes_7 MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
      poll_votes_8 MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
      poll_votes_9 MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
      poll_ips text NOT NULL,
      poll_started int(10) unsigned NOT NULL default '0',
      poll_ended int(10) unsigned NOT NULL default '0',
      PRIMARY KEY (poll_id)
   ) ENGINE=MyISAM;\";

$inf_droptable[1] = DB_IP_POLLS;

$inf_adminpanel[1] = array(
   \"title\" => $locale['PLAN_ADMIN1'],
   \"image\" => \"image.gif\",
   \"panel\" => \"ip_poll_admin.php\",
   \"rights\" => \"IPP\"
);
?>




ip_poll_admin.php

Download source  Code
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright (c) 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once \"../../maincore.php\";
require_once THEMES.\"templates/admin_header.php\";

include INFUSIONS.\"ip_poll_panel/infusion_db.php\";

if (file_exists(INFUSIONS.\"ip_poll_panel/locale/\".$settings['locale'].\".php\")) {
   include INFUSIONS.\"ip_poll_panel/locale/\".$settings['locale'].\".php\";
} else {
   include INFUSIONS.\"ip_poll_panel/locale/English.php\";
}

if (!checkrights(\"IPP\") || !defined(\"iAUTH\") || $_GET['aid'] != iAUTH) { redirect(\"../../index.php\"); }
if (isset($_GET['poll_id']) && !isnum($_GET['poll_id'])) redirect(\"../../index.php\");

if (isset($_POST['save'])) {
   $poll_title = stripinput($_POST['poll_title']);
   foreach($_POST['poll_option'] as $key => $value) {
      $poll_option[$key] = stripinput($_POST['poll_option'][$key]);
   }
   if (isset($_GET['poll_id'])) {
      if (!isNum($_GET['poll_id'])) { header(\"Location: \".FUSION_SELF); exit; }
      $ended = (isset($_POST['close']) ? time() : 0);
      $result = dbquery(\"UPDATE \".DB_IP_POLLS.\" SET poll_title='$poll_title', poll_opt_0='\".$_POST['poll_option'][0].\"', poll_opt_1='\".$_POST['poll_option'][1].\"', poll_opt_2='\".(isset($_POST['poll_option'][2]) ? $_POST['poll_option'][2] : \"\").\"', poll_opt_3='\".(isset($_POST['poll_option'][3]) ? $_POST['poll_option'][3] : \"\").\"', poll_opt_4='\".(isset($_POST['poll_option'][4]) ? $_POST['poll_option'][4] : \"\").\"', poll_opt_5='\".(isset($_POST['poll_option'][5]) ? $_POST['poll_option'][5] : \"\").\"', poll_opt_6='\".(isset($_POST['poll_option'][6]) ? $_POST['poll_option'][6] : \"\").\"', poll_opt_7='\".(isset($_POST['poll_option'][7]) ? $_POST['poll_option'][7] : \"\").\"', poll_opt_8='\".(isset($_POST['poll_option'][8]) ? $_POST['poll_option'][8] : \"\").\"', poll_opt_9='\".(isset($_POST['poll_option'][9]) ? $_POST['poll_option'][9] : \"\").\"', poll_ended='$ended' WHERE poll_id='\".$_GET['poll_id'].\"'\");
      opentable($locale['PLAN_400']);
      echo \"

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

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

\n
\n\";
      closetable();
   } else {
   
      $result = dbquery(\"UPDATE \".DB_IP_POLLS.\" SET poll_ended='\".time().\"' WHERE poll_ended='0'\");
      $result = dbquery(\"INSERT INTO \".DB_IP_POLLS.\" VALUES('', '$poll_title', '\".$_POST['poll_option'][0].\"', '\".$_POST['poll_option'][1].\"', '\".(isset($_POST['poll_option'][2]) ? $_POST['poll_option'][2] : \"\").\"', '\".(isset($_POST['poll_option'][3]) ? $_POST['poll_option'][3] : \"\").\"', '\".(isset($_POST['poll_option'][4]) ? $_POST['poll_option'][4] : \"\").\"', '\".(isset($_POST['poll_option'][5]) ? $_POST['poll_option'][5] : \"\").\"', '\".(isset($_POST['poll_option'][6]) ? $_POST['poll_option'][6] : \"\").\"', '\".(isset($_POST['poll_option'][7]) ? $_POST['poll_option'][7] : \"\").\"', '\".(isset($_POST['poll_option'][8]) ? $_POST['poll_option'][8] : \"\").\"', '\".(isset($_POST['poll_option'][9]) ? $_POST['poll_option'][9] : \"\").\"', '', '', '', '', '', '', '', '', '', '', '', '\".time().\"', '0')\");
      opentable($locale['PLAN_400']);
      echo \"

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

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

\n
\n\";
      closetable();
   }
} else if (isset($_POST['delete'])) {
   $result = dbquery(\"SELECT * FROM \".DB_IP_POLLS.\" WHERE poll_id='\".$_POST['poll_id'].\"'\");
   if (dbrows($result) != 0) $result = dbquery(\"DELETE FROM \".DB_IP_POLLS.\" WHERE poll_id='\".$_POST['poll_id'].\"'\");
   opentable($locale['PLAN_403']);
   echo \"

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

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

\n
\n\";
   closetable();
} else {
   if (isset($_POST['preview'])) {
      $poll = \"\"; $i = 0;
      $poll_title = stripinput($_POST['poll_title']);
      while ($i < count($_POST['poll_option'])) {
         $poll_option[$i] = stripinput($_POST['poll_option'][$i]);
         $poll .= \" $poll_option[$i]

\n\";
         $i++;
      }
      $opt_count = (isset($_POST['opt_count']) && $_POST['opt_count'] != 10 ? count($poll_option) : $_POST['opt_count']);
      opentable($locale['PLAN_410']);
      echo \"






$poll_title


$poll
\n\";
      closetable();
      tablebreak();
   }
   $editlist = \"\";
   $result = dbquery(\"SELECT * FROM \".DB_IP_POLLS.\" ORDER BY poll_id DESC\");
   if (dbrows($result) != 0) {
      while ($data = dbarray($result)) {
         $editlist .= \"\n\";
      }
      opentable($locale['PLAN_420']);
      echo \"






\n\";
      closetable();
      tablebreak();
   }
   if (isset($_POST['edit'])) {
      //if (!isNum($poll_id)) { header(\"Location: \".FUSION_SELF); exit; }
      $data = dbarray(dbquery(\"SELECT * FROM \".DB_IP_POLLS.\" WHERE poll_id='\".$_POST['poll_id'].\"'\"));
      $poll_title = $data['poll_title'];
      for ($i=0; $i<=9; $i++) {
         if ($data[\"poll_opt_\".$i]) $poll_option[$i] = $data[\"poll_opt_\".$i];
      }
      $opt_count = count($poll_option);
      $poll_started = $data['poll_started'];
      $poll_ended = $data['poll_ended'];
   }
   if (isset($_POST['addoption'])) {
      $poll_title = stripinput($_POST['poll_title']);
      foreach($_POST['poll_option'] as $key => $value) {
         $poll_option[$key] = stripinput($_POST['poll_option'][$key]);
      }
      $opt_count = ($_POST['opt_count'] != 10 ? count($poll_option) + 1 : $_POST['opt_count']);
   }
   $i = 0; $opt = 1;
   $poll_title = isset($poll_title) ? $poll_title : \"\";
   $opt_count = isset($opt_count) ? $opt_count : 2;
   if (isset($poll_id)) $poll_ended = isset($_POST['poll_ended']) ? $_POST['poll_ended'] : 0;
   opentable((isset($_POST['poll_id']) ? $locale['PLAN_431'] : $locale['PLAN_430']));
   echo \"





\n\";
   while ($i != $opt_count) {
      $poll_opt = isset($poll_option[$i]) ? $poll_option[$i] : \"\";
      echo \"\n\n\";
      echo \"\n\n\";
      $i++; $opt++;
   }
   echo \"
\".$locale['PLAN_433'].\"
\".$locale['PLAN_434'].\"$opt



\n\n

\n\";
   if (isset($_POST['poll_id']) && $poll_ended == 0) {
      echo \"\".$locale['PLAN_435'].\"

\n\";
   }
   if (!isset($_POST['poll_id']) || isset($_POST['poll_id']) && $poll_ended == 0) {
      echo \"


\n\";
   } else {
      echo $locale['PLAN_436'].showdate(\"shortdate\", $poll_started).\"
\n\";
      echo $locale['PLAN_437'].showdate(\"shortdate\", $poll_ended).\"
\n\";
   }
   echo \"
\n
\n\";
   closetable();
}

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




ip_poll_archive.php

Download source  Code
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright (c) 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once \"../../maincore.php\";
require_once THEMES.\"templates/header.php\";

include INFUSIONS.\"ip_poll_panel/infusion_db.php\";

if (file_exists(INFUSIONS.\"ip_poll_panel/locale/\".$settings['locale'].\".php\")) {
   include INFUSIONS.\"ip_poll_panel/locale/\".$settings['locale'].\".php\";
} else {
   include INFUSIONS.\"ip_poll_panel/locale/English.php\";
}

$result = dbquery(\"SELECT * FROM \".DB_IP_POLLS.\" WHERE poll_ended!='0' ORDER BY poll_id DESC\");
if (dbrows($result) != 0) {
   $view_list = \"\";
   while ($data = dbarray($result)) {
      $view_list .= \"\n\";
   }
   opentable($locale['PLAN_107']);
   echo \"


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




\n\";
   closetable();
}
if (isset($_POST['oldpoll_id'])) {
   $data = dbarray(dbquery(\"SELECT * FROM \".DB_IP_POLLS.\" WHERE poll_id='\".$_POST['oldpoll_id'].\"' AND poll_ended!='0'\"));
   $oldpoll_votes = 0;
   for ($i=0; $i<=9; $i++) {
      if ($data[\"poll_opt_\".$i]) $oldpoll_option[$i] = $data[\"poll_opt_\".$i];
      $oldpoll_votes = $oldpoll_votes + $data[\"poll_votes_\".$i];
   }
   $poll_archive = \"\"; $i = 0;
   while ($i < count($oldpoll_option)) {
      $oldnum_votes = $data[\"poll_votes_\".$i];
      $oldopt_votes = ($oldpoll_votes ? number_format(100 / $oldpoll_votes * $oldnum_votes) : 0);
      $poll_archive .= $oldpoll_option[$i].\"

'\".$oldpoll_option[$i].\"'

\".$oldopt_votes.\"% [\".$oldnum_votes.\" \".($oldnum_votes == 1 ? $locale['PLAN_102'] : $locale['PLAN_103']).\"]
\n\";
      $i++;
   }
   tablebreak();
   opentable($locale['PLAN_110']);
   echo \"



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


$poll_archive


\".$locale['PLAN_104'].$oldpoll_votes.\"

\".$locale['PLAN_105'].showdate(\"shortdate\", $data['poll_started']).\"

\".$locale['PLAN_106'].showdate(\"shortdate\", $data['poll_ended']).\"

\n\";
   closetable();
}

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




ip_poll_panel.php

Download source  Code
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright (c) 2005 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
+----------------------------------------------------*/
if (!defined(\"IN_FUSION\")) { die(\"Access Denied\"); }

include INFUSIONS.\"ip_poll_panel/infusion_db.php\";

if (file_exists(INFUSIONS.\"ip_poll_panel/locale/\".$settings['locale'].\".php\")) {
   include INFUSIONS.\"ip_poll_panel/locale/\".$settings['locale'].\".php\";
} else {
   include INFUSIONS.\"ip_poll_panel/locale/English.php\";
}

openside($locale['PLAN_100']);
if (isset($_POST['cast_vote'])) {
   $sql = dbquery(\"SELECT * FROM \".DB_IP_POLLS.\" WHERE poll_id='\".$_POST['poll_id'].\"'\");
   $data = dbarray($sql);
   $poll_ips = explode(\"|\", $data['poll_ips']);
   if (!in_array(USER_IP, $poll_ips)) {
      array_push($poll_ips, USER_IP);
      $poll_ips = implode(\"|\", $poll_ips);
      $result = dbquery(\"UPDATE \".DB_IP_POLLS.\" SET poll_votes_\".$_POST['voteoption'].\"=poll_votes_\".$_POST['voteoption'].\"+1, poll_ips='$poll_ips' WHERE poll_id=\".$_POST['poll_id'].\"\");
      header(\"Location: \".FUSION_SELF.(FUSION_QUERY ? \"?\".FUSION_QUERY : \"\"));
   }
}
$result = dbquery(\"SELECT * FROM \".DB_IP_POLLS.\" ORDER BY poll_started DESC LIMIT 1\");
if (dbrows($result) != 0) {
   $data = dbarray($result);
   $poll_title = $data['poll_title'];
   $poll_ips = explode(\"|\", $data['poll_ips']);
   $poll_votes = 0;
   for ($i=0; $i<=9; $i++) {
      if ($data[\"poll_opt_\".$i]) $poll_option[$i] = $data[\"poll_opt_\".$i];
      $poll_votes = $poll_votes + $data[\"poll_votes_\".$i];
   }
   if (!in_array(USER_IP, $poll_ips) && $data['poll_ended'] == 0) {
      $poll = \"\"; $i = 0; $num_opts = count($poll_option);
      while ($i < $num_opts) {
         $poll .= \" $poll_option[$i]

\n\";
         $i++;
      }
      echo \"

$poll_title


$poll


\n\";
   } else {
      $poll =  \"\"; $i = 0; $num_opts = count($poll_option);
      while ($i < $num_opts) {
         $num_votes = $data[\"poll_votes_\".$i];
         $opt_votes = ($poll_votes ? number_format(100 / $poll_votes * $num_votes) : 0);
         $poll .= \"
\".$poll_option[$i].\"

'\".$poll_option[$i].\"'

\".$opt_votes.\"% [\".$num_votes.\" \".($num_votes == 1 ? $locale['PLAN_102'] : $locale['PLAN_103']).\"]

\n\";
         $i++;
      }
      echo \"\".$poll_title.\"


$poll
\".$locale['PLAN_104'].$poll_votes.\"

\".$locale['PLAN_105'].showdate(\"shortdate\", $data['poll_started']);
      if ($data['poll_ended'] > 0) {
         echo \"
\n\".$locale['PLAN_106'].showdate(\"shortdate\", $data['poll_ended']).\"\n\";
      }
      $result = dbquery(\"SELECT * FROM \".DB_IP_POLLS);
      if (dbrows($result) > 1) {
         echo \"


\".$locale['PLAN_107'].\" \n\";
      }
      echo \"
\n\";
   }
} else {
   echo \"
\".$locale['global_142'].\"
\n\";
}
closeside();
?>



Redagavo ChipsasMD 2011-02-25 04:27
 
PM
14mk
#2 Spausdinti pranešimą
parašyta 2011-02-25 05:41
Vartotojo avataras

Savekas



Reputacija: 0

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

Tarp kodo maiau skaiiuk 10, ne?irjau kas aplink j, bet pabandyk j pakeist, gal veiks :)
http://ManoIP.TK - koks mano i?orinis IP adresas?? eFuturama.lt - ?irk futurama online
 
PM
ChipsasMD
#3 Spausdinti pranešimą
parašyta 2011-02-25 05:45
Vartotojo avataras

Naujokas



Reputacija: 0

Pranešimai: 6
Įstojo: 2010-07-23

MantasK para?:
Tarp kodo maiau skaiiuk 10, ne?irjau kas aplink j, bet pabandyk j pakeist, gal veiks :)


Gaila, bet taip lengvai ia neprasuksiu reikalo. Ko tik neband?iau. Ai?ku prad?ioje sudti infusion.php dar papildomai po 20 opcij, desc nustatyti 0,30, i daryti nuo 0 iki 29, visus optus dara?yti failuose. Bet tik gaudavau error, kad nesutinka stulpeli ir eilui skaiius.

O dl t 10, tai taip. Kai suvedi didesn skaii ten, tuomet leid?ia vesti daugiau administracijoje, bet paioje panelje nuo 11-o nei vieno i? j nerodo.
Redagavo ChipsasMD 2011-02-25 05:46
 
PM
Peršokti į forumą: