Exemple #1
0
 function __dateInput($box, $fieldName, $value, $format = null)
 {
     global $wp_locale;
     $date = !empty($value) ? $value : time();
     $day = mysql2date('d', $date);
     $month = mysql2date('m', $date);
     $year = mysql2date('Y', $date);
     $months = '';
     for ($i = 1; $i < 13; $i = $i + 1) {
         $m = $wp_locale->get_month_abbrev($wp_locale->get_month($i));
         $attr = array('value' => $i);
         if ($i == $month) {
             $attr['selected'] = 'selected';
         }
         $months .= csml::entag($m, 'option', $attr);
     }
     echo csml::entag($months, 'select', array('name' => $fieldName . "[month]"));
     echo csml::tag('input[type="text"]', array('name' => $fieldName . "[day]", 'size' => "2", 'value' => $day));
     echo ",";
     echo csml::tag('input[type="text"]', array('name' => $fieldName . "[year]", 'size' => "4", 'value' => $year));
     return;
 }
Exemple #2
0
 function entag($content, $selector = "div", $params = '', $format = null, $comment = '')
 {
     return csml::entag($content, $selector, $params, $format, $comment);
 }
Exemple #3
0
function en($content, $selector = "div", $params = '', $format = INLINE_WITH_TABS, $comment = '')
{
    echo csml::entag($content, $selector, $params, $format, $comment);
}
Exemple #4
0
 function section($title)
 {
     $h = csml::entag($title, 'h3') . "<hr/>";
     $th = csml::entag($h, 'th', array('colspan' => '2'));
     return csml::entag($th, 'tr[valign="top"]');
 }