Exemple #1
0
 public static function getInstance()
 {
     if (!self::$dbh) {
         self::$dbh = new DatabasePDO();
     }
     return self::$dbh;
 }
 public static function fetch_obj($queryDB)
 {
     if (self::$runQuery == 'no') {
         $queryDB->execute();
         $queryDB->setFetchMode(PDO::FETCH_OBJ);
     }
     self::$runQuery = 'yes';
     $row = $queryDB->fetch();
     return $row;
 }
Exemple #3
0
 private static function initializeConnection()
 {
     if (is_null(self::$dbConn)) {
         self::$dbConn = DatabasePDO::getInstance();
     }
 }
Exemple #4
0
 public function __construct()
 {
     $this->pdo = DatabasePDO::getInstance();
 }
Exemple #5
0
 *   site					: http://www.webidsupport.com/
 ***************************************************************************/
/***************************************************************************
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version. Although none of the code may be
 *   sold. If you have been sold this script, get a refund.
 ***************************************************************************/
session_start();
define('InWeBid', 1);
include 'functions.php';
include '../includes/database/Database.php';
include '../includes/database/DatabasePDO.php';
define('InInstaller', 1);
$db = new DatabasePDO();
define('MAIN_PATH', getmainpath());
$package_version = package_version();
$settings_version = 'Unknown';
$silent = isset($_GET['silent']) && $_GET['silent'] == 1 ? true : false;
if (!$silent) {
    echo print_header(false);
}
$step = isset($_GET['step']) ? $_GET['step'] : 0;
switch ($step) {
    case 2:
        $siteURL = urldecode($_GET['URL']);
        $siteEmail = $_GET['EMail'];
        include '../includes/config.inc.php';
        include 'sql/dump.inc.php';
        $queries = count($query);
 public static function insert_id($objectStr = '')
 {
     switch (self::$dbType) {
         case "mysqli":
             $id = self::$dbConnect->insert_id;
             if (is_object($objectStr)) {
                 $objectStr($id);
             }
             return $id;
             break;
         case "sqlserver":
             $id = DatabaseSqlserver::insert_id($objectStr);
             return $id;
             break;
         case "mssql":
             $id = DatabaseMSSQL::insert_id($objectStr);
             return $id;
             break;
         case "pdo":
             $id = DatabasePDO::insert_id($objectStr);
             return $id;
             break;
     }
 }
Exemple #7
0
define('UPLOAD_PATH', MAIN_PATH . UPLOAD_FOLDER);
define('IMAGE_CACHE_PATH', UPLOAD_PATH . 'cache/');
include INCLUDE_PATH . 'errors.inc.php';
//error handler functions
// classes
include INCLUDE_PATH . 'database/Database.php';
include INCLUDE_PATH . 'database/DatabasePDO.php';
include INCLUDE_PATH . 'Date.php';
include INCLUDE_PATH . 'functions_global.php';
include INCLUDE_PATH . 'class_email_handler.php';
include INCLUDE_PATH . 'class_MPTTcategories.php';
include INCLUDE_PATH . 'class_fees.php';
include INCLUDE_PATH . 'User.php';
include INCLUDE_PATH . 'template/Template.php';
// connect to the database
$db = new DatabasePDO();
if (isset($CHARSET)) {
    $db->connect($DbHost, $DbUser, $DbPassword, $DbDatabase, $DBPrefix, $CHARSET);
} else {
    $db->connect($DbHost, $DbUser, $DbPassword, $DbDatabase, $DBPrefix);
}
$system = new global_class();
$template = new Template();
$user = new User();
include INCLUDE_PATH . 'messages.inc.php';
$system->loadAuctionTypes();
set_error_handler('WeBidErrorHandler', $error_reporting);
if ($user->logged_in) {
    $system->tdiff = $system->getUserOffset(time(), $user->user_data['timezone']);
    $system->ctime = $system->getUserTimestamp(time(), $user->user_data['timezone']) + $system->tdiff;
}
Exemple #8
0
 *   copyright				: (C) 2008 - 2016 WeBid
 *   site					: http://www.webidsupport.com/
 ***************************************************************************/
/***************************************************************************
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version. Although none of the code may be
 *   sold. If you have been sold this script, get a refund.
 ***************************************************************************/
session_start();
define('InWeBid', 1);
define('InInstaller', 1);
include '../includes/database/Database.php';
include '../includes/database/DatabasePDO.php';
$db = new DatabasePDO();
include 'functions.php';
define('MAIN_PATH', getmainpath());
$step = isset($_GET['step']) ? $_GET['step'] : 0;
$new_version = 'Unknown';
/*
how new updater will work
in package config.inc.php will be named config.inc.php.new so it cannot be overwritten
1. check for config.inc.php
2. if config file missing ask for details
3. with database details check theres actually an installation of webid if not show link to make fresh install
	- if there is but no config write config file
4. collect query needed to run for version in use
5. update language files
*/
if ($step == 0) {