* the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
// Try to guess the web path
$web_path_guess = $_REQUEST['web_path'];
if (empty($web_path_guess)) {
    $web_path_guess = get_web_path();
}
$local_username = scrub_out($_REQUEST['db_username']);
if (empty($local_username)) {
    $local_username = scrub_out($_REQUEST['local_username']);
}
$local_pass = scrub_out($_REQUEST['db_password']);
if (empty($local_pass)) {
    $local_pass = scrub_out($_REQUEST['local_pass']);
}
require $prefix . '/templates/install_header.inc.php';
?>
        <div class="jumbotron">
            <h1><?php 
echo T_('Install progress');
?>
Example #2
0
<?php

ob_start();
require_once "includes/session.php";
require_once "includes/connection.php";
require_once "includes/functions.php";
confirm_logged_in();
// Selecting the Relevant profile Details for Profile ID selected
$profileid = $_REQUEST['profileid'];
$query = "SELECT userId, firstname, lastname, userPic\n\t      FROM users\n\t      WHERE userId ={$profileid}";
$result_set = mysqli_query($connection, $query);
while ($profile_data = mysqli_fetch_assoc($result_set)) {
    $profile_first_name = $profile_data['firstname'];
    $profile_last_name = $profile_data['lastname'];
    $profile_status_pic = get_web_path($profile_data['userPic']);
    $profile_fullname = $profile_first_name . " " . $profile_last_name;
}
?>
  
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Teambook Home Page</title>
<link href="mainstyles.css" rel="stylesheet" type="text/css" />
<style>
.focusfield {
    background-color: #ADD7ED;
    border: solid 2px blue;
}
</style>
<script src="myprofile/Scripts/_js/jquery-1.7.2.min.js"></script>
Example #3
0
require_once '../scripts/database_connection.php';
// Get the user ID of the user to show
$user_id = $_REQUEST['user_id'];
// Build the SELECT statement
$select_query = "SELECT * FROM users WHERE user_id = " . $user_id;
// Run the query
$result = mysql_query($select_query);
if ($result) {
    $row = mysql_fetch_array($result);
    $first_name = $row['first_name'];
    $last_name = $row['last_name'];
    $bio = preg_replace("/[\r\n]+/", "</p><p>", $row['bio']);
    $email = $row['email'];
    $facebook_url = $row['facebook_url'];
    $twitter_handle = $row['twitter_handle'];
    $user_image = get_web_path($row['user_pic_path']);
    // Turn $twitter_handle into a URL
    $twitter_url = "http://www.twitter.com/" . substr($twitter_handle, $position + 1);
} else {
    handle_error("There was a problem finding your " . "information in our system.", "Error locating user with ID {$user_id}");
}
?>
                                  

<html>
 <head>
  <link href="../../css/phpMM.css" rel="stylesheet" type="text/css" />
 </head>

 <body>
  <div id="header"><h1>PHP & MySQL: The Missing Manual</h1></div>
Example #4
0
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
// Use output buffering, this gains us a few things and
// fixes some CSS issues
ob_start();
$ampache_path = dirname(__FILE__);
$prefix = realpath($ampache_path . "/../");
require_once $prefix . '/lib/init-tiny.php';
// Explicitly load and enable the custom session handler.
// Relying on autoload may not always load it before sessiony things are done.
require_once $prefix . '/lib/class/session.class.php';
Session::_auto_init();
// Set up for redirection on important error cases
$path = get_web_path();
if (isset($_SERVER['HTTP_HOST'])) {
    $path = $http_type . $_SERVER['HTTP_HOST'] . $path;
}
// Check to make sure the config file exists. If it doesn't then go ahead and
// send them over to the install script.
$results = array();
if (!file_exists($configfile)) {
    $link = $path . '/install.php';
} else {
    // Make sure the config file is set up and parsable
    $results = @parse_ini_file($configfile);
    if (!count($results)) {
        $link = $path . '/test.php?action=config';
    }
}
Example #5
0
        $lang = 'en_US';
    }
    if (strpos($lang, '.')) {
        $langtmp = explode('.', $lang);
        $htmllang = $langtmp[0];
        $charset = $langtmp[1];
    } else {
        $htmllang = $lang;
    }
}
AmpConfig::set('lang', $htmllang, true);
AmpConfig::set('site_charset', $charset ?: 'UTF-8', true);
load_gettext();
header('Content-Type: text/html; charset=' . AmpConfig::get('site_charset'));
// Correct potential \ or / in the dirname
$safe_dirname = get_web_path();
$web_path = $http_type . $_SERVER['HTTP_HOST'] . $safe_dirname;
unset($safe_dirname);
switch ($_REQUEST['action']) {
    case 'create_db':
        $new_user = '';
        $new_pass = '';
        if ($_POST['db_user'] == 'create_db_user') {
            $new_user = $_POST['db_username'];
            $new_pass = $_POST['db_password'];
            if (!strlen($new_user) || !strlen($new_pass)) {
                AmpError::add('general', T_('Error: Ampache SQL Username or Password missing'));
                require_once 'templates/show_install.inc.php';
                break;
            }
        }
Example #6
0
<div id="wrapper">
  <div id="mainContent">
      <div id="sidebar">
<?php 
include "includes/sidebar.php";
?>
       
    <!-- end #sidebar --></div>
  <div id="mainContRight">
            <h2>My Friends</h2>
            <div id="friendsdisplay">
                <?php 
while ($friend_data = mysqli_fetch_assoc($result_set)) {
    $friendid = $friend_data['userId'];
    $friend_first_name = $friend_data['firstname'];
    $friend_last_name = $friend_data['lastname'];
    $friend_status_pic = get_web_path($friend_data['userPic']);
    $friend_fullname = $friend_first_name . " " . $friend_last_name;
    $output = "<div class=\"friendbox\">\n\t\t\t\t\t<div class=\"statusprofpic\">\n\t\t\t\t\t<img class=\"statusimg\" src=\"{$friend_status_pic}\" width=\"50\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"statustext\">\n\t\t\t\t\t<a href=\"profile.php?profileid={$friendid}\"><p class=\"bold\">{$friend_fullname}</p></a>\n\t\t\t\t\t</div>\n\t\t\t\t\t</div>";
    echo $output;
}
?>
                 <br class="clearfloat" />
            <!-- end #friendsdisplay --></div>   
 <br class="clearfloat" />
    <!-- end #mainContLeft --></div>
<!-- end #mainContent --></div>
    <br class="clearfloat" />
<?php 
include "includes/footer.php";
ob_flush();