============================================================================ 投票及びundoの処理は、web/cn/include/CHist.class.php で行われる。 ---------------------------------------------------------------------------- メインの関数は、CHist::save() である。 ---------------------------------------------------------------------------- public static function save( $cfg, &$upd, &$sts, $user_id, $poll_id, $vikey, $vbtype ) { $upd = array(); $sts = array(); ###--- exists でこのボタンがすでにクリックされたか調べる。 ###--- していればundoする。 if ( !self::exists( $cfg, $upd, $user_id, $poll_id, $vikey, $vbtype ) ) { if ( $cfg["undo-mode"] == "C" ) { ###--- mode C self::limitVbtypeC( $cfg, $upd, $user_id, $poll_id, $vbtype ); } else { ###--- mode A & B self::limitVbtype( $cfg, $upd, $user_id, $poll_id, $vikey ); if ( $cfg["undo-mode"] == "B" ) { ###--- mode B self::limitVikey( $cfg, $upd, $user_id, $poll_id ); } } ###--- 新しく投票をいれる。 self::insertNew( $cfg, $upd, $user_id, $poll_id, $vikey, $vbtype ); } ###--- アップデートを行う。 self::processUpd($upd); //if ( $cfg["undo-mode"] == "B" ) { ###--- $sts にボタンの状態変更情報(色とか)を記録する。 self::getState( $cfg, $sts, $user_id, $poll_id ); //} } ----------------------------------------------------------------------------