Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $server ="localhost";
- $user = "root";
- $password = "";
- $blogdb = 'woofwarr_blog';
- $usersdb = 'woofwarr_users';
- $gallerydb = 'woofwarr_gallery';
- $pettdb = 'woofwarr_pett';
- //connect to server and select database; you may need it
- $link = mysqli_connect($server, $user, $password, $gallerydb);
- mysqli_set_charset($link, 'utf8mb4');
- if (mysqli_connect_errno()) {
- //printf("Connect failed: %sn", mysqli_connect_error());
- //exit();
- }
- mysqli_select_db($link, $blogdb);
- mysqli_query($link, "CREATE TABLE IF NOT EXISTS `forum_posts` (`post_id` int(50) NOT NULL AUTO_INCREMENT, `post_text` text NOT NULL,`post_create_time` int(10) NOT NULL,`post_owner` varchar(50) NOT NULL,`post_title` varchar(50) NOT NULL,`post_image` varchar(50) NOT NULL, PRIMARY KEY (`post_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
- mysqli_query($link, "CREATE TABLE IF NOT EXISTS `comments` ( `comment_id` int(100) NOT NULL AUTO_INCREMENT, `post_id` int(50) NOT NULL, `user_id` int(50) NOT NULL, `comment` text NOT NULL, `comment_date` int(10) NOT NULL, PRIMARY KEY(`comment_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
- ?>
- <?php
- //path to users dir
- $domain = 'http://localhost:63342/WW/';
- $gallery_dir = $domain.'gallery/';
- $blog_dir = $domain.'woof/';
- $users_dir = $domain.'users/';
- $users_dir_view = $domain.'users/view.php';
- $users_pic_dir = $domain.'users/profile_pic';
- ?>
- <?php
- session_start();
- ?>
- <!DOCTYPE html>
- <html>
- <?php
- $protocol = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://';
- $full_url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . $_SERVER['QUERY_STRING'];
- ///Constructing breadcrumb
- $p = trim($_SERVER['REQUEST_URI'], '/');
- $ps = explode('/', $p);
- $urp = '';
- $bread_crumb_items = '{
- "@type": "ListItem",
- "position": 1,
- "item": {
- "@id": "https://neurobin.org",
- "name": "Neurobin"
- }
- },';
- for ($i = 0; $i < count($ps); $i++) {
- $psc = trim($ps[$i]);
- if ($psc == '') {
- continue;
- }
- $bc_name = $psc;
- $bc_name = ucfirst($bc_name);
- $bc_name = preg_replace('/[-]/', ' ', $bc_name);
- $urp = trim($urp, '/') . '/' . $psc . '/';
- if ($i == count($ps) - 1) {
- $urp = rtrim($urp, '/');
- }
- $bread_crumb_items .= '{
- "@type": "ListItem",
- "position": ' . ($i + 2) . ',
- "item": {
- "@type": "WebPage",
- "url": "' . $protocol . trim($_SERVER['HTTP_HOST'], '/') . '/' . ltrim($urp, '/') . '",
- "name": "' . $bc_name . '"forum_posts__20160814_083029
- }
- },';
- }
- //remove last comma from $bread_crumb_items
- $bread_crumb_items = rtrim($bread_crumb_items, ',');
- if ($bread_crumb_items != '') {
- $bread_crumb = '
- "breadcrumb": {
- "@type": "BreadcrumbList",
- "itemListElement": [' . $bread_crumb_items . ']
- }';
- } else {
- $bread_crumb = '';
- }
- $webpage = '
- "@type":"WebPage",
- "@id":"' . $full_url . '"
- ';
- if ($bread_crumb != '') {
- $webpage .= ',' . $bread_crumb;
- }
- include_once("mysql.php");
- include_once("config.php");
- //include_once("analyticstracking.php");
- $servername = "localhost";
- $username = "root";
- $password = "";
- $table = "woofwarr_users";
- $link = mysqli_connect($servername, $username, $password, $table);
- mysqli_set_charset($link, 'utf8mb4');
- if (!$link) {
- die("Connection failed: " . mysqli_connect_error());
- }
- $servername = "localhost";
- $username = "root";
- $password = "";
- $table = "woofwarr_blog";
- $conn = mysqli_connect($servername, $username, $password, $table);
- mysqli_set_charset($conn, 'utf8mb4');
- Warning: mysqli_connect(): (HY000/2002): No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/WW/mysql.php on line 13
- Warning: mysqli_set_charset() expects parameter 1 to be mysqli, boolean given in /Applications/XAMPP/xamppfiles/htdocs/WW/mysql.php on line 15
- Warning: mysqli_select_db() expects parameter 1 to be mysqli, boolean given in /Applications/XAMPP/xamppfiles/htdocs/WW/mysql.php on line 22
- Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /Applications/XAMPP/xamppfiles/htdocs/WW/mysql.php on line 24
- Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /Applications/XAMPP/xamppfiles/htdocs/WW/mysql.php on line 25
- Warning: mysqli_connect(): (HY000/2002): No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/WW/index-carousel3.php on line 107
- Warning: mysqli_set_charset() expects parameter 1 to be mysqli, boolean given in /Applications/XAMPP/xamppfiles/htdocs/WW/index-carousel3.php on line 108
- Connection failed: No such file or directory
Add Comment
Please, Sign In to add comment