<?php require_once('includes/requirecompere.inc.php'); require_once('includes/question.inc.php'); $CMD_TMPL_NAME='questioninfo'; $qn_id=TGET('qn_id'); $op=TGET('op'); $mb_id=current_mb_id(); $dataset['ADDNEW']=array(0); $dataset['ENTERING']=array(0); if ($op=='revise' && $_SESSION['reserv.inputcache.domain']=='question.addnew') { $data=$_SESSION['reserv.inputcache.data']; $dataset+=$_SESSION['reserv.inputcache.errorareas']; $dataset+=prepare_questioninfo_dataset($data,$data['qc_ordinal'],$data['qc_text']); } else { $dataset+=prepare_questioninfo_dataset(array(),array('_0'=>1),array('_0'=>'')); } $DBConn->connect(true); $dataset['question_addable']=get_compere_limit($DBConn,$mb_id,'question.count')-db_count_compere_question($DBConn,$mb_id); $dataset['QUESTION-ADDABLE']=$dataset['question_addable']>0?array(0):array(); $dataset['ERROR-COUNT-LIMIT']=$dataset['question_addable']>0?array():array(0); ?>