<?php /** * head() * * @author designerscripte.net * @category system design * @version 2.5.0 * @example head('hallo'); * @param mixed $titel Titel * @return HTML Code für startbereich einer Box */ function head($titel){ echo ' <div class="card"> <div class="card-header"> '.$titel.' </div> <div class="card-body">'; } /** * foot() * * @author designerscripte.net * @category system design * @version 2.5.0 * @example foot(); * @return HTML Code für endbereich einer Box */ function foot(){ echo'</div> </div> <hr>'; } /** * menuehead() * * @author designerscripte.net * @category system design * @version 2.5.0 * @example menuehead('hallo'); * @param mixed $titel * @return HTML Code für startbereich einer Box */ function menuehead($titel){ echo'<div class="card"> <div class="card-header"> '.$titel.' </div> <div class="card-body">'; } /** * menuefoot() * * @author designerscripte.net * @category system design * @version 2.5.0 * @example menuefoot(); * @return HTML Code für endbereich einer Box */ function menuefoot(){ echo'</div></div><hr>'; } /** * table_head() * * @author vms1-scripte.de * @example table_head("hier,jede,Spalte,eintragen","table table-striped"); * @return HTML Code für Tabellenkopf einer Tabelle */ function table_head($array = NULL,$style = ''){ echo '<table class="'. $style .'">'; if($array != NULL){ $tr = explode(",",$array); foreach($tr as $t) echo '<th>'. $t .'</th>'; } } /** * table_body() * * @author vms1-scripte.de * @example table_body(array(array("spalte 1.1","spalte 1.2"), array("Spalte 2.1", "Spalte 2.2"))); * @return HTML Code für Tabellenkopf einer Tabelle */ function table_body($array){ $aus = ''; for($i = 0; $i <= count($array)-1; $i++){ $aus .= '<tr>'; for($ii = 0; $ii <= count($array[$i])-1; $ii++){ $aus .= '<td>'. $array[$i][$ii] .'</td>'; } $aus .= '</tr>'; } echo $aus; } /** * table_foot() * * @author vms1-scripte.de * @example table_head(); * @return HTML Code für Endbereich einer Tabelle */ function table_foot(){ echo '</table>'; } /** * suee_add_input() * * @author vms1-scripte.de * @example suee_add_input("name","text","Vorgabe","Platzhalter","andere variablen"); * @return HTML Code für Inputfeld */ function suee_add_input($name,$type,$value = NULL, $placeholder = NULL, $other = NULL){ $input = '<input type="'; $input .= $type .'"'; $input .= "name=\"$name\""; if($value != NULL){ $input .= "value=\"$value\""; } if($placeholder != NULL){ $input .= "placeholder=\"$placeholder\""; } if($other != NULL){ $input .= $other; } $input .= '>'; return $input; } /** * suee_add_select() * @author vms1-scripte.de * @example suee_add_input("Name",array(array("value 1","Text 1), array("Value 2", "Text 2"))); * @return HTML Code für Select */ function suee_add_select($name,$option,$other = ''){ $select = '<select name="'. $name .'" '. $other .'>'; for($i = 0; $i <= count($option)-1; $i++){ $select .= '<option value="'. $option[$i][0] .'">'. $option[$i][1] .'</option>'; } $select .= '</select>'; return $select; } /** * suee_add_alert() * @author vms1-scripte.de * $class kann success/alert/warning/info/danger sein * @example suee_add_alert("Text im Alert","success", "text-bold text-center"); * @return HTML Code für div Alert */ function suee_add_alert($text,$class,$other = ''){ $alert = '<div class="alert alert-'. $class .' '. $other .'">'; $alert .= $text; $alert .= '</div>'; return $alert; } ?>