示例#1
0
    $numsss++;
    ?>
						<input type="hidden" name="kinputname[]" value="<?php 
    echo $row["inputname"];
    ?>
" />
							<label class="ui-form-label" for="keyword"><?php 
    echo $row["formname"];
    ?>
:</label>
							<div id="J-keyword-type-select" class="ui-form-select-shell">
							<?php 
    if ($row["type"] == '3') {
        echo '<input type="text" value="' . $fromkeyword[$row["inputname"]] . '"  class="ui-input i-date" readonly="readonly"  onClick="WdatePicker();" name="fromkeyword[' . $row["inputname"] . ']" >';
    } elseif ($row["inputtype"] == '3' || $row["inputtype"] == '5') {
        echo crm_select('fromkeyword[' . $row["inputname"] . ']', $row["inputvaluenum"], $fromkeyword[$row["inputname"]], 170, 30);
    } else {
        echo '<input type="text" value="' . $fromkeyword[$row["inputname"]] . '" name="fromkeyword[' . $row["inputname"] . ']" class="ui-input search-keyword" id="J-keyword">';
    }
    ?>
							
								
							</div>
						<?php 
    if ($numsss % 4 == 0) {
        echo '</div><div class="ui-form-item fn-left" id="J-keyword-type-outer" style="width:100%;">';
    }
}
?>
			
	
示例#2
0
文件: form.php 项目: haogm123/ydoa
function form_edit($name, $mod, $viewid)
{
    if ($name != '') {
        echo '<table class="TableBlock" border="0" width="90%" align="center">	';
        echo '<tr>';
        echo '<td nowrap class="TableHeader" colspan="4">' . $name . '</td>';
        echo '</tr>';
    } else {
        echo '<table class="TableBlock" border="0" width="90%" style="border-top:0px;" align="center">	';
    }
    echo '<tr>';
    global $db;
    $num = $db->result("SELECT COUNT(*) AS num FROM " . DB_TABLEPRE . "crm_form where type1='" . $mod . "' and inputtype!='2' ORDER BY inputnumber Asc");
    $query = $db->query("SELECT * FROM " . DB_TABLEPRE . "crm_form where type1='" . $mod . "' and inputtype!='2' ORDER BY inputnumber Asc");
    $n = 0;
    while ($row = $db->fetch_array($query)) {
        $n++;
        echo '<td nowrap class="TableContent" width="15%">' . $row["formname"] . ':';
        if ($row["confirmation"] == '1') {
            get_helps();
        }
        echo '</td><td class="TableData">';
        $name = $row["inputname"];
        $value = crm_db($viewid, $row['inputname'], $mod);
        $w = $row["w"];
        $h = $row["h"];
        if ($row["type"] == '0') {
            if ($row["inputtype"] == '1') {
                echo crm_input($name, $value, $w, $h);
            } elseif ($row["inputtype"] == '2') {
                crm_textarea($name, $value, $w, $h);
            } elseif ($row["inputtype"] == '3') {
                echo crm_radio($name, $row["inputvaluenum"], $value);
            } elseif ($row["inputtype"] == '4') {
                echo crm_checkbox($name, $row["inputvaluenum"], $value);
            } elseif ($row["inputtype"] == '5') {
                echo crm_select($name, $row["inputvaluenum"], $value, $w, $h);
            }
        } elseif ($row["type"] == '1') {
            public_upload($name, $value, $w, $h, '图片上传');
        } elseif ($row["type"] == '2') {
            public_upload($name, $value, $w, $h);
        } elseif ($row["type"] == '3') {
            echo crm_date($name, $w, $h, $value);
        } elseif ($row["type"] == '4') {
            if ($w == '' || $w == '0') {
                $w = '40';
            }
            if ($h == '' || $h == '0') {
                $h = '4';
            }
            get_depabox(2, $name, $value, "+选择部门", $w, $h);
        } elseif ($row["type"] == '5') {
            if ($w == '' || $w == '0') {
                $w = '40';
            }
            if ($h == '' || $h == '0') {
                $h = '4';
            }
            get_pubuser(2, $name, $value, "+选择人员", $w, $h);
        }
        echo '</td>';
        if ($n % 2 == 0) {
            echo '</tr><tr>';
        }
        if ($num == $n && $num % 2 != 0) {
            echo '<td nowrap class="TableContent" width="15%"> </td>
		  <td class="TableData"></td>';
        }
    }
    echo '</tr>';
    echo '</table>';
}