GitHost.io will be shut down on June 1, 2019. At that point this instance will be unreachable and all data will be irrevocably deleted. More details at https://about.gitlab.com/gitlab-hosted/#githost-is-shutting-down-on-june-1st-2019

Commit 3f49e162 authored by mattl's avatar mattl

okay, some good stuff here... old submissions interfaces, etc.

this is all GPLv2 stuff.
parent a348d6ae
/myalg.php/1.1.1.1/Wed Mar 19 00:58:31 2003//
/myalg2.php/1.1.1.1/Wed Mar 19 00:58:49 2003//
/profiles.cache/1.1.1.1/Wed Mar 19 00:58:48 2003//
/submissiontest.php/1.22/Fri Apr 11 21:42:18 2003//
/testbed.php/1.1.1.1/Wed Mar 19 00:58:49 2003//
D
:pserver:anonymous@audioscrobbler.cvs.sourceforge.net:/cvsroot/audioscrobbler
/class_dal.phps/1.1.1.1/Wed Mar 19 00:58:49 2003//
/class_extensionObject.phps/1.1.1.1/Wed Mar 19 00:58:49 2003//
D
A D/config////
A D/drivers////
:pserver:anonymous@audioscrobbler.cvs.sourceforge.net:/cvsroot/audioscrobbler
This diff is collapsed.
<?php
/**
* class extensionObject
*
* This class is the framework to put loaded extensions in. It provides all the
* nescesarry variables to do the administration involved with loaded extensions.
*
* @version 0.1.3
* @author Patrick van Zweden
* @package dal
*/
class extensionObject
{
/**
* Name of the extension
*
* @access private
*/
var $name;
/**
* Provides the pointer to the loaded extension
*
* @access private
*/
var $extension;
/**
* Does the extension override the query functions ?
* By this we mean the executeQuery function
*
* @access private
*/
var $queryHook;
/**
* Gives a reference to the driver that is used.
*/
var $dbdriver;
/**
* Constructor
*
* @access private
*/
function extensionObject()
{
$this->init();
}
/**
* Init routine
*
* @access private
*/
function init()
{
$this->name = "undefined";
$this->extension = NULL;
$this->final = 0;
}
/**
* Return the name of the extension
*
* @access public
*/
function returnName()
{
return $this->name;
}
/**
* checks if the query functions are overriden
*
* @access public
*/
function checkQueryHook()
{
if ($this->extension->queryHook) {
return true;
}
else {
return false;
}
}
/**
* Checks if the selection of database is overriden
*
* @access public
*/
function checkSelectDBHook()
{
if($this->extension->selectDBHook) {
return true;
}
else {
return false;
}
}
/**
* Checks if the transaction functions are overridden
*
* @access public
*/
function checkTransactionHook()
{
if($this->extension->transactionHook) {
return true;
}
else {
return false;
}
}
/**
* Checks the final attribute
*
* @access public
*/
function checkFinal()
{
if ($this->extension->final == 1) {
return true;
}
else {
return false;
}
}
}
?>
/config.php/1.1.1.1/Wed Mar 19 00:58:49 2003//
D
:pserver:anonymous@audioscrobbler.cvs.sourceforge.net:/cvsroot/audioscrobbler
<?php
/**
* Config file for dal
*
* @package dal
*/
class dalConfigObject {
/**
* Base dir from where dal tries to load drivers and so on
*/
var $basedir;
/**
* Contains which drivers can be loaded
* @package dal
*/
var $drivers;
/**
* Connection info
*/
var $configurations;
/**
* Configuration lock
*/
var $configurationLocked;
/**
* Path to use for storing temporary files.
*/
var $tmpFilePath;
/**
* Which dir we use for the extensions
*/
var $extensionDir;
/**
* Do we use extensions which use hooks ?
*/
var $extensionUseHooks;
/**
* Full extension dir name
*/
var $fullExtensionDir;
/**
* Language to use
*/
var $language;
/**
* Extension of the files we include.
*/
var $fileExt;
/**
* Constructor
*
* @access private
*/
function dalConfigObject()
{
$this->init();
$this->createExtensionList();
$this->includeMessages();
}
/**
* Inits all the vars
*
* @access private
*/
function init()
{
$this->basedir = "d:/web/audioscrobbler/dal";
$this->drivers = array("mysql", "postgres", "msql");
$this->configurations = array("conf1" => array( "dbuser" => "josh",
"dbpassword" => "",
"dbconnectString" => ""),
"conf2" => array( "dbuser" => "",
"dbpassword" => "",
"dbconnectString" => "")
);
$this->configurationLocked = false;
$this->tmpFilePath = "./";
$this->extensionDir = "./";
$this->extensionUseHooks = true;
$this->language = "english";
$this->blockTransAfterError = 1;
$this->onErrorAbort = 1;
$this->fileExt = '.phps';
}
/**
* Includes the messages dal gives
*
* @access private
*/
function includeMessages()
{
include_once("$this->basedir/config/lang/$this->language.inc");
}
/**
* Fills array with which extensions are available
*
* @access private
*/
function createExtensionList()
{
$this->fullExtensionDir = $this->basedir . "/" . $this->extensionDir;
$dirHandle = opendir($this->fullExtensionDir);
while ($fileName = readdir($dirHandle)) {
$fullName = $this->fullExtensionDir . $fileName;
if (filetype($fullName) == "dir") {
if (!preg_match("/\.|\.\./", $fullName)) {
$this->extensions[] = $fileName;
}
}
}
}
}
?>
/english.inc/1.1.1.1/Wed Mar 19 00:58:49 2003//
D
audioscrobbler-testbed/dal/config/lang
:pserver:anonymous@audioscrobbler.cvs.sourceforge.net:/cvsroot/audioscrobbler
<?php
/**
* Defines
*
* @package dal
*/
define ('DB_CONNECT_ERROR', "Error while connecting to the database");
define ('QUERY_ERROR', "ERROR in query");
define ('OBJECT_FETCH_FAILED', "Could not fetch result object ");
define ('ARRAY_FETCH_FAILED', "Could not fetch result array ");
define ('ROW_FETCH_FAILED', "Could not fetch result row ");
define ('NO_RESULT_FROM_QUERY', "You performed an update, insert or delete query which does not produce a result ");
define ('ERROR_NO_DB_SELECTED', "No database selected");
define ('DB_NO_MESSAGE', "No error message available");
define ('DRIVER_NOT_CAPABLE', "The specified driver is not capable of : %s");
define ('OBJECT_FETCHING', "fetching objects from a result.");
define ('ARRAY_FETCHING', "fetching array's from a result.");
define ('ROW_FETCHING', "fetching rows as an indexed array from a result.");
define ('LAST_INSERT_FETCHING', "fetching the last inserted record.");
define ('LAST_INSERT_ID_FETCH', "fetching the last autogenerated id");
define ('CUSTOM_HANDLER_USED', "You are using a custom error handler so DAL doesn't store the errors anymore");
define ('TRANSACTION_SUPPORT', "using transactions");
define ('TRANSACTION_START_FAILED', "Start of transaction failed: %s");
define ('TRANSACTION_COMMIT_FAILED', "Commit of transaction failed: %s");
define ('TRANSACTION_ABORT_FAILED', "Abort of transaction failed: %s");
define ('CLOSE_WARNING', "DAL CLOSE WARNING: %s");
define ('TRANSACTION_STILL_RUNNING', "a transaction was still running, it's aborted automagicly");
define ('TRANSACTION_ALREADY_RUNNING', "a transaction is already running");
define ('EXTENSION_LOADING_ERROR', "There was an error while trying to load extension %s: %s");
define ('EXTENSION_ALREADY_LOADED', "the extension was already loaded");
define ('NEXT_RECORD_SEEK', "seeking to the next record.");
define ('PREV_RECORD_SEEK', "seeking to the previous record.");
define ('NEXT_RECORD_SEEK_FAILED', "Seeking to the next record failed: %s");
define ('PREV_RECORD_SEEK_FAILED', "Seeking to the previous record failed: %s");
define ('RECORD_SEEK_FAILED', "Seeking to the specified record failed: %s");
define ('RECORD_OUT_OF_BOUNDS', "specified records was out of bounds.");
define ('CONFIGURATION_SELECT_ERROR', "There was an error while selecting the configuration %s: %s");
define ('CONFIG_DOES_NOT_EXIST', "the specified configuration does not exist.");
define ('CONF_ADD_ERROR', "There was an error while adding configuration %s: %s");
define ('CONFIGURATION_EXISTS', "the specified configuration already exists.");
define ('NOT_ENOUGH_PARAMETERS', "insufficient parameters specified, expected count %d");
define ('CONFIGURATION_LOCKED', "the configuration is locked and therefore can't be modified");
define ('DRIVER_NOT_EXIST', "The specified driver (%s) does not exist.");
define ('TRANSACTION_BLOCKED_DUE_ERROR', "The actions of the current transaction are blocked due an previous error.");
?>
\ No newline at end of file
/class_dummy.phps/1.1.1.1/Wed Mar 19 00:58:50 2003//
/class_msql.phps/1.1.1.1/Wed Mar 19 00:58:50 2003//
/class_mysql.phps/1.1.1.1/Wed Mar 19 00:58:50 2003//
/class_postgres.phps/1.1.1.1/Wed Mar 19 00:58:50 2003//
D
audioscrobbler-testbed/dal/drivers
:pserver:anonymous@audioscrobbler.cvs.sourceforge.net:/cvsroot/audioscrobbler
<?php
/**
* class dummy.
*
* This is a dummy driver. It's meant as an example for which
* functions to include in a db driver.
*
* @author Patrick van Zweden
* @package dal
* @subpackage drivers
*/
class dummyDriver {
var $version;
var $fullname;
var $capabilities;
var $connectString;
var $userName;
var $password;
/**
* Constructor of the dummy Driver
*/
function dummyDriver()
{
$this->initialize();
}
/**
* Initialize stuff that needs initializing
*
* @access private
*/
function initialize()
{
$this->version = "0.0.1";
$this->fullname = "Dummy Driver";
$this->capabilities = array("return_object", "return_array", "return_row", "return_last_insert", "transactions",
"seekrecord", "nextrecord", "prevrecord");
$this->connectString = "";
$this->userName = "";
$this->password = "";
}
function onDestroy()
{
/**
* In here you can put stuff such as closing the database connection
* and freeing up the last result, .....
*
* It is called when the DAL object gets destroyed.
*/
}
/**
* Select the database to be used
*
* input : string $database - name of the database to be used
* @return (int) database selected
* @access public
*/
function selectDB($database)
{
/**
* Select the database according to the $database var.
*/
}
/**
* Returns the capabilities of the driver
*
* @return (array) capabilities of the driver
* @access public
*/
function capabilities()
{
return $this->capabilities;
}
/**
* Connects to the database
*
* @param (String) $database
* @return (int)
* @access public
*/
function connectDB()
{
/**
* Code to connect to the database.
* Return the success of connecting
*/
}
/**
* Closes the database connection
*
* @return (boolean)
* @access public
*/
function closeDB()
{
/**
* Close the connection to the database
* Return the success of closing
*/
}
/**
* Returns the errormessage.
*/
function getDBerror()
{
/**
* Gets the error message from the database
* and returns it to DAL.
*/
}
/**
* Executes the query on the database
*
* @return boolean
* @access public
*/
function executeQuery($query)
{
/**
* Execute the query on the database and keep
* administration of the resultset we get.
* Return the success of executing the query on the
* database
*/
}
/**
* Returns the number of affected rows from an update, insert or delete query
*
* @return int
* @access public
*/
function affectedRows()
{
/**
* Return the affected rows
*/
}
/**
* Returns the number or rows in a result
*
* @return int
* @access public
*/
function resultRowcount()
{
/**
* Return the rowcount
*/
}
/**
* fetches the resulting row as an object from the db
*/
function fetchObject()
{
/**
* Fetch on row from the resultset as
* an object and return it.
*/
}
/**
* fetches the resulting row as an array from the db
*
* @return array
* @access public
*/
function fetchArray()
{
/**
* Fetch a row from the resultset as an
* associative array and return it.
*/
}
/**
* fetches the resulting row as an array from the db
*
* @return array
* @access public
*/
function fetchRow()
{
/**
* Fetch a row from the resultset as a
* enumerated array and return it.
*/
}
/**
* Returns the last inserted record.
*/
function fetchLastInsert()
{
/**
* Return the last record that was inserted as
* an object.
*/
}
/**
* Start a transaction
*/
function startTransaction()
{
/**
* Start a transaction
*/
}
/**
* Commits the transaction
*/
function commitTransaction()
{
/**
* Commit a running transaction.
*/
}
/**
* Aborts the transaction
*/
function abortTransaction()
{
/**
* abort a running transaction
*/
}
/**
* seeks to the next row
* Returns false when seeking fails
*
* @return boolean
*/
function nextRecord()
{
/**
* currentRow = currentRow + 1
*/
}
/**
* Seeks to the previous row
* Returns false when seeking fails
*
* @return boolean
*/
function prevRecord()
{
/**
* currentRow = currentRow -1
*/
}
/**
* Seeks to the specified row
* Returns false when seeking fails
*
* @param (int) $rowID ID of the row to seek to
* @return boolean
*/
function seekRecord($rowID)
{
/**
* currentRow = $rowID
*/
}
/**
* Saves the current state of the database driver
* It saves the current state and sets the resultID
* to zero to prevent erasing of the resultset.
*
* @access public
*/
function saveState()
{
/**
* Save everything that is usefull for the driver
* to remember, such as resultsets and so on.
* Remeber to set the result to zero after saving the set
* as it gets freed when a non-zero and a query is executed.
*/
}
/**
* Restores the saved state of the database driver
* Trows away a produced result and restores the
* saved state. After that it deletes the stored
* state.
*
* @access public
*/
function restoreState()
{
/**
* Restore the driver to a saved state. Remember to
* clean up before restoring.
*/
}
}
?>
<?php
/**
* class msqlDriver
* This class is a driver for the msql database
* it has standard functions for connecting to the database
* and executing queries on the database.
*
* @author Patrick van Zweden
* @author Ben Efros
* @version 0.0.6