我很想知道,《国际公认法典》是否与我所建立的小框架相当,以及它可能被称作什么。 我建立了一个小型框架,为每个我的ql数据库表设定一个清单观点和编辑观点。 下面是守则的一个实例,说明我如何设立一个中央管理系统,以操纵数据库表:
// CODE FOR LIST VIEW - http://mysite.com/admin/user.php
// This code will output an html table of records from db table t_user.
// The html table will have controls that allow user to search, delete, and paginate
// You can click on each record to edit the record
<?php
include( class/framework.php );
$template = new ListView();
$template->data_object = new DB($mysql_table_name = t_user );
$template->setCol($col = user_name , $label = User Name );
$template->setCol($col = email , $label = Email );
$template->setCol($col = last_login , $label = Last Time Logged In , $format= Y-m-d H:i:s );
$tempate->run();
?>
// CODE FOR EDIT VIEW - http://mysite.com/admin/user.edit.php
// This code will output an html form that adds, edits, deletes
// and validates a record from t_user
<?php
include( class/framework.php );
$template = new EditView();
$template->data_object = new DB($mysql_table_name = t_user ):
$f = new Field($col = user_id , $type = hidden );
$template->field[] = $f;
$f = new Field($col = email , $type = text );
$f->arr_validate = array( is_email , is_required );
$template->field[] = $f;
$f = new Field($col = phone , $type = text );
$f->arr_validate = array( is_phone , is_required );
$template->field[] = $f;
$f = new Field($col = password , $type = password );
$template->field[] = $f;
$f = new Field($col = bio , $type = wysiwyg );
$template->field[] = $f;
$f = new Field($col = pic , $type = image );
$template->field[] = $f;
$template->run();
?>
...... 我不必写上一条“html”、 c或 j。 只要Ipope $f->arr_validate
,所有鉴定都对我进行。 搜查、分类、gin、ed、删除等能力都是根据上述准则进行的。
《识别法》中是否有类似内容? 如果在盒子中没有这样的东西,那么就是这样说的。