Ejemplo n.º 1
0
function systemDatabase()
{
    $dbMainHost = "db153.pair.com";
    $dbMainUser = "******";
    $dbMainPass = "******";
    $dbMainDbse = "reinfurt_point";
    $dbConnect = MYSQL_CONNECT($dbMainHost, $dbMainUser, $dbMainPass);
    MYSQL_SELECT_DB($dbMainDbse, $dbConnect);
}
Ejemplo n.º 2
0
function dbCall($dbName)
{
    global $hname;
    global $uname;
    global $pword;
    // make connection to database
    MYSQL_CONNECT($hname, $uname, $pword) or die("Unable to connect to database");
    @mysql_select_db("{$dbName}") or die("Unable to select database");
}
Ejemplo n.º 3
0
 /**
  * Connecting To Database;
  *
  * @param $debug = false;
  **/
 private function Databases($debug = true)
 {
     global $config;
     $this->db = $config['iSafe']['databases']['db_name'];
     $this->db_host = $config['iSafe']['databases']['db_host'];
     $this->db_user = $config['iSafe']['databases']['db_user'];
     $this->db_pass = $config['iSafe']['databases']['db_pass'];
     MYSQL_CONNECT($this->db_host, $this->db_user, $this->db_pass) or die($this->debug(1, __LINE__, __FILE__));
     MYSQL_SELECT_DB($this->db) or die($this->debug(2, __LINE__, __FILE__));
 }
Ejemplo n.º 4
0
 public function __construct($db)
 {
     $this->name = $db->getName();
     // load relation list for table
     $this->relation = $db->relation;
     // establish connection to db server
     $this->dbResource = @MYSQL_CONNECT($db->server, $db->user, $db->password);
     if (!$this->dbResource) {
         OLIVError::fire('no database connection');
         return FALSE;
     } else {
         // connection established
         // select database and set prefix
         @MYSQL_SELECT_DB($this->name);
         if (array_key_exists('prefix', $db)) {
             $this->prefix = $db['prefix'];
         }
         return $this->dbResource;
     }
 }
<?php

$hostname = "localhost";
$username = "******";
$password = "******";
$dbName = "DatabaseName";
MYSQL_CONNECT($hostname, $username, $password) or die("Unable to connect to database.");
MYSQL_SELECT_DB("{$dbName}") or die("Unable to select database");
Ejemplo n.º 6
0
<?php

$db_server = "localhost";
$db_name = "bs";
$db_user = "******";
$db_passwort = "bspw";
// when change this, then need to edit schema.sql
define("DB_PREFIX", "bs_");
$db = @MYSQL_CONNECT($db_server, $db_user, $db_passwort) or die("Konnte keine Verbindung zur Datenbank herstellen");
$db_select = @MYSQL_SELECT_DB($db_name);
Ejemplo n.º 7
0
$mail->SMTPAuth = true;
// enable SMTP authentication
$mail->SMTPKeepAlive = true;
// SMTP connection will not close after each email sent
$mail->Host = "mail.yourdomain.com";
// sets the SMTP server
$mail->Port = 26;
// set the SMTP port for the GMAIL server
$mail->Username = "******";
// SMTP account username
$mail->Password = "******";
// SMTP account password
$mail->SetFrom('*****@*****.**', 'List manager');
$mail->AddReplyTo('*****@*****.**', 'List manager');
$mail->Subject = "PHPMailer Test Subject via smtp, basic with authentication";
@MYSQL_CONNECT("localhost", "root", "password");
@mysql_select_db("my_company");
$query = "SELECT full_name, email, photo FROM employee WHERE id={$id}";
$result = @MYSQL_QUERY($query);
while ($row = mysql_fetch_array($result)) {
    $mail->AltBody = "To view the message, please use an HTML compatible email viewer!";
    // optional, comment out and test
    $mail->MsgHTML($body);
    $mail->AddAddress($row["email"], $row["full_name"]);
    $mail->AddStringAttachment($row["photo"], "YourPhoto.jpg");
    if (!$mail->Send()) {
        echo "Mailer Error (" . str_replace("@", "&#64;", $row["email"]) . ') ' . $mail->ErrorInfo . '<br />';
    } else {
        echo "Message sent to :" . $row["full_name"] . ' (' . str_replace("@", "&#64;", $row["email"]) . ')<br />';
    }
    // Clear all addresses and attachments for next loop
Ejemplo n.º 8
0
<?php

$dbHostname = "localhost";
$dbUsername = "******";
$dbPassword = "******";
$dbName = "test";
//  Make connection to database
//  If no connection made, display error Message
$dblink = MYSQL_CONNECT($dbHostname, $dbUsername, $dbPassword) or die("Error !! Unable to connect to database");
// Select the database name to be used or else print error message if unsuccessful*/
@mysql_select_db($dbName) or die("Unable to select database " . $dbName);
Ejemplo n.º 9
0
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>Test ModRewrite</title>	
	<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
</head>
<body>

<?php 
@MYSQL_CONNECT("localhost", "iggmp", "grumblfurz34");
@MYSQL_SELECT_DB("iggmp");
$res = mysql_query("SELECT * FROM lang_railway_summary");
echo mysql_num_rows($res);
while ($entry = mysql_fetch_array($res)) {
    $text = utf8_encode($entry['content']);
    echo $entry['content'] . "<hr>" . $text . "<hr><hr>";
}
?>

</body>
</html>

Ejemplo n.º 10
0
function createMarker(point, number)
{
var marker = new GMarker(point);

var html = number;
GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(html);});
return marker;
};

<?php 
$hostname = "xxxx";
$username = "******";
$password = "******";
$dbName = "xxxx";
$link = MYSQL_CONNECT($hostname, $username, $password) or print "Unable to connect to database<BR>";
mysql_selectdb($dbName, $link) or print "Unable to select database<BR>";
$result = mysql_query("SELECT * FROM fiksgrafitti where id={$id}", $link);
if (!$result) {
    echo "no results ";
}
while ($row = mysql_fetch_array($result)) {
    echo "var point = new GLatLng(" . $row['lat'] . "," . $row['lon'] . ");\n";
    echo "var marker = createMarker(point, '" . addslashes($row['feil']) . "<br>" . addslashes($row['sted']) . "');\n";
    echo "map.addOverlay(marker);\n";
    echo "\n";
}
mysql_close($link);
?>

//]]>
Ejemplo n.º 11
0
require 'include/init.inc.php';
require 'include/picmgmt.inc.php';
pageheader($lang_util_php['title']);
if (!GALLERY_ADMIN_MODE) {
    die('Access denied');
}
global $albumtbl, $picturetbl, $categorytbl, $usertbl, $lang_util_php;
$albumtbl = $CONFIG['TABLE_PREFIX'] . 'albums';
$picturetbl = $CONFIG['TABLE_PREFIX'] . 'pictures';
$categorytbl = $CONFIG['TABLE_PREFIX'] . 'categories';
$usertbl = $CONFIG['TABLE_PREFIX'] . 'users';
// initialize vars
$startpic = '';
$action = "";
$action = $_POST['action'];
MYSQL_CONNECT($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass']) or die("can't connect to mysql server");
MYSQL_SELECT_DB($CONFIG['dbname']);
function my_flush()
{
    print str_repeat(" ", 4096);
    // force a flush
}
function filenametotitle($delete)
{
    $albumid = $_POST['albumid'];
    $parsemode = $_POST['parsemode'];
    global $picturetbl, $lang_util_php;
    $query = "SELECT * FROM {$picturetbl} WHERE aid = '{$albumid}'";
    $result = MYSQL_QUERY($query);
    $num = mysql_numrows($result);
    $i = 0;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>
<?php 
include 'inc/favicon.inc.php';
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<title>Unbenanntes Dokument</title>

<?php 
$server = "localhost";
$user = "******";
$passwort = "EWbrVxjt";
$datenbank = "db854004";
MYSQL_CONNECT($server, $user, $passwort) or die("Fehler - Datenbankserver nicht erreichbar");
#Verbindung zum Datenbankserver herstellen
MYSQL_SELECT_DB($datenbank) or die("Fehler - Datenbank nicht vorhanden");
#Verbindung zur Datenbank herstellen
$daten = mysql_query("Select * from termine");
#Auswahl - Abfrage (Select) auf die Tabelle Termine (wichtig: Tabelle ist nicht Datenbank)
?>

</head>

<body>

<?php 
while ($termine = mysql_fetch_array($daten)) {
    # Schleifenbeginn, Ausgabe der Datensätze am Bildschirm
    echo $termine[1];
}
Ejemplo n.º 13
0
<?php

header('Content-Type: text/html; charset=utf-8');
$rootpath = dirname(dirname(__FILE__));
$upload_dir = '/img/';
$targetPath = $rootpath . $upload_dir;
$hostname = "localhost";
$username = "******";
$password = "";
$dbName = "test";
$images_table = "zz_images";
MYSQL_CONNECT($hostname, $username, $password) or die("Не могу создать соединение ");
@mysql_select_db("{$dbName}") or die("Не могу выбрать базу данных ");
mysql_query("SET NAMES 'utf8'");
try {
    $file_name = $_FILES['Filedata']['name'];
    $tempFile = $_FILES['Filedata']['tmp_name'];
    $targetFile = str_replace("//", "/", $targetPath) . $file_name;
    $fileParts = pathinfo($_FILES['Filedata']['name']);
    $extension = $fileParts['extension'];
    move_uploaded_file($tempFile, $targetFile);
    $sql = "SELECT max(code) as max_code FROM {$images_table} LIMIT 1";
    $result = mysql_query($sql);
    $row = mysql_fetch_assoc($result);
    $new_code = $row['max_code'] + 1;
    $filename = pathinfo($file_name, PATHINFO_FILENAME);
    $filepath = $upload_dir . $file_name;
    $sql = "INSERT INTO {$images_table} (`filename`, `type`, `code`, `filepath`) VALUES ('{$filename}', '4', '{$new_code}', '{$filepath}')";
    $result = mysql_query($sql);
    if ($result) {
        echo "1";
<?php

define('CURSCRIPT', 'forumdisplay');
$dbHostname = "localhost";
$dbUsername = "******";
$dbPassword = "******";
$dbName = "samples";
$dblink = MYSQL_CONNECT($dbHostname, $dbUsername, $dbPassword) or die("�������ݿ�ʧ��");
mysql_select_db($dbName) or die("Unable to select database " . $dbName);
/**
 * Include HTML parsing functionality.
 * We depend on the presence of the XML_HTMLSax PEAR package for PHP ({@link http://pear.php.net/package/XML_HTMLSax}).
 * You can probably install this like this:
 *
 * pear install XML_HTMLSax
 *
 */
require_once 'XML/XML_HTMLSax.php';
/**
 * Include RSS feed creation functionality.
 * We depend on the presence of FeedCreator.class.php for PHP ({@link http://www.bitfolge.de/rsscreator-en.html}).
 */
require_once "feedcreator.class.php";
// Connect to the MySQL server
MYSQL_CONNECT($db_host, $db_user, $db_pw);
MYSQL_SELECT_DB($db) or die("Unable to select database");
//Select previously indexed URLs from the cache table, and put them into an array $oneurl
$query = "select url from {$db_table}";
$result = MYSQL_QUERY($query);
$howmanyrecords = MYSQL_NUM_ROWS($result);
$currentrecord = 0;
while ($currentrecord < $howmanyrecords) {
    $url = trim(MYSQL_RESULT($result, $currentrecord, "url"));
    $oneurl[$url] = 1;
    $currentrecord++;
}
date_default_timezone_set('America/Halifax');
/**
 * Handlers for HTML parsing.
 */
Ejemplo n.º 16
0
<?php

/* $hostname = "mysql1.petasoft.com.br";
   $dbname = "petasoft1";
   $username = "******";
   $password = "******";*/
$hostname = "localhost";
$dbname = "petasoft1";
$username = "******";
$password = "";
MYSQL_CONNECT($hostname, $username, $password) or die("Nao pode conectar");
@mysql_select_db("{$dbname}") or die("Nao pude selecionar o banco de dados");
Ejemplo n.º 17
0
}
?>
										</tbody>
									</table>
								</div>
								<!--查找所有图片-->
								<!--查找特定图片-->
								<div id="findSomePictable"> <!-- style="display: none;" -->
									<table id="rounded-corner">
										<tbody>
											<?php 
if ($_GET['action'] == "findSomePic") {
    if (isset($_POST['actionForm']) && $_POST['actionForm'] == 'submitted') {
        $searchSelect = $_POST['searchSelect'];
        $value = $_POST['value'];
        $connect = MYSQL_CONNECT("localhost", "root", "root") or die("Unable to connect to MySQL server");
        mysql_select_db("videoMonitor") or die("Unable to select database");
        $sql = "SELECT * FROM picture_info where " . $searchSelect . "='" . $value . "'";
        $result = mysql_query($sql) or die("Can't Perform Query");
        $count = 0;
        while ($row = mysql_fetch_object($result)) {
            if ($count % 4 == 0) {
                echo "<tr>";
            }
            echo "<td>";
            echo "<img src=\"getdata.php?id=" . $row->id . "\"><br>";
            echo "<p>图片名:" . $row->picName . "</p>";
            echo "<p>摄像头地址:" . $row->cameraUrl . "</p>";
            echo "<p>出现时间:" . $row->appTime . "</p>";
            echo "</td>";
            if ($count % 4 == 3) {
Ejemplo n.º 18
0
<!-- comments -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


<?php 
//     $redirect= "https://www3883.ssldomain.com/DomainID190799/".$_SERVER['REQUEST_URI'];
//     header("Location:$redirect");
$updatesub_key = "qwertyui";
//$_POST["updatesub_key"];
$subscriptionID = "5821588";
//$_POST["subscriptionID"];
$hostname = "MySQLB2.webcontrolcenter.com";
$dbName = "sptm";
$username = "******";
$password = "******";
MYSQL_CONNECT($hostname, $username, $password) or die("DB connection unavailable now");
mysql_select_db("{$dbName}") or die("Unable to select database");
// Fetch the current value of cartID from the subscriptionID received
$result = mysql_query("SELECT invoiceNumber, ARB_successfulPayments FROM cartARB WHERE response_subscriptionID = '{$subscriptionID}' AND updatesub_key = '{$updatesub_key}'") or die('Query failed: ' . mysql_error() . '<br><br># Internal Error 03');
$row = mysql_fetch_assoc($result);
print_r($row);
//If user directly came to this page, the invoice no. and/or the amount would be missing. In which case, redirect them to semiprecious.com
/*
if (!$amount || !$invoiceNumber)
	{
		header ("location: http://www.semiprecious.com/confirmation.cfm"); 
	}
*/
/*	
	function displayCountryOptions() {
		
Ejemplo n.º 19
0
<?php 
//var_dump($_GET);
if (!isset($_GET['startp'])) {
    $_GET['startp'] = "";
    $_GET['startp'] = 0;
}
if (!isset($_GET['lpp'])) {
    $_GET['lpp'] = 50;
}
$lpp = 50;
if (!isset($_GET['userlog'])) {
    $_GET['userlog'] = "";
}
include 'config.inc.php';
MYSQL_CONNECT("{$sql_server}", "{$sql_user}", "{$sql_pw}");
MYSQL_SELECT_DB("{$sql_db}");
$sql = "";
if (!empty($_GET['userlog'])) {
    $sql = "SELECT * \n\tFROM ftp_transfer \n\tWHERE username = '******'userlog'] . "' \n\tORDER BY lokale_zeit DESC limit " . $_GET['startp'] . ",{$lpp}";
} else {
    $sql = "SELECT * \n\tFROM ftp_transfer \n\tORDER BY lokale_zeit DESC limit " . $_GET['startp'] . ",{$lpp}";
}
$result = MYSQL_QUERY($sql);
$line = 0;
while ($row = mysql_fetch_array($result)) {
    if ($line == 0) {
        echo "<TR class=\"blau\">\n";
    } else {
        echo "<TR>\n";
    }
Ejemplo n.º 20
0
/*
Original PHP script by Florian Dittmer <*****@*****.**>
Example php script to demonstrate the direct passing of binary data
to the user. More infos at http://www.phpbuilder.com
Syntax: gettn.phtml?id=<id>

$Id$

Modified for mbot NewsHandler by Christophe Truffier <*****@*****.**>
This script show thumbnail.
*/

if($id) {

    // you may have to modify login information for your database server:
    require($_SERVER["DOCUMENT_ROOT"].'/SQL.inc');
    MYSQL_CONNECT($serveur_SQL, $user, $user_pass);
    mysql_select_db("db");

    $query = "select tnimg_data,filetype from photo_test where id=$id";
    $result = @MYSQL_QUERY($query);

    $data = @MYSQL_RESULT($result,0,"tnimg_data");
    $type = @MYSQL_RESULT($result,0,"filetype");

    Header( "Content-type: $type");
    echo $data;

};
?>
Ejemplo n.º 21
0
$thispayment_amount_2 = "120.00";
$thispayment_amount_3 = "480.00";
$thispayment_amount_4 = "720.00";
$thispayment_currency = "USD";
// Validate transaction details against subscription request
if ($txn_type == $thistxn_type && $payment_status == $thispayment_status && ($payment_amount == $thispayment_amount_1 && $item_name == $thisitem_name_1 || $payment_amount == $thispayment_amount_2 && $item_name == $thisitem_name_2 || $payment_amount == $thispayment_amount_3 && $item_name == $thisitem_name_3 || $payment_amount == $thispayment_amount_4 && $item_name == $thisitem_name_4) && $payment_currency == $thispayment_currency && $receiver_email == $thisreceiver_email) {
    // Pass
    if ($debug) {
        $debugString .= "\n 1.0 transaction details validated";
    }
    // Connect to Subscriptions database
    $dbMainHost = "db147b.pair.com";
    $dbMainUser = "******";
    $dbMainPass = "******";
    $dbMainDbse = "reinfurt_servinglibrarysubscriptions";
    $dbConnect = MYSQL_CONNECT($dbMainHost, $dbMainUser, $dbMainPass);
    MYSQL_SELECT_DB($dbMainDbse, $dbConnect);
    // Check that txn_id has not been previously processed
    // if duplicate, then exit()
    $sql = "SELECT id, notes FROM objects WHERE notes={$txn_id}";
    $result = MYSQL_QUERY($sql);
    if ($result) {
        if ($debug) {
            $debugString .= "\n 1.1 txn_id {$txn_id} already exists -- exiting";
        }
        if ($debug) {
            mail($IPNemail, 'debug write', $debugString, $IPNemail);
        }
        exit("This txn_id already exists");
    }
    // Pre-process variables
Ejemplo n.º 22
0
/*	workaround so no need to include whole forum-class	*/
class parser
{
    function parse_message($text, $settings = array())
    {
        return $text;
    }
}
$parser = new parser();
/*	END	*/
preg_match('/^([a-z]+)\\./', $_SERVER['SERVER_NAME'], $subdomain);
if (is_dir($cfg['language_abs'] . '/' . $subdomain[1]) && $subdomain[1] != "") {
    $flolang->language = $subdomain[1];
}
$flolang->load("global");
$db = MYSQL_CONNECT($cfg['dbhost'], $cfg['dbuser'], $cfg['dbpasswd']) or die("No Database connection");
MYSQL_SELECT_DB($cfg['dbname'], $db) or die("No Database connection");
MYSQL_QUERY("SET NAMES 'utf8'");
require_once $cfg['root_abs'] . "/functions.php";
define('is_florensia', 1);
require_once $cfg['root_abs'] . "/class_florensia.php";
$florensia = new class_florensia();
$color1 = 255;
$color2 = 255;
$color3 = 255;
$columnname_x = 0;
$columnall_start = 10;
$columnvalue_x = 300;
$picturewidth = 310;
$fontsize = 9;
$steps = 12;
Ejemplo n.º 23
0
<?

//include 'db/database.php';


	MYSQL_CONNECT($hostname, $username, $password) OR DIE("Får ikke kontakt med $dbname"); 
	@mysql_select_db("$dbName") or die("Kan ikke velge database"); 

	// Build and execute SQL query
	$today = date("Ymd");
  $esc_str = mysql_real_escape_string($_POST['streng']);
  $query = "select * from fiksgrafitti where id LIKE '%$esc_str%' ORDER BY id  DESC LIMIT 0,5";
	$result = MYSQL_QUERY($query);
    $number = MYSQL_NUMROWS($result);
	MYSQL_CLOSE();

 // HTML ut
 if ($number == 0)
 {
	  print " <table width=\"100%\" border=0 bgcolor=\"#ffffff\>\n";
	print "<tr>\n";
	print "<td class=\"tittel\" bgcolor=\"#ffffff\>Det er ikke registrert noen saker</td>\n";
	print "</tr>\n";
	 print " </table>\n";
 }
 else
 {
	 $i = 0;
	 WHILE ($i < $number):
	 $id = mysql_result($result,$i,"id");
	 $dato = mysql_result($result,$i,"dato");
Ejemplo n.º 24
0
     $installerrors[] = '管理员密码与确认密码不相同.';
 }
 if (strlen($email) == 0) {
     $installerrors[] = '请输入管理员电子信箱.';
 }
 if (strlen($tableprefix) == 0) {
     $installerrors[] = '请输入数据库表前缀.';
 } else {
     if (!preg_match('/^[A-Za-z0-9]+_$/', $tableprefix)) {
         $installerrors[] = '数据库表前缀只能是英文字母或数字, 而且必需以 _ 结尾.';
     }
 }
 // Determine if MySql is installed
 if (function_exists('mysql_connect')) {
     // attempt to connect to the database
     if ($connection = @MYSQL_CONNECT($servername, $dbusername, $dbpassword)) {
         $sqlversion = @mysql_get_server_info();
         if (empty($sqlversion)) {
             $sqlversion = '5.0';
         }
         mysql_query("set names 'utf8'");
         mysql_query("SET COLLATION_CONNECTION='utf8_general_ci'");
         mysql_query("ALTER DATABASE `{$dbname}` DEFAULT CHARACTER SET utf8 COLLATE 'utf8_general_ci'");
         if ($sqlversion >= '5.0') {
             mysql_query("SET sql_mode=''");
         }
         // connected, now lets select the database
         if ($dbname) {
             if (!@MYSQL_SELECT_DB($dbname, $connection)) {
                 // The database does not exist... try to create it:
                 if (!@DB_Query("CREATE DATABASE {$dbname}")) {
Ejemplo n.º 25
0
$fields = implode(",", $fields);
$sql = "SELECT {$fields} FROM {$DB_TBLName}";
//$DB_TBLName,  $DB_DBName, may also be commented out & passed to the browser
//as parameters in a query string, so that this code may be easily reused for
//any MySQL table or any MySQL database on your server
//DEFINE SQL QUERY:
//edit this to suit your needs
/*
 
Leave the connection info below as it is:
just edit the above.
 
(Editing of code past this point recommended only for advanced users.)
*/
//create MySQL connection
$Connect = @MYSQL_CONNECT($DB_Server, $DB_Username, $DB_Password) or die("Couldn't connect to MySQL:<br>" . MYSQL_ERROR() . "<br>" . MYSQL_ERRNO());
//select database
$Db = @MYSQL_SELECT_DB($DB_DBName, $Connect) or die("Couldn't select database:<br>" . MYSQL_ERROR() . "<br>" . MYSQL_ERRNO());
//execute query
$result = @MYSQL_QUERY($sql, $Connect) or die("Couldn't execute query:<br>" . MYSQL_ERROR() . "<br>" . MYSQL_ERRNO());
//if this parameter is included ($w=1), file returned will be in word format ('.doc')
//if parameter is not included, file returned will be in excel format ('.xls')
if (isset($w) && $w == 1) {
    $file_type = "msword";
    $file_ending = "doc";
} else {
    $file_type = "vnd.ms-excel";
    $file_ending = "xls";
}
//header info for browser: determines file type ('.doc' or '.xls')
HEADER("Content-Type: application/{$file_type}");