=$rateinfo[dts] && $now< $rateinfo[dte] ) || $view=="force") { //ok } else { die(""); } ?>".getlang($rateinfo[title]).""; if ($rateinfo[type]=="select_one") { $ratefor=floor($ratefor); if ($ratefor!=0) { //echo "[$IPADDR_REAL]"; $c=tmq("select * from webpage_rate_score where qid='LOG$id-rate' and log like '%;$IPADDR_REAL;%' "); $displaymode="result"; if (tmq_num_rows($c)!=0) { echo getlang("คุณได้ทำการให้คะแนนไปแล้วครับ::l::You already take a survey"); } else { $c=tmq("select * from webpage_rate_score where qid='LOG$id-rate' "); if (tmq_num_rows($c)!=0) { tmq("update webpage_rate_score set log=concat(log,';',';$IPADDR_REAL;' ) where qid='LOG$id-rate' "); } else { tmq("insert into webpage_rate_score set log=concat(log,';',';$IPADDR_REAL;' ) ,qid='LOG$id-rate' "); } //save score $c=tmq("select * from webpage_rate_score where qid='$id-$ratefor' "); if (tmq_num_rows($c)!=0) { tmq("update webpage_rate_score set score=score+1 where qid='$id-$ratefor' "); } else { tmq("insert into webpage_rate_score set score=1 ,qid='$id-$ratefor' "); } } } } if ($rateinfo[type]=="yesno") { //printr($_POST); if (is_array($ratefor) && count($ratefor)>1) { //echo "[$IPADDR_REAL]"; $c=tmq("select * from webpage_rate_score where qid='LOG$id-rate' and log like '%;$IPADDR_REAL;%' "); $displaymode="result"; if (tmq_num_rows($c)!=0) { echo getlang("คุณได้ทำการให้คะแนนไปแล้วครับ::l::You already take a survey"); } else { $c=tmq("select * from webpage_rate_score where qid='LOG$id-rate' "); if (tmq_num_rows($c)!=0) { tmq("update webpage_rate_score set log=concat(log,';',';$IPADDR_REAL;' ) where qid='LOG$id-rate' "); } else { tmq("insert into webpage_rate_score set log=concat(log,';',';$IPADDR_REAL;' ) ,qid='LOG$id-rate' "); } //save score @reset($ratefor); while (list($k,$v)=each($ratefor)) { if ($v=="nooption") { continue; } $c=tmq("select * from webpage_rate_score where qid='$id-$k-$v' "); if (tmq_num_rows($c)!=0) { tmq("update webpage_rate_score set score=score+1 where qid='$id-$k-$v' "); } else { tmq("insert into webpage_rate_score set score=1 ,qid='$id-$k-$v' "); } } } } } $c=tmq("select * from webpage_rate_score where qid='LOG$id-rate' and log like '%;$IPADDR_REAL;%' "); if (tmq_num_rows($c)==0) { $enablebacktoform="yes"; // incase showing result } else { $displaymode="result"; } //echo "[$displaymode/$forcedisplaymode]"; //////////////////////////////////// if ($displaymode!="result" && $forcedisplaymode!="result") { ?>
style="width:12;height:14; border: 0">
  
" style="font-size:13; border-style: outset; border-width: 2px; border-color: gray; background-color: #F3F3F3">
()

    - "; echo getlang("ไม่ใช้::l::No") . " ". $scoren; ?>