Update system/pip.php

alter pip function to pip class
Update index.php
Update application/config/config.php
Update application/controllers/error.php
Update system/model.php

Use PDO
Update system/controller.php

add function render case return response posible ajax...
Update application/controllers/main.php

example return json 
Update application/models/example_model.php
Update system/model.php
Update application/controllers/main.php

example return category ajax
Update index.php
Update index.php
Update system/pip.php
Update system/view.php
Update system/controller.php
Update application/config/config.php
Update application/controllers/error.php
Update application/models/example_model.php
Update system/model.php
Update application/controllers/main.php