Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: poll_panel

Parašė Olimpas· 2009 Spa. 5 10:10:21
#1

Sveiki gal galėtumėte padėtio su ip_poll_panel.
Taigi niekaip negalu pasidaryti vietoi to balto mygtuko savo img.
Noriu,kad ten būtų mano img.
Bet niekaip neišeina,dabar kai pasirenku balsavima ir paspaudziu tą
baltą mygtuką,uiškarto užbalsuoja,bet man reikia kad ten būtų img.
Va kaip atrodo.


Štai ip_pool_panel

<?php


echo"<link href=\"".INFUSIONS."ip_poll_panel/crir.css\" rel=\"stylesheet\" type=\"text/css\" />
<script language=\"JavaScript\" type=\"text/javascript\" src=\"".INFUSIONS."ip_poll_panel/crir.js\"></script>";



/*---------------------------------------------------+
| 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 (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'])) {
   $voteoption = $_POST['voteoption'];
   $sql = dbquery("SELECT * FROM ".$db_prefix."ip_polls WHERE poll_id='$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_prefix."ip_polls SET poll_votes_$voteoption=poll_votes_$voteoption+1, poll_ips='$poll_ips' WHERE poll_id=$poll_id");
      header("Location: ".FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : ""));
   }
}
$result = dbquery("SELECT * FROM ".$db_prefix."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 .= "<input type='radio' name='voteoption' value='$i' id='$i' class='crirHiddenJS'><label for='$i'> $poll_option[$i]</label>";
         $i++;
      }
      echo "<form name='voteform' method='post' action='".FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : "")."'>
<b>$poll_title</b><br><br>
$poll<center><input type='hidden' name='poll_id' value='".$data['poll_id']."'>
<input type='submit' name='cast_vote' value='".$locale['PLAN_101']."'<a href='".INFUSIONS."ip_poll_panel/ip_poll_archive.php'><img src='".THEME."images/rezultatai.png' width='82' height='24' alt=''>
</center>
</form>\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(10 / $poll_votes * $num_votes) : 0);
         $poll .= "<div>".$poll_option[$i]."</div>

<div>".$opt_votes."% [".$num_votes." ".($num_votes == 1 ? $locale['PLAN_102'] : $locale['PLAN_103'])."]</div>\n";
         $i++;
      }
      echo "<b>".$poll_title."</b><br><br>
$poll
<center>
".$locale['PLAN_105'].showdate("", $data['poll_started']);
      if ($data['poll_ended'] > 0) {
         echo "<br>\n".$locale['PLAN_106'].showdate("", $data['poll_ended'])."\n";
      }
      $result = dbquery("SELECT * FROM ".$db_prefix."ip_polls");
      if (dbrows($result) > 1) {
         echo "<p><a href='".INFUSIONS."ip_poll_panel/ip_poll_archive.php'><img src='".THEME."images/balsuoti.png' width='82' height='24' alt=''>

<a href='".INFUSIONS."ip_poll_panel/ip_poll_archive.php'>".$locale['PLAN_107']."<img src='".THEME."images/rezultatai.png' width='82' height='24' alt=''>\n";
      }
      echo "</center>\n";
   }
} else {
   echo "<center>".$locale['004']."</center>\n";
}
closeside();
?>