Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!defined('INCLUDE_CHECK')) die('Denne fil kan ikke blive kørt direkte');
- define('DB_USERNAME', 'nodebook_dk');
- define('DB_PASSWORD', '******');
- define('DB_NAME', 'nodebook_dk_db');
- define('DB_HOST', 'mysql13.unoeuro.com');
- try {
- $iws_db = new PDO("mysql:host=".DB_HOST.";dbname=".DB_NAME."", DB_USERNAME, DB_PASSWORD);
- }
- catch(PDOException $e)
- {
- echo $e->getMessage();
- }
- $mysql_connection = mysql_connect ('mysql13.unoeuro.com', 'nodebook_dk', '******');
- mysql_select_db ('nodebook_dk_db');
- function aktiv($bruger_id) {
- GLOBAL $mysql_connection;
- $premium_query = mysql_query("SELECT aktiv FROM brugere WHERE id = '".$bruger_id."'", $mysql_connection);
- if (mysql_num_rows($premium_query) > 0) {
- $premium = mysql_result($premium_query, 0, 'aktiv');
- if ($premium =='1') return true;
- }
- return false;
- }
- $aktiv = (aktiv($_SESSION['id']));
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement