Changeset 146 for Dev/trunk/classes/Step.php
- Timestamp:
- 11/07/11 14:41:16 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/Step.php
r144 r146 17 17 public $name; 18 18 public $id; 19 // merging step and displayStep 20 21 public $imageURL; 19 22 20 23 public function __construct($t, $n, $i) { 21 24 22 25 if (strtolower($t) == "application" || strtolower($t) == "dashboard" || strtolower($t) == "questionnaire") { 26 $this->type = $t; 23 27 $this->name = $n; 24 $this->type = $t;25 28 $this->id = $i; 29 } else { 30 die("Invalid type given: " . $t . "\n $n $i"); 26 31 } 27 else { 28 die("Invalid type given: ".$t."\n $n $i"); 32 33 switch (strtolower($this->type)) { 34 case "questionnaire": 35 $this->imageURL = "images/icons/questionnaire.png"; 36 break; 37 case "dashboard": 38 $this->imageURL = "images/icons/dashboard.png"; 39 break; 40 case "application": 41 $this->imageURL = "images/icons/application.png"; 42 break; 43 default: 44 $this->imageURL = "images/icons/unknowntype.png"; 45 break; 29 46 } 47 } 48 49 public function AdjustID($offset) { 50 $this->id += $offset; 51 } 52 53 public function DrawStep() { 54 if (isset($this->type) && isset($this->imageURL) && isset($this->name)) { 55 ?> 56 <div class="displayStep" onClick="checkSelectedStep('<?php echo $this->id; ?>');"><div class="displayStepIcon"><img src="<?php echo $this->imageURL; ?>" /></div><?php echo $this->name; ?></div> 57 <?php 58 } 30 59 } 31 60
Note: See TracChangeset
for help on using the changeset viewer.