- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
function display_form($value){
switch($value){
case "page_title":
return "<input type='text' id='page_title' name='settings[page_title]' value='".$this->values[$value]."'/>";
break;
case "admin_email":
return "<input type='text' id='admin_email' name='settings[admin_email]' value='".$this->values[$value]."'/>";
break;
case "max_rental":
return "<input type='text' id='max_rental' name='settings[max_rental]' value='".$this->values[$value]."'/>";
break;
case "offset":
return "<input type='text' id='offset' name='settings[offset]' value='".$this->values[$value]."'/>";
break;
case "launch_limit":
return "<input type='text' id='offset' name='settings[launch_limit]' value='".$this->values[$value]."'/>";
break;
case "page_text":
return "<textarea id='page_text' class='ckeditor' name='settings[page_text]'>".$this->values[$value]."</textarea>";
break;
case "email_text":
return "<textarea id='page_text' class='ckeditor' name='settings[email_text]'>".$this->values[$value]."</textarea>";
break;
case "confirm_message":
return "<textarea id='page_text' class='ckeditor' name='settings[confirm_message]'>".$this->values[$value]."</textarea>";
break;
case "general_hours":
$hours = unserialize($this->values[$value]);
return "
<table id='hours'>
<tr><th></th>
<th>Sunday</th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
<th>Saturday</th>
</tr>
<tr>
<th>Open</th>
<td>".$this->display_hour_options("Sunday","start",$hours['Sunday']['start'])."</td>
<td>".$this->display_hour_options("Monday","start",$hours['Monday']['start'])."</td>
<td>".$this->display_hour_options("Tuesday","start",$hours['Tuesday']['start'])."</td>
<td>".$this->display_hour_options("Wednesday","start",$hours['Wednesday']['start'])."</td>
<td>".$this->display_hour_options("Thursday","start",$hours['Thursday']['start'])."</td>
<td>".$this->display_hour_options("Friday","start",$hours['Friday']['start'])."</td>
<td>".$this->display_hour_options("Saturday","start",$hours['Sunday']['start'])."</td>
</tr>
<tr>
<th>Close</th>
<td>".$this->display_hour_options("Sunday","end",$hours['Sunday']['end'])."</td>
<td>".$this->display_hour_options("Monday","end",$hours['Monday']['end'])."</td>
<td>".$this->display_hour_options("Tuesday","end",$hours['Tuesday']['end'])."</td>
<td>".$this->display_hour_options("Wednesday","end",$hours['Wednesday']['end'])."</td>
<td>".$this->display_hour_options("Thursday","end",$hours['Thursday']['end'])."</td>
<td>".$this->display_hour_options("Friday","end",$hours['Friday']['end'])."</td>
<td>".$this->display_hour_options("Saturday","end",$hours['Saturday']['end'])."</td>
</tr>
</table>
";
break;
case "interests":
$interests = unserialize($this->values[$value]);
return "<strong>Display:</strong> <br /><input type='text' name='settings[interests][display]' value='".$interests['display']."'/><br />
<strong>Options: </strong><small>(Seperated by \"|\")</small> <br /><textarea id='page_title' name='settings[interests][choices]'>".implode("|",$interests['choices'])."</textarea>";
break;
case "occasions":
$occasions = unserialize($this->values[$value]);
return "<strong>Display:</strong> <br /><input type='text' name='settings[occasions][display]' value='".$occasions['display']."'/><br />
<strong>Options: </strong><small>(Seperated by \"|\")</small> <br /><textarea id='page_title' name='settings[occasions][choices]'>".implode("|",$occasions['choices'])."</textarea>";
break;
}
}
Lure Of Chaos 15.02.2015 20:24 # 0
djumpen 17.02.2015 17:51 # 0
Stallman 17.02.2015 18:41 # +2