public function controllerCall($application, $controller, $method)
 {
     $this->setOptions();
     $kite = KITE::getInstance('kite');
     $kite->set('APP', $application);
     $kite->set('CONTROLLER', $controller);
     $kite->set('METHOD', $method);
     $app = new $controller();
     $app->{$method}();
 }
Esempio n. 2
0
 public function log()
 {
     $pdo = KITE::getInstance('pdo');
     $stmt = $pdo->query("SELECT * from maths");
     $result = $stmt->fetchAll(PDO::FETCH_ASSOC);
     $basket = KITE::getInstance('basket');
     foreach ($result as $key => $value) {
         $basket->set('a' . $key, $value);
     }
 }
<?php

/*	KITE 			- A NANO PHP MVC FRAMEWORK
 *	package 		- root
 *	file 				- index.php
 * 	Developer 	- Krishna Teja G S
 *	Website		- http://www.packetcode.com/projects/kite
 *	license			- GNU General Public License version 2 or later
*/
//defining a global constant to block direct access to files
define('_KITE', true);
// directory sperator
define('DS', DIRECTORY_SEPARATOR);
//check for the installation file
// 'check.php' is a sample file used before installation
// if the file is deleted after the installation is done
if (file_exists('lib' . DS . 'installer' . DS . 'check.php')) {
    require_once "lib" . DS . "installer" . DS . "installer.php";
    $install = new Installer();
    $install->main();
} else {
    //load the error class and kite class
    require_once "lib" . DS . "error.php";
    require_once "lib" . DS . "kite.php";
    $kite = KITE::getInstance('kite');
    $kite->kite_main();
}
 public static function getModel($model)
 {
     $kite = KITE::getInstance('kite');
     $app = $kite->get('APP');
     $file = "apps" . DS . $app . DS . "models" . DS . $model . ".php";
     //check if the model exists then load the model file
     if (file_exists($file)) {
         require_once $file;
         $model_obj = new $model();
         return $model_obj;
     } else {
         echo "model doesnt exists";
     }
 }
            .form-group.required .control-label:after {
                content:"*";
                color:red;
            }
            th, td {
    		padding: 5px;
		}
        </style>

  </head>

  <body >

  <?php 
$home = $about = $services = $contact = "";
$node = KITE::getInstance('node');
$o1 = $node->get('n1');
if ($o1 == '') {
    $home = 'active';
} elseif ($o1 == 'about') {
    $about = 'active';
} elseif ($o1 == 'services') {
    $services = "active";
} elseif ($o1 == 'contact') {
    $contact = "active";
}
?>
    <div class="container"  background="../mississippi-state-bulldogs-logo-wallpaper.jpg">
      <div class="page-header">
      <?php 
session_start();