?? formguide_form.class.php
字號:
<?php
class formguide_form
{
var $formid;
var $fields;
function __construct($formid)
{
global $db;
$this->db = &$db;
$this->formid = $formid;
$this->fields = cache_read($this->formid.'_formfields.inc.php', CACHE_MODEL_PATH);
}
function formguide_form($formid)
{
$this->__construct($formid);
}
function get($data = array())
{
global $_groupid;
$info = array();
if(empty($this->fields)) return false;
foreach($this->fields as $field=>$v)
{
if(check_in($_groupid, $v['unsetgroupids'])) continue;
$func = $v['formtype'];
$value = isset($data[$field]) ? htmlspecialchars($data[$field], ENT_QUOTES) : '';
$form = $this->$func($field, $value, $v);
$info[$field] = array('name'=>$v['name'], 'field'=>$field, 'tips'=>$v['tips'], 'form'=>$form, 'star'=>$v['minlength'], 'islistbackgroud'=>$v['isbackground']);
}
return $info;
}
}?>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -