function add() { $db = ModelDb::sharedInstance()->findAll(); $path = ModelPath::sharedInstance()->findAll(); $params = array('db' => $db, 'path' => $path); KY::getView()->draw('job.add.form', $params); }
function addShowTables() { $host = $_POST['host']; $user = $_POST['user']; $pass = $_POST['pass']; $database = $_POST['database']; $prefix = $_POST['prefix']; $rows = ModelDb::sharedInstance()->showTables($host, $user, $pass, $database, $prefix); $params = array('rows' => $rows); KY::getView()->draw('db.add.showtables', $params); }
function addForm() { KY::getView()->draw('path.add.form'); }
<?php include 'config.php'; KY::init(); KY::getText()->setLanguage($language); KY::getDB()->connect($mysql_host, $mysql_user, $mysql_pass, $mysql_db); KY::getView()->setBasePath($viewPath); KY::getRoute()->setBaseUrl($baseurl); KY::getRoute()->setUrlVar($urlVarName); include 'routes.php'; KY::getView()->draw('header'); $currentRoute = KY::getRoute()->getCurrentRoute(); KY::getRoute()->loadRoute($currentRoute);