'; } } function modmatHeaderImage() { $header = get_option('modmat_header'); $random = get_option('modmat_random'); if ( $random == "on" ) { echo " style=\"background-image:url('"; bloginfo('template_directory'); echo "/headers/"; modmatRandomHeaderImage(); echo"');background-repeat: no-repeat;\""; } else if ( $header != "" ) { echo " style=\"background-image:url('"; bloginfo('template_directory'); echo "/headers/" . $header . "');background-repeat: no-repeat;\""; } } function modmatRandomHeaderImage() { global $styleFolder; if ($handle = opendir($styleFolder . '/headers')) { $i = 1; while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $arr[$i]['header'] = $file; $i++; } } $randomCount = rand(1, count($arr)); echo $arr[$randomCount]['header']; } } function listAvailableHeaders() { global $styleFolder; if ($handle = opendir($styleFolder . '/headers')) { $header = get_option('modmat_header'); $random = get_option('modmat_random'); echo ''; } } function listAvailableWidths() { $width = get_option('modmat_width'); echo ''; } function modmat_options() { ?>