코드 이그니 저는 내가 만든 작은 프레임 워크와 동등한 것을 가지고 있는지, 무엇이 호출되는지 궁금합니다. 각 mysql 데이터베이스 테이블에 대한 목록보기 및 편집보기를 만드는 작은 프레임 워크를 만들었습니다. 나는 HTML, CSS 나 자바 스크립트 단 한 줄의 코드를 작성할 필요가 없습니다 ...코드 이그니 터로 CRUD를 설정하는 빠른 방법은 무엇입니까?
// 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();
?>
그리고 그것 뿐이다 : 다음은 내가 데이터베이스 테이블을 조작 할 CMS를 설정하는 방법의 코드의 예를 보여줍니다 . $f->arr_validate
을 채우는 한 모든 유효성 검사가 완료됩니다. 검색, 정렬, 페이지 매김, 편집, 삭제 등의 기능은 모두 위의 코드로 완료됩니다.
코드 이그니 저는 어떤 점이 비슷합니까? 상자 밖으로 그러한 것이 없다면 그냥 그렇게 말하십시오. (적어도 내가 아는 한) 가장 인기