<p>Copyright © 2016, MITOS<br> All rights reserved.</p> <p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p> <p>1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</p> <p>2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</p> <p>3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.</p> <p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
<p>IdGenerator is an Library generator for CodeIgniter - a toolkit - for people who build web sites using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries. IdGenerator lets you creatively focus on your project by minimizing the amount of code needed for a given task.</p>
IdGenerator it is a totally different idea and... more simple idea! With few simple PHP lines of code you can have all the functionality that you need to create your CRUD. So this means you don't have to copy the same Javascripts,CSS, views,models,vaildation rules,html code, grid, upload functionality ... e.t.c . again and again. To create again a CRUD for a different table you will just need simple PHP lines of code.
The good part is that you don't even have to change the CSS to make it more user friendly. IdGenerator is ready for the production mode with all the required security and views.
IdGenerator is an automatic CRUD generator and it can cover almost all your needs for a CRUD system (simple or complex one) as it has many features and still keep going.
Some of the main features of IdGenerator are:
- Datagrid listing with paging, sorting, searching by field and search for all with ajax (flexigrid theme) or instant javascript scripting (datatables theme)
- Automatic creation of inputs by field type. Till now the field types that auto-generate different inputs are: integer, string, text, date, datetime, set, enum, true_false(0 or 1), hidden, password and readonly
- Database relation 1-1 , 1-n and n-n , automatically with just one line of code
- Changing themes easlily, so far there are two themes , datatables and flexigrid
- Validation form with client side validation and server side validation
- Flexibility to choose columns and fields that you want to add to your table
- Unset operation like unset add, edit or delete
- Changing the auto generate field type, for example a text field can transform easily to date field
PHP version 5.4 or newer is recommended.
It should work on 5.2.4 as well, but we strongly advise you NOT to run such old versions of PHP, because of potential security and performance issues, as well as missing features.
A database is required for most web application programming. Currently supported databases are:
- MySQL (5.1+) via the mysql (deprecated), mysqli and pdo drivers
- Oracle via the oci8 and pdo drivers
- PostgreSQL via the postgre and pdo drivers
- SQLite via the sqlite (version 2), sqlite3 (version 3) and pdo drivers
- CUBRID via the cubrid and pdo drivers
- Interbase/Firebird via the ibase and pdo drivers
- ODBC via the odbc and pdo drivers (you should know that ODBC is actually an abstraction layer)
The installation is really easy. You just copy all the files to your project and you are ready to use IdGenerator.
By the end of the installation, your file structure should look similar to this (the below structure is the default unchanged folders/files of codeigniter.
–––– application/
–––––––– config/
–––––––––––– i_generator.php
–––––––––––– ...
–––––––– controllers/
–––––––––––– ...
–––––––– libraries/
–––––––––––– igenerator/
––––––––––––---- I_Form.php
––––––––––––---- I_Generator.php
––––––––––––---- I_GeneratorBridge.php
––––––––––––---- I_Grid.php
––––––––––––---- I_Pagination.php
––––––––––––---- I_Table.php
––––––––––––---- I_Template.php
––––––––––––---- I_Upload.php
–––––––––––– ...
–––––––– models/
–––––––––––– ...
–––––––– views/
–––––––––––– template/
––––––––––––---- tpl_default.php
––––––––––––---- tpl_scripts.php
–––– common/
–––––––– bootstrap/
–––––––– fonts/
–––––––– jquery/
–––––––– plugins/
–––––––– theme/
–––––––– uploads/
–––– system/
$autoload['libraries'] = array('database','session','igenerator/I_Generator');
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>ID GENERATOR</title>
<!-- START REQUIRED -->
<link rel="stylesheet" href="<?php echo base_url(common/bootstrap/css/bootstrap.css); ?>"/>
<link rel="stylesheet" href="<?php echo base_url(common/theme/css/i_generator.css); ?>"/>
<link rel="stylesheet" href="<?php echo base_url(common/plugins/validator/css/bootstrapValidator.min.css); ?>"/>
<link rel="stylesheet" href="<?php echo base_url(common/fonts/font-awesome/css/font-awesome.min.css); ?>"/>
<link rel="stylesheet" href="<?php echo base_url(common/plugins/fileinput/css/fileinput.css); ?>"/>
<link rel="stylesheet" href="<?php echo base_url(common/theme/css/animate.css); ?>"/>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesnt work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="<?php echo base_url(common/jquery/jquery-2.2.0.min.js); ?>"></script>
<script src="<?php echo base_url(common/plugins/fileinput/js/fileinput.js); ?>"></script>
<!-- END REQUIRED -->
</head>
<body>
<!-- START REQUIRED -->
<div class="notifications top-right"></div>
<div class="i_progress">
<div class="progress progress-striped active"><div class="progress-bar progress-bar-primary" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div>
</div>
<div class="modal fade" id="modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body">
<p></p>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<!-- END REQUIRED -->
<div class="container">
<!-- START REQUIRED -->
<?php if ($this->session->flashdata("status")): ?>
<div class="alert alert-<?php echo $this->session->flashdata("status"); ?> alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<strong><?php echo ucfirst($this->session->flashdata("title")); ?></strong> <?php echo ucfirst($this->session->flashdata(message)); ?>
</div>
<?php endif; ?>
<!-- END REQUIRED -->
<!-- START REQUIRED //DO NOT RENAME ATTRIBUTE CLASS! -->
<div class=contents>
<?php echo isset($contents) ? $contents : ""; ?>
</div>
<!-- END REQUIRED -->
</div>
<!-- START REQUIRED -->
<script src="<?php echo base_url(common/bootstrap/js/bootstrap.min.js); ?>"></script>
<script src="<?php echo base_url(common/plugins/validator/js/bootstrapValidator.min.js); ?>"></script>
<script src="<?php echo base_url(common/plugins/bootbox/js/bootbox.min.js); ?>"></script>
<?php $this->load->view(template/tpl_scripts); ?>
<!-- END REQUIRED -->
</body>
</html>
For more example see our Example Page