チェンジセット 90: trunk/install/php/listreserve.php
- コミット日時:
- 2009/05/01 02:04:27 (16 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
trunk/install/php/listreserve.php
r89 r90 16 16 DCC-JPL Japan/foltia project 17 17 18 19 History 20 21 2009/5/1 22 重複予約検出処理の修正 http://www.dcc-jpl.com/foltia/ticket/7 23 パッチ適用 18 24 */ 19 25 … … 202 208 $overlapmaxrows = pg_num_rows($overlap); 203 209 if ($overlapmaxrows > ($recunits) ){ 210 211 $owtimeline = array(); 212 204 213 for ($rrow = 0; $rrow < $overlapmaxrows ; $rrow++) { 205 $owrowdata = pg_fetch_row($overlap, $rrow); 206 $overlappid[] = $owrowdata[9]; 214 $owrowdata = pg_fetch_array($overlap, $rrow); 215 $owtimeline[ $owrowdata['startdatetime'] ] = $owtimeline[ $owrowdata['startdatetime'] ] +1; 216 217 $owrend = calcendtime( $owrowdata['startdatetime'], $owrowdata['lengthmin'] ); 218 $owtimeline[ $owrend ] = $owtimeline[ $owrend ] -1; 219 //注意: NULL に減算子を適用しても何も起こりませんが、NULL に加算子を 適用すると 1 となります。 207 220 } 208 if (in_array($rowdata[9], $overlappid)) { 209 $rclass = "overwraped"; 221 222 ksort ( $owtimeline ); 223 224 $owcount = 0; 225 foreach ( $owtimeline as $key => $val ) { 226 $owcount += $val; 227 228 if ( $owcount > $recunits ) { 229 $rclass = "overwraped"; 230 break; 231 } 232 } 210 233 } 211 }else{212 $overlappid = "";213 }//end if214 234 215 235 //外部チューナー録画 … … 259 279 $eoverlapmaxrows = pg_num_rows($eoverlap); 260 280 if ($eoverlapmaxrows > ($externalinputs) ){ 281 282 $eowtimeline = array(); 283 261 284 for ($erow = 0; $erow < $eoverlapmaxrows ; $erow++) { 262 $eowrowdata = pg_fetch_row($eoverlap, $erow); 263 $eoverlappid[] = $eowrowdata[9]; 285 $eowrowdata = pg_fetch_array($eoverlap, $erow); 286 $eowtimeline[ $eowrowdata['startdatetime'] ] = $eowtimeline[ $eowrowdata['startdatetime'] ] +1; 287 288 $eowrend = calcendtime( $eowrowdata['startdatetime'], $eowrowdata['lengthmin'] ); 289 $eowtimeline[ $eowrend ] = $eowtimeline[ $eowrend ] -1; 264 290 } 265 266 if (in_array($rowdata[9], $eoverlappid)) { 267 $rclass = "exoverwraped"; 291 292 ksort ( $eowtimeline ); 293 294 $eowcount = 0; 295 foreach ( $eowtimeline as $key => $val ) { 296 $eowcount += $val; 297 298 if ( $eowcount > $externalinputs ) { 299 $rclass = "exoverwraped"; 300 break; 301 } 268 302 } 269 }else{ 270 $eoverlappid = ""; 303 271 304 } 272 305 echo("<tr class=\"$rclass\">\n");