<commit_before><?php if(!defined('GX_LIB')) die("Direct Access Not Allowed!");
/*
*    GeniXCMS - Content Management System
*    ============================================================
*    Build          : 20140925
*    Version        : 0.0.1 pre
*    Developed By   : <NAME> (www.metalgenix.com)
*    License        : MIT License
*    ------------------------------------------------------------
* filename : Db.class.php
* version : 0.0.1 pre
* build : 20140925
*/

class Db
{
    static $num_rows = "";
    static $last_id = "";
    static $link = '';

    public function __construct () {
        global $vars;
        if(DB_DRIVER == 'mysql') {
            mysql_connect(DB_HOST, DB_USER, DB_PASS);
            mysql_select_db(DB_NAME);
        }elseif(DB_DRIVER == 'mysqli') {
            self::$link = mysqli_connect(DBHOST, DBUSER, DB_PASS, DB_NAME);
        }
    }

    public static function query ($vars) {
        if(DB_DRIVER == 'mysql') {
            mysql_query('SET CHARACTER SET utf8');
            $q = mysql_query($vars)  or die(mysql_error());
        } <commit_msg>return self::$link<commit_after><?php if(!defined('GX_LIB')) die("Direct Access Not Allowed!");
/*
*    GeniXCMS - Content Management System
*    ============================================================
*    Build          : 20140925
*    Version        : 0.0.1 pre
*    Developed By   : <NAME> (www.metalgenix.com)
*    License        : MIT License
*    ------------------------------------------------------------
* filename : Db.class.php
* version : 0.0.1 pre
* build : 20140925
*/

class Db
{
    static $num_rows = "";
    static $last_id = "";
    static $link = '';

    public function __construct () {
        global $vars;
        if(DB_DRIVER == 'mysql') {
            mysql_connect(DB_HOST, DB_USER, DB_PASS);
            mysql_select_db(DB_NAME);
        }elseif(DB_DRIVER == 'mysqli') {
            self::$link = mysqli_connect(DBHOST, DBUSER, DB_PASS, DB_NAME);
            return self::$link;
        }
    }

    public static function query ($vars) {
        if(DB_DRIVER == 'mysql') {
            mysql_query('SET CHARACTER SET utf8');
            $q = mysql_query($vars)  or die(mysql_error());
        } 
{'fraction_non_alphanumeric': 0.23256860098965362, 'fraction_numerical': 0.0206927575348628, 'mean_word_length': 1.9732620320855614, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1736602', 'n_tokens_mistral': 702, 'n_tokens_neox': 657, 'n_words': 143}