0byt3m1n1
Path:
/
home1
/
aserty
/
public_html
/
bymal.com
/
campperf
/
[
Home
]
File: conn.php
<?php ############################################################################## ## CONFIGURATION SECTION ## ## ## ## Enter your database name, database user and database pass info ## on the lines below $dbname = 'aserty_d11e9ec'; $dbuser = 'aserty_d11e9ec'; $dbpass = 'Av$7ed|Nar+V'; $dbhost = 'localhost'; ## Enter your ePN username (email address) and password in the two lines below: $username = "mst.p@videotron.ca"; $password = "1qwerty7"; ## By default, this script collects the ePN report from 3 days ago, to give ePN ## time to post the report and any corrections. You can change that by changing ## the 3 below to some other number. DO NOT ENTER a 0 (ZERO) or 1. If you do, ## the script will attempt to collect today's report, but ePN's campaign reports ## don't post until late the next day, sometimes very late in the day. To be on ## the safe side and ensure that your reports contain the data they are supposed ## to, we recommend leaving this at its default setting of 3. But keep in mind ## that your reports will always be 3 days behind your current earnings. $dayspast = 3; ## Name of the database table that we will use. You can change this if you ## want, but unless you already have table in your db with the same name, ## there should be no need to change it. $tablename = 'campaigndata'; ## END CONFIGURATION ## ## ## ## DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING ## ################################################################################# if ( !isset($_SESSION) ) { session_start(); } ob_start(); // Start output buffering and initialize a session set_time_limit(0); if ( !isset($dbname) || !isset($dbuser) || !isset($dbpass) || !isset($dbhost) || !isset($dayspast) || !isset($username) || !isset($password) || !isset($tablename) || $dbname == '' || $dbuser == '' || $dbpass == '' || $dbhost == '' || $dayspast == '' || $username == '' || $password == '' || $tablename == '' ) { echo '<link href="styles.css" rel="stylesheet" type="text/css">'; include 'header.php'; echo '<p>You <b>MUST</b> enter the required configuration information in the conn.php file. You should <b>read the <a href="README.html">README</a></b> file, too.</p>'; include 'footer.php'; exit; } if ( $dayspast < 2 ) { echo '<link href="styles.css" rel="stylesheet" type="text/css">'; include 'header.php'; echo 'Don\'t be stupid. We explained why you should not set the data collection date to less than 3.'; include 'footer.php'; exit; } DEFINE ('DB_NAME', $dbname); //database name DEFINE ('DB_USER', $dbuser); //database user DEFINE ('DB_PASSWORD', $dbpass); //database password DEFINE ('DB_HOST', $dbhost); //database host if ($db = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD)) { // Make the connnection. if (!mysql_select_db (DB_NAME)) { // If it can't select the database. // Send error to php error handler die("MySQL error: " . mysql_error()); } // End of mysql_select_db IF. } else { // If it couldn't connect to MySQL. die("MySQL error: " . mysql_error()); } // End of $dbc IF. mysql_query("SET NAMES 'utf8'"); // Function for escaping and trimming form data. function escape_data($data) { global $db; if (ini_get('magic_quotes_gpc')) { $data = stripslashes($data); } return mysql_real_escape_string (trim($data), $db); } // End of escape_data() function. function makeitbold($text,$symbol='$') { if ( $symbol == '$' ) { $text = $symbol.$text; } elseif ( $symbol == '%') { $text = $text.$symbol; } $text = '<b>'.$text.'</b>'; return $text; } $orderbyarray = array( 'CampaignName', 'Impressions', 'Clicks', 'CRU', 'ACRU', 'ACRUEarnings', 'Bids', 'WinningBids', 'WinningBidEBayRev', 'TotalEarnings', 'EPC', 'CampaignID' ); // echo $_SERVER['DOCUMENT_ROOT']; // exit; ?>