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..
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: member_poll_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\"); }
openside($locale['global_130']);
if (isset($_POST['cast_vote']) && (isset($_POST['poll_id']) && isnum($_POST['poll_id']))) {
$result = dbcount(\"(poll_id)\", DB_POLL_VOTES, \"vote_user='\".$userdata['user_id'].\"' AND poll_id='\".$_POST['poll_id'].\"'\");
if (empty($result)) {
if (isset($_POST['voteoption']) && isnum($_POST['voteoption'])) {
$result = dbquery(\"INSERT INTO \".DB_POLL_VOTES.\" (vote_user, vote_opt, poll_id) VALUES ('\".$userdata['user_id'].\"', '\".$_POST['voteoption'].\"', '\".$_POST['poll_id'].\"')\");
}
redirect(FUSION_SELF.(FUSION_QUERY ? \"?\".FUSION_QUERY : \"\"));
}
}
$result = dbquery(\"SELECT poll_id, poll_title, poll_opt_0, poll_opt_1, poll_opt_2, poll_opt_3, poll_opt_4, poll_opt_5, poll_opt_6, poll_opt_7, poll_opt_8, poll_opt_9, poll_started, poll_ended FROM \".DB_POLLS.\" ORDER BY poll_started DESC LIMIT 1\");
if (dbrows($result)) {
$data = dbarray($result);
$poll_title = $data['poll_title'];
$poll_option = array();
for ($i = 0; $i <= 9; $i++) {
if ($data[\"poll_opt_\".$i]) $poll_option[$i] = $data[\"poll_opt_\".$i];
}
$result2 = dbquery(\"SELECT * FROM \".DB_POLL_VOTES.\" WHERE vote_user='' AND poll_id='\".$data['poll_id'].\"'\");
if (iGUEST && !dbrows($result2) && $data['poll_ended'] == 0) {
$poll = \"\"; $i = 0; $num_opts = count($poll_option);
while ($i < $num_opts) {
$poll .= \"
as nematau gipsy ka tu padarei kitaip su tuo kodu nes kiek ziuriu insertina user_id o taigi sveciai neturi id
Kaip neonas ir sake naudok IP Poll http://www.phpfusion.lt/infusions/moddb/mod_view.php?mod_id=531
Redagavo Wyciokazz 2012-11-04 09:48
Kam kurti tai kas jau sukurta.
Nesu ekstrasensas ar dar koks čigonas tad iš nieko negaliu suprast kur bėda.