<?php function retrieve_charged_plans($dbconn,$name=false) { $allplans=array( array( 'name'=>'0', 'comment'=>'The free plan that is the default.', 'limits'=>array( 'timeavail.count'=>22, 'seat.count'=>40, 'place.count'=>1, 'classroom.seat.count'=>40, 'classroom.count'=>10, 'lecture.count'=>40, 'team.size'=>5, 'course.count'=>10, 'coursegroup.count'=>0, 'option.count'=>10, 'reservation.count'=>50, 'question.count'=>10, 'questionnaire.count'=>1 ), 'priority'=>0, 'lifeunitcount'=>1200, 'lifeunit'=>'MONTH', 'price'=>0, 'currency'=>'JPY' ), array( 'name'=>'0.alias', 'comment'=>'The free plan for alias member.', 'limits'=>array( 'timeavail.count'=>0, 'seat.count'=>0, 'place.count'=>0, 'classroom.seat.count'=>0, 'classroom.count'=>0, 'lecture.count'=>999, 'course.count'=>0, 'option.count'=>0, 'team.size'=>1, 'coursegroup.count'=>0, 'reservation.count'=>999, 'question.count'=>0, 'questionnaire.count'=>0 ), 'priority'=>0, 'lifeunitcount'=>1200, 'lifeunit'=>'MONTH', 'price'=>0, 'currency'=>'JPY' ), array( 'name'=>'1', 'comment'=>'This is the reward plan for affiliators who introduce new comperes.', 'limits'=>array( 'timeavail.count'=>60, 'seat.count'=>90, 'place.count'=>2, 'classroom.seat.count'=>90, 'classroom.count'=>20, 'lecture.count'=>90, 'course.count'=>10, 'option.count'=>15, 'team.size'=>10, 'coursegroup.count'=>1, 'reservation.count'=>90, 'question.count'=>15, 'questionnaire.count'=>2 ), 'priority'=>-1, 'lifeunitcount'=>6, 'lifeunit'=>'MONTH' ) ); if ($name!==false) { $selectedplans=array(); if (is_array($name)) $names=$name; else $names=array($name); foreach ($names as $n) { foreach ($allplans as $plan) if ($plan['name']==$n) array_push($selectedplans,$plan); } } else $selectedplans=$allplans; return $selectedplans; } ?>