Server IP : 119.59.102.212 / Your IP : 18.119.139.22 Web Server : Apache/2 System : Linux narin 2.6.32-042stab142.1 #1 SMP Tue Jan 28 23:44:17 MSK 2020 x86_64 User : yangkam ( 1022) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/yangkam/domains/yangkam.go.th/private_html/coremain/module/poll/ |
Upload File : |
<?php $sqln = "select * from cms_poll where status='1' order by id desc"; $resultn = mysql_query($sqln); $data_num = mysql_num_rows($resultn); $datan = mysql_fetch_array($resultn); import_request_variables('pG', 'p_'); if ($p_cms_poll_click != "") { $cms_poll_click = trim($p_cms_poll_click); } if ($_SESSION[admin_web] == "admin" or id_top_permission("5")) { $per = "ok"; $k_word = "จัดการโหวต"; } else { $k_word = "ผลโหวต"; } ?> <script language="JavaScript"> function openmywin() { window.open('', 'mywin', 'width=570,height=480,location=no,menubar=no,toolbar=no,scrollbars=no,resizable=no'); } </script> <center> <form method="post" id="p_vote"> <table border="0" cellpadding="0" cellspacing="0" width='100%'> <tr> <td valign="top"> <table border=0 bordercolor="000000" CELLSPACING=0 CELLPADDING=2> <tr> <td align="left"><?= $datan[1]; ?></td> </tr> <tr> <td> <?php $j = 1; for ($i = 2; $i <= 10; $i++) { if ($datan[$i] != "") { echo "<input type='radio' name='vote1' value='$j'"; if ($j == 1) { echo "checked"; } echo "> $datan[$i]<br>"; } $j = $j + 1; } ?> </td> </tr> <tr> <td align="center"> <?php if ($data_num > 0) { // echo"<input type=submit name=result value='โหวต' onmouseover=this.style.cursor='hand'>"; echo '<button type="button" name=result class="poll_vote ui-button ui-widget ui-corner-all" style="padding: 5px 10px;">โหวต</button>'; } ?> <button type="button" class="manage_poll ui-button ui-widget ui-corner-all" style="padding: 5px 10px;"><?php echo $k_word; ?></button> </td> </tr> </table> </td> </tr> </table> </form> </center> <script language="JavaScript"> $('.poll_vote').click(function(){ var arrData = [ { name: 'admin_web', value: '<?php echo $_SESSION['admin_web'] ?>' }, { name: 'folder_name', value: '<?php echo $_SESSION['folder_name'] ?>' }, { name: 'pid', value: '<?= $datan['id'] ?>' }, { name: 'vote1', value: $('#p_vote input[name=vote1]:checked').val() } ]; var dialog = 'dialog-popup'; var popup = $('#'+dialog); showDialog(dialog); popup.dialog('option', 'title', 'โหวต'); $.ajax({ type: 'post', url: 'coremain/module/poll/show.php', data: arrData, success: function(result){ popup.html(result); } }); }); $('.manage_poll').click(function(){ var arrData = [ { name: 'id_permis', value: '<?php echo $xxx;?>' }, { name: 'full', value: '1' }, { name: 'folder_name', value: '<?php echo $_SESSION['folder_name']?>' }, { name: 'admin_web', value: '<?php echo $_SESSION['admin_web'];?>' }, { name: 'per', value: '<?php echo $per;?>'} ]; var dialog = 'dialog-popup'; var popup = $('#'+dialog); showDialog(dialog); popup.dialog('option', 'title', 'จัดการโหวต'); $.ajax({ type: 'post', url: 'coremain/module/poll/result.php', data: arrData, success: function(result){ popup.html(result); } }); }); </script>