Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -4,15 +4,19 @@ if (!defined('_GNUBOARD_')) exit;
|
||||
// 설문조사
|
||||
function poll($skin_dir='basic', $po_id=false)
|
||||
{
|
||||
global $config, $member, $g4;
|
||||
global $config, $member, $g4, $is_admin;
|
||||
|
||||
// 투표번호가 넘어오지 않았다면 가장 큰(최근에 등록한) 투표번호를 얻는다
|
||||
if (empty($po_id)) {
|
||||
$po_id = $config['cf_max_po_id'];
|
||||
if (empty($po_id))
|
||||
return "<!-- po_id를 찾을 수 없습니다. -->";
|
||||
if (!$po_id) {
|
||||
$row = sql_fetch(" select MAX(po_id) as max_po_id from {$g4['poll_table']} ");
|
||||
$po_id = $row['max_po_id'];
|
||||
}
|
||||
|
||||
if(!$po_id)
|
||||
return;
|
||||
|
||||
$po = sql_fetch(" select * from {$g4['poll_table']} where po_id = '$po_id' ");
|
||||
|
||||
ob_start();
|
||||
if (G4_IS_MOBILE) {
|
||||
$poll_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/poll/'.$skin_dir;
|
||||
|
||||
@ -1,19 +1,5 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
global $is_admin;
|
||||
|
||||
// 투표번호가 넘어오지 않았다면 가장 큰(최근에 등록한) 투표번호를 얻는다
|
||||
if (!$po_id) {
|
||||
$po_id = $config['cf_max_po_id'];
|
||||
|
||||
if (!$po_id) return;
|
||||
}
|
||||
|
||||
$po = sql_fetch(" select * from {$g4['poll_table']} where po_id = '$po_id' ");
|
||||
|
||||
if(!$po['po_id'])
|
||||
return;
|
||||
?>
|
||||
|
||||
<form name="fpoll" action="<?=G4_BBS_URL?>/poll_update.php" onsubmit="return fpoll_submit(this);" target="win_poll" method="post">
|
||||
|
||||
Reference in New Issue
Block a user