예제 #1
0
파일: db.php 프로젝트: kbaerthel/com_clm
 public function query($query)
 {
     if (!($result = $this->db[0]->query(clm_core::$load->db_add_prefix($query, $this->db[1])))) {
         clm_core::addError("sql invalid", $query . " (" . $this->db[0]->error . ")" . " Backtrace: " . clm_core::getBacktrace());
     } else {
         return $result;
     }
 }
예제 #2
0
파일: api.php 프로젝트: kbaerthel/com_clm
 private function autoInclude($api)
 {
     if (!function_exists("clm_api_" . $api)) {
         $path = clm_core::$path . DS . "api" . DS . $api . '.php';
         if (file_exists($path)) {
             require_once $path;
         } else {
             clm_core::addError("api missing", $path . " (" . $api . ")" . " Backtrace: " . clm_core::getBacktrace());
         }
     }
 }
예제 #3
0
function clm_function_load_view($view, $args, $div = true)
{
    clm_core::$load->load_css("reset");
    if (!function_exists("clm_view_" . $view)) {
        $path = clm_core::$path . DS . "views" . DS . $view . '.php';
        if (file_exists($path)) {
            require_once $path;
        } else {
            clm_core::addError("view missing", $path . " (" . $view . ")" . " Backtrace: " . clm_core::getBacktrace());
        }
    }
    ob_start();
    $out[0] = call_user_func_array("clm_view_" . $view, $args);
    if ($div) {
        $out[1] = '<div class="clm_view_' . $view . '">' . ob_get_contents() . "</div>";
    } else {
        $out[1] = ob_get_contents();
    }
    ob_end_clean();
    return $out;
}
예제 #4
0
파일: core.php 프로젝트: kbaerthel/com_clm
 public static function autoload($class)
 {
     if (!class_exists($class) && substr($class, 0, 10) == "clm_class_") {
         $path = clm_core::$path . DS . "classes" . DS . substr($class, 10) . '.php';
         if (file_exists($path)) {
             require_once $path;
         } else {
             clm_core::addError("class missing", $path . " (" . $class . ")" . " Backtrace: " . self::getBacktrace());
         }
     }
 }