Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1.  
  2.                     $firstTime=strtotime($model->in_time);
  3.                     $lastTime=strtotime($model->out_time);
  4.                     $timeDiff=ceil(($lastTime-$firstTime)/60);
  5.                    
  6.                     if($timeDiff <=30)
  7.                         $model->price_charged = 4;
  8.                     elseif($timeDiff >30 && $timeDiff <=60)
  9.                         $model->price_charged = 6;
  10.                     else{
  11.                        
  12.                     }
  13.                    
  14.                     throw new CException ( $model->out_time.'-'.$model->in_time.'='.$timeDiff.' Amount '.$model->price_charged);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement