コード例 #1
0
ファイル: form.php プロジェクト: kvirella/magrocket-backend
     break;
 case 'date':
     $attributes = array();
     $attributes['style'] = "width:180px;";
     if (isset($e[1]) && !empty($e[1])) {
         $attributes = $e[1];
     }
     echo __date('data.' . $field, $attributes);
     break;
 case 'datetime':
     $attributes = array();
     $attributes['style'] = "width:180px;";
     if (isset($e[1]) && !empty($e[1])) {
         $attributes = $e[1];
     }
     echo __datetime('data.' . $field, $attributes);
     break;
 case 'textarea':
     $attributes = array();
     if (isset($e[1]) && !empty($e[1])) {
         $attributes = $e[1];
     }
     echo __textarea('data.' . $field, $attributes);
     break;
 case 'editor':
     $attributes = array();
     $attributes['style'] = 'width:680px; height:400px;';
     if (isset($e[1]) && !empty($e[1])) {
         $attributes = $e[1];
     }
     echo __editor('data.' . $field, $attributes);
コード例 #2
0
ファイル: datetime.php プロジェクト: karwana/penelope
<?php

if ($property->getSchema()->isMultiValue()) {
    ?>
<ul class="multivalue">
	<?php 
    foreach ($property->getValue() as $value) {
        ?>
	<li><time datetime="<?php 
        __(date('Y-m-d\\TH:i:sP', $value));
        ?>
"><?php 
        __datetime($value);
        ?>
</time></li>
	<?php 
    }
    ?>
</ul>
<?php 
} else {
    ?>
<time datetime="<?php 
    __(date('Y-m-d\\TH:i:sP', $property->getValue()));
    ?>
"><?php 
    __datetime($property->getValue());
    ?>
</time>
<?php 
}
コード例 #3
0
ファイル: helpers.php プロジェクト: karwana/penelope
function __date($value)
{
    __datetime($value, 'property_date_value');
}
コード例 #4
0
ファイル: search_form.php プロジェクト: Dannyngs/chinese_med
     break;
 case 'date':
     $attributes = array();
     $attributes['style'] = "width:180px;";
     if (isset($e[1]) && !empty($e[1])) {
         $attributes = $e[1];
     }
     echo __date('src.' . $field, $attributes);
     break;
 case 'datetime':
     $attributes = array();
     $attributes['style'] = "width:180px;";
     if (isset($e[1]) && !empty($e[1])) {
         $attributes = $e[1];
     }
     echo __datetime('src.' . $field, $attributes);
     break;
 case 'radio':
     $options = array();
     $params = array();
     if (isset($e[1]) && !empty($e[1])) {
         if (array_key_exists('option_table', $e[1])) {
             if (array_key_exists('option_key', $e[1]) && array_key_exists('option_value', $e[1])) {
                 $_dao = new ScrudDao($e[1]['option_table'], $CI->db);
                 $params['fields'] = array($e[1]['option_key'], $e[1]['option_value']);
                 $rs = $_dao->find($params);
                 if (!empty($rs)) {
                     foreach ($rs as $v) {
                         $options[$v[$e[1]['option_key']]] = $v[$e[1]['option_value']];
                     }
                 }