Exemplo n.º 1
0
 public function __construct($condition = [])
 {
     $this->db = Application::$i->dbConnection;
     $this->__tableName = static::tableName();
     if (!empty($condition)) {
         $this->__DataSet = $this->select($condition)->get();
         var_dump_pre($this->__DataSet);
     }
 }
Exemplo n.º 2
0
/**
 * Delete an existing secret 
 * @param $secret The secret name
 */
function secrets_delete($secret)
{
    if (isset($secret['name'])) {
        $esc_name = mysql_real_escape_string($secret['name']);
        $sql = "DELETE FROM variable WHERE name = '" . $esc_name . "'";
        $res = mysql_query($sql);
        if (!$res) {
            die(mysql_error());
        }
        if (mysql_affected_rows() > 0) {
            message_register('Secret deleted.');
        }
    } else {
        message_register('No such secret');
        var_dump_pre($secret);
    }
}
Exemplo n.º 3
0
<?php

var_dump_pre($_SESSION);
function var_dump_pre($mixed = null)
{
    echo '<pre>';
    print_r($mixed);
    echo '</pre>';
    return null;
}