Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
nayongnua
/
domains
/
nayongnua.go.th
/
public_html
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/nayongnua/domains/nayongnua.go.th/public_html/vote1.php
<?php require_once('admin/Connections/conndb.php'); mysql_select_db($database_conndb, $conndb); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-874" /> <title>Vote Poll</title> <link href="styles.css" rel="stylesheet" type="text/css" /> </head> <body> <table width="1000" border="1"> <tr> <td><div align="center"><?php $sql_poll="select * from poll where actived=1 order by id_poll desc limit 0,1"; $res_poll=mysql_query($sql_poll,$conndb) or die(mysql_error()); $dat_poll=mysql_fetch_array($res_poll); // echo ' <br> num = '.mysql_num_rows($res_poll); //echo '<br> sql = '.$sql_poll; ?></div></td> <td><div align="center"><tr> <td width="58" align="right"><input type="radio" id="v-<?php echo $f[id_v];?>" name="v" value="<?php echo $f[id_v];?>" /></td> <td width="282" class="styles1"><?php echo stripslashes($f[vtitle]);?></td> </tr></div></td> <td><div align="center"></div></td> </tr> <tr> <td><div align="center"></div></td> <td><div align="center"></div></td> <td><div align="center"></div></td> </tr> <tr> <td><div align="center"></div></td> <td><div align="center"></div></td> <td><div align="center"></div></td> </tr> </table> <table width="1000" border="0"> <tr> <td><div align="center"><div align="center"><table width="190" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" valign="top"> <script> function popup(form) { //var v=document.getElementsByName('v').checked; var v=getCheckedRadio(); var idp=document.getElementById('idp').value; window.open("vote.php?idp="+idp+"&v="+v, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=420,height=300'); //form.target = 'formpopup'; return false; } function getCheckedRadio() { var radioButtons = document.getElementsByName("v"); for (var x = 0; x < radioButtons.length; x ++) { if (radioButtons[x].checked) { // alert("You checked " + radioButtons[x].id); return document.getElementById(radioButtons[x].id).value; } } } function popup2() { var idp=document.getElementById('idp').value; window.open("view_vote.php?idp="+idp, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=420,height=300'); //form.target = 'formpopup'; return false; } </script> <form id="form1" name="form1" method="post" target="formpopup" onsubmit="popup(this); return false;" > <table width="20" border="0" align="center" cellpadding="2" cellspacing="0"> <tr> <td colspan="2" class="styles1"><strong><?php echo stripslashes($dat_poll[p_title]);?></strong></td> </tr> <?php $getv="select * from vote where id_poll=".$dat_poll[id_poll]; $rpoll=mysql_query($getv,$conndb) or die(mysql_error()); while($f=mysql_fetch_array($rpoll)){ ?> <tr> <td width="58" align="right"><input type="radio" id="v-<?php echo $f[id_v];?>" name="v" value="<?php echo $f[id_v];?>" /></td> <td width="282" class="styles1"><?php echo stripslashes($f[vtitle]);?></td> </tr> <?php } ?> <tr> <td align="right"> </td> <td class="styles1"><input type="hidden" id="idp" name="idp" value="<?php echo $dat_poll[id_poll];?>" /> <!-- <input type="button" name="button" id="button" value="âËǵ" onclick="popup();" /> --> <input type="submit" name="button" id="button" value="âËǵ" /> <input type="button" name="view" value="´Ù¼Å¡ÒÃâËÇ´" onClick="location.href='poll_detail.php?idp=<?php echo $dat_poll[id_poll];?>';" /> <input type="button" name="view2" value="ẺÊͺ¶ÒÁÍ×è¹" onclick="location.href='show_poll.php';"/></td> </tr> </table> </form></td> </tr> </table></div></div></td> </tr> </table> <p align="center"> </p> </body> </html>