示例#1
0
 public function index()
 {
     if (is_loggedin() == TRUE) {
         redirect('admin/members/view_all_main');
     }
     $this->form_validation->set_rules('username', 'Username', 'trim|required');
     $this->form_validation->set_rules('password', 'Password', 'trim|required');
     if ($this->form_validation->run() == FALSE) {
         $this->load->view('admin/login');
     } else {
         $username = $this->input->post('username');
         $password = $this->input->post('password');
         $fetch_data = $this->admin_m->get(array('uname' => $username));
         if (!empty($fetch_data)) {
             $decode_password = $this->encrypt->decode($fetch_data['pass']);
             if ($decode_password == $password) {
                 $array_session = array('id' => $fetch_data['id'], 'username' => $fetch_data['uname'], 'loggedin' => TRUE);
                 $this->session->set_userdata($array_session);
                 $this->session->set_flashdata('success', 'Successfull Login.');
                 redirect('admin/members/view_all_main');
             } else {
                 $this->session->set_flashdata('error', 'Username or Password incorrect.Please try again.');
                 redirect('admin');
             }
         } else {
             $this->session->set_flashdata('error', 'Username or Password incorrect.Please try again.');
             redirect('admin');
         }
     }
 }
示例#2
0
文件: profile.php 项目: ageo80/test
 public function __construct()
 {
     parent::__construct();
     is_installed();
     #defined in auth helper
     $this->output->enable_profiler($this->config->item('debug_site'));
     $this->PER_PAGE = get_per_page_value();
     #defined in auth helper
     $this->active_theme = get_active_theme();
     if (!is_loggedin()) {
         redirect(site_url(''));
     }
     //$this->load->model('show_model');
     $this->load->model('profile_model');
     $this->load->model('user/user_model');
     $this->load->library('encrypt');
     $this->load->helper('text');
     if (isset($_POST['view_orderby'])) {
         $this->session->set_userdata('view_orderby', $this->input->post('view_orderby'));
     }
     if (isset($_POST['view_ordertype'])) {
         $this->session->set_userdata('view_ordertype', $this->input->post('view_ordertype'));
     }
     $system_currency_type = get_settings('site_settings', 'system_currency_type', 0);
     if ($system_currency_type == 0) {
         $system_currency = get_currency_icon(get_settings('site_settings', 'system_currency', 'USD'));
     } else {
         $system_currency = get_settings('site_settings', 'system_currency', 'USD');
     }
     $this->session->set_userdata('system_currency', $system_currency);
     $this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
 }
示例#3
0
 public function __construct()
 {
     parent::__construct();
     $exceptional_url = array('admin', 'admin/logout', 'admin/forgot_password', 'admin/change', 'admin/reset_password');
     if (in_array(uri_string(), $exceptional_url) == FALSE && is_loggedin() == FALSE) {
         // redirect('admin');
     }
 }
示例#4
0
function member_id()
{
    $CI =& get_instance();
    if (is_loggedin()) {
        return (int) $CI->session->userdata('member_id');
    }
    // Failsafe, shouldn't happen.
    error('ERROR! Requested member_id but no member is signed in.');
    redirect();
}
示例#5
0
 public function index()
 {
     // Force login
     if (!is_loggedin()) {
         redirect('auth/login');
     }
     // Redirect to member overview for now...
     redirect('members');
     $head = array('title' => 'Internal');
     $this->load->view('header', $head);
     $this->load->view('internal/index');
     $this->load->view('footer');
 }
示例#6
0
 public function index()
 {
     $remember_me = get_cookie('Remember_me');
     /* 	If Remember_key Cookie exists in browser then it wil fetch data using it's value and 
     			set sessin data and force login User/Admin  */
     if (isset($remember_me)) {
         $remember_me_decode = $this->encrypt->decode($remember_me);
         $rem_data = select('admin', FALSE, array('where' => array('id' => $remember_me_decode)), array('single' => TRUE));
         $array_session = array('id' => $rem_data['id'], 'username' => $rem_data['username'], 'loggedin' => TRUE);
         $this->session->set_userdata($array_session);
     }
     /* is_logginin() in cms_helper.php It will Check Admin is loggen or not. */
     if (is_loggedin() == TRUE) {
         redirect('admin/dashboard');
     }
     $this->form_validation->set_rules('username', 'Username', 'trim|required');
     $this->form_validation->set_rules('password', 'Password', 'trim|required');
     if ($this->form_validation->run() == FALSE) {
         $this->load->view('admin/login/index');
     } else {
         $username = $this->input->post('username');
         $password = $this->input->post('password');
         $data = array('username' => $username);
         $fetch_data = select('admin', FALSE, array('where' => $data), array('single' => TRUE));
         if (!empty($fetch_data)) {
             $db_pass = $this->encrypt->decode($fetch_data['password']);
             if ($db_pass == $password) {
                 /* If remember Me Checkbox is clicked */
                 /* Set Cookie IF Start */
                 if (isset($_POST['remember_me'])) {
                     $cookie = array('name' => 'Remember_me', 'value' => $this->encrypt->encode($fetch_data['id']), 'expire' => '172800');
                     $this->input->set_cookie($cookie);
                 }
                 /* Set Cookie IF END */
                 $array_session = array('id' => $fetch_data['id'], 'username' => $fetch_data['username'], 'loggedin' => TRUE);
                 $this->session->set_userdata($array_session);
                 $this->session->set_flashdata('success', 'Successfull Login.');
                 redirect(base_url() . 'admin/dashboard');
             } else {
                 $this->session->set_flashdata('error', 'Invalid Username and Password.');
                 redirect('admin');
             }
         } else {
             $this->session->set_flashdata('error', 'Invalid Username and Password.');
             redirect('admin');
         }
     }
 }
 public function __construct()
 {
     parent::__construct();
     is_installed();
     #defined in auth helper
     if (!is_loggedin()) {
         if (count($_POST) <= 0) {
             $this->session->set_userdata('req_url', current_url());
         }
         redirect(site_url('account/trylogin'));
     }
     $this->per_page = get_per_page_value();
     $this->load->database();
     $this->active_theme = get_active_theme();
     $this->load->model('user/post_model');
     $this->form_validation->set_error_delimiters('<div class="alert alert-danger form-error">', '</div>');
 }
示例#8
0
 public function __construct()
 {
     parent::__construct();
     is_installed();
     #defined in auth helper
     checksavedlogin();
     #defined in auth helper
     if (!is_loggedin()) {
         if (count($_POST) <= 0) {
             $this->session->set_userdata('req_url', current_url());
         }
         redirect(site_url('admin/auth'));
     }
     $this->load->model('media_model');
     $this->load->library('form_validation');
     $this->form_validation->set_error_delimiters('<div class="alert alert-error input-xxlarge"">', '</div>');
 }
示例#9
0
 public function __construct()
 {
     parent::__construct();
     is_installed();
     #defined in auth helper
     checksavedlogin();
     #defined in auth helper
     if (!is_loggedin()) {
         if (count($_POST) <= 0) {
             $this->session->set_userdata('req_url', current_url());
         }
         redirect(site_url('admin/auth'));
     }
     $this->per_page = get_per_page_value();
     #defined in auth helper
     $this->load->model('users_model');
     $this->form_validation->set_error_delimiters('<div class="alert alert-danger">', '</div>');
 }
示例#10
0
 public function login($data, $session = true)
 {
     // Check if e-mail exists.
     $member = $this->get_member('email', $data['email']);
     if (!$member) {
         // Log unsuccessful logins for sessions.
         if ($session) {
             $this->db->insert('logins', array('ip_address' => ip_address(), 'timestamp' => time()));
         }
         // That's a negative
         return false;
     }
     // If we're going to set a session, check that member is an admin or boardmember
     if ($session && !$this->is_boardmember($member->id) && !$this->is_admin($member->id)) {
         return false;
     }
     // Load password library
     $this->load->library('Pass');
     // Verify password
     $result = $this->pass->verify($data['password'], $member->password);
     if (!$result) {
         // Log unsuccessful login to database
         $this->db->insert('logins', array('member_id' => $member->id, 'ip_address' => ip_address(), 'timestamp' => time()));
         return false;
     }
     // Check if wanna start a session or not
     if ($session) {
         // Set session
         $userdata = array('member_id' => $member->id, 'email' => $data['email'], 'logged_in' => true);
         if (!empty($data['remember'])) {
             $userdata['remember_me'] = true;
         }
         $this->session->set_userdata($userdata);
         // Log successful login in database
         $this->db->insert('logins', array('member_id' => $member->id, 'ip_address' => ip_address(), 'timestamp' => time(), 'valid' => 1));
         // Failsafe
         return is_loggedin();
     } else {
         // No session, but return true
         return true;
     }
     return false;
 }
示例#11
0
文件: user_core.php 项目: ageo80/test
 public function __construct()
 {
     parent::__construct();
     is_installed();
     #defined in auth helper
     if (!is_loggedin()) {
         if (count($_POST) <= 0) {
             $this->session->set_userdata('req_url', current_url());
         }
         redirect(site_url('account/trylogin'));
     }
     //$this->per_page = get_per_page_value();
     $this->load->database();
     $this->active_theme = get_active_theme();
     $this->load->model('user_model');
     $this->load->model('show/post_model');
     $this->load->helper('dbcvote');
     $this->form_validation->set_error_delimiters('<label class="col-lg-2 control-label">&nbsp;</label><div class="col-lg-8"><div class="alert alert-danger" style="margin-bottom:0;">', '</div></div>');
     //$this->output->enable_profiler(TRUE);
 }
示例#12
0
<?php

/**
 * Load Config
 *
 * Load the config early so we can
 * use it below.
 */
$_ce_config = plugin_load_config('cms-editor');
/**
 * Initiate the Editor
 * This only happens if the current
 * user is logged in.
 */
if (is_loggedin() && in_array($path, $_ce_config['pages'])) {
    # Stylesheets
    $_config['stylesheets'] = array_merge($_config['stylesheets'], $_ce_config['assets']['stylesheets']);
    # Javascript
    $_config['scripts'] = array_merge($_config['scripts'], $_ce_config['assets']['scripts']);
}
    $i = 1;
    $sql = 'SELECT songs.SongID, songs.SongName, artist.ArtistName, album.AlbumName, songs.Link, album.Cover 
            FROM songs 
            INNER JOIN album 
            ON album.AlbumID = songs.AlbumID 
            INNER JOIN artist
            ON artist.ArtistID = songs.ArtistID
            INNER JOIN mood 
            ON mood.MoodID = songs.MoodID 
            WHERE mood.Mood = "' . $moodinput . '"';
    $result = mysql_query($sql);
    if (mysql_num_rows($result) > 0) {
        // output data of each row
        while ($row = mysql_fetch_assoc($result)) {
            echo "<div class='music' class='animated fadeIn'>";
            echo "<div class='song-details'>";
            echo "<div class='cover'><img src='" . $row["Cover"] . "' alt='cover'><span class='overlay'></span></div>";
            echo "<h4>" . $row["ArtistName"] . "</h4> <h5> " . $row["AlbumName"] . " </h5> <h3> " . $row["SongName"] . "</h3>";
            $song_id = $row["SongID"];
            if (is_loggedin() && usersong_exists($user_id, $song_id) === false) {
                echo "<a name='song' class='alink" . $i . "' onclick='add(" . $song_id . ", " . $i . ");'>Add this to your playlist</a>";
            }
            $like = like_percentage($song_id);
            echo "<div id='" . $i . "link' class='link'>" . $row["Link"] . "</div>";
            echo "<div class='like-bar'><div class='like' style='width:" . $like . "%'></div></div>";
            echo "</div></div>";
            $i++;
            //use this variable to give each div a separate id
        }
    }
}
示例#14
0
{
    # Get Variables Object
    global $_variables;
    # Get Variable
    if (!is_null($name)) {
        return $_variables->get($name);
    }
    # Get All Variables
    return $_variables->get();
}
/**
 * Get Variables
 *
 * @since 1.0.0
 */
function vars()
{
    return get();
}
# Debug helpers
set('dev', array('localhost' => is_localhost()));
# Page variables
set('page', array('is_home' => is_home(), 'path' => $_path, 'slug' => get_page()), true);
# User variables
set('user', array('is_loggedin' => is_loggedin()));
# Various useful variables
set('this_year', this_year());
# Trigger: variables_init
if (extras_enabled()) {
    do_trigger('variables_init');
}
示例#15
0
<?php

# Check user & validate data
switch (true) {
    # Not logged in
    case is_loggedin():
        JSON::parse(100, 'negative', '<i class="fa fa-exclamation-triangle"></i> You\'re already logged in!', null, true);
        break;
        # No post data
    # No post data
    case !is_form_data():
        JSON::parse(100, 'negative', '<i class="fa fa-exclamation-triangle"></i> There was a problem logging you in. (Error: No data received)', null, true);
        break;
}
# Create User Object
$_ce_user = new CMSEditor\User($_ce_config);
# New GUMP Object
$form = new GUMP();
# Get Input
$data = form_data();
# Validate Input
$form->validate($data, array('username' => 'required', 'password' => 'required'));
# Run GUMP
$response = $form->run($data);
# Get Response
if ($response === false) {
    JSON::parse(100, 'negative', $form->get_readable_errors(true));
} else {
    # Attempt login
    $_ce_user->login($data['username'], $data['password']);
}
示例#16
0
/**
 * Get all of the plugins the currently logged in user can access
 *
 * @param $selectFromPendingPool If returned plugins can include plugins from the pending pool
 * @return array Plugin
 */
function get_accessible_plugins($selectFromPendingPool = true)
{
    global $_SESSION, $master_db_handle;
    // The plugins we can access
    $plugins = array();
    // Make sure they are plugged in
    if (!is_loggedin()) {
        return $plugins;
    }
    // Query for all of the plugins
    $statement = $master_db_handle->prepare('SELECT Plugin, ID, Name, Parent, Plugin.Author, Hidden, GlobalHits, Created, Pending, Rank, LastRank, LastRankChange, LastUpdated, ServerCount30 FROM AuthorACL LEFT OUTER JOIN Plugin ON Plugin.ID = Plugin WHERE AuthorACL.Author = ? ORDER BY Name ASC');
    $statement->execute(array($_SESSION['uid']));
    while ($row = $statement->fetch()) {
        if ($selectFromPendingPool == false && $row['Pending'] == 1) {
            continue;
        }
        $plugin = resolvePlugin($row);
        $plugin->setPendingAccess($row['Pending'] == 1);
        $plugins[] = $plugin;
    }
    return $plugins;
}
示例#17
0
文件: index.php 项目: teju/Android
}
?>

			<!-- CENTER CONTENT -->
			<div class="span-24 center-content">
					<?php 
show_msgs();
if (is_loggedin() && is_admin() || is_viewer()) {
    if (file_exists("modules/{$MOD}/{$ENTITY}/controller.php")) {
        include "modules/" . $MOD . "/" . $ENTITY . "/controller.php";
    }
} else {
    if (is_loggedin() && is_supervisor()) {
        include "modules/admin/vehicle/controller.php";
    } else {
        if (is_loggedin() && is_superuser()) {
            include "modules/admin/travel/controller.php";
        } else {
            add_msg('SUCCESS', "Welcome to {$DOMAIN}. Please login to start using your account");
            show_msgs();
        }
    }
}
?>
			</div>
			<!-- END CENTER CONTENT -->

			<!-- FOOTER -->
			<?php 
include "static/html/footer.html";
?>
示例#18
0
    function follow_button($user_id)
    {
        if (is_loggedin()) {
            if (user_session_id() != $user_id) {
                echo '<script src="' . theme_url() . '/assets/js/top_follow.js"></script>
<style type="text/css">

.follow_b
{
    border:#dedede solid 2px;
    background-color:#f5f5f5;
    color:#000;
    font-size:12px;
    font-weight:bold;
    padding: 5px;
    -moz-border-radius: 6px; -webkit-border-radius: 6px; 
}
.youfollowing_b
{
    font-size:14px; color:#006600; font-weight:bold;
}
.remove_b
{
    border:#dedede solid 2px;
    background-color:#f5f5f5;
    color:#CC3333;
    font-size:12px;
    padding-left:4px ;
    padding-right:4px ;
    font-weight:bold;
    margin-left:240px;
    -moz-border-radius: 6px; -webkit-border-radius: 6px; 
}


</style>';
                if (user_follow($user_id) == 1) {
                    echo '	<script>
					$(function() 
					{
						$("#remove"+' . $user_id . ').fadeOut(2000).show();
					});
</script>';
                } else {
                    echo '          <script>
	$(function() 
	{

		$("#follow"+' . $user_id . ').fadeOut(2000).show();
	});
</script>';
                }
                echo '  <div id="follow' . $user_id . '" style="display:none">
<a href="#" class="follow" id="' . $user_id . '">
<span class="follow_b">' . lang_key('Follow') . ' </span></a>
</div>


<div class="youfollowing_b" id="remove' . $user_id . '" style="display:none"> 
' . lang_key('Your Following') . ' <a href="#" class="remove" id="' . $user_id . '">
<span class="remove_b"> ' . lang_key('Unfollow') . ' </span></a>
</div>';
            }
        }
    }
示例#19
0
文件: header.php 项目: ageo80/test
                            <li><a href="sidebar-left.html">Left Sidebar</a></li>

                            <li class="active"><a href="sidebar-right.html">Right Sidebar</a></li>

                        </ul>

                    </li-->

                    <!--li><a href="<?php 
echo site_url('show/contact');
?>
">Contact</a></li-->

                    <?php 
if (!is_loggedin()) {
    ?>

                    <?php 
    if (get_settings('realestate_settings', 'enable_signup', 'Yes') == 'Yes') {
        ?>

                    <li><a class="btn" data-toggle="modal" href="#myModal"><?php 
        echo lang_key('sign_in');
        ?>
</a></li>

                    <li><a class="btn" href="<?php 
        echo site_url('account/signup');
        ?>
"><?php 
示例#20
0
<?php

use Theme\Variables;
/**
 * Variables Object
 */
$variables = new Variables($_config);
# Include Variable Functions
require __DIR__ . '/functions/variables.php';
# Debug helpers
add_var('dev', array('localhost' => is_localhost()));
# Page variables
add_var('page', array('is_home' => is_home(), 'path' => $path, 'slug' => get_page()), true);
# User variables
add_var('user', array('is_loggedin' => is_loggedin()));
# Various useful variables
add_var('this_year', this_year());
示例#21
0
 function login($row)
 {
     $this->session->set_userdata('user_id', $row['id']);
     $this->session->set_userdata('user_name', $row['user_name']);
     $this->session->set_userdata('user_type', $row['user_type']);
     $this->session->set_userdata('user_email', $row['user_email']);
     if ($this->session->userdata('req_url') != '') {
         $req_url = $this->session->userdata('req_url');
         $this->session->set_userdata('req_url', '');
         redirect($req_url);
     } else {
         if ($this->session->userdata('list_property') == '1' && is_loggedin()) {
             $this->session->set_userdata('list_property', '0');
             redirect(site_url('admin/realestate/newestate'));
         } else {
             redirect(base_url());
         }
     }
 }
示例#22
0
$plugin = loadPlugin(urldecode($_GET['plugin']));
// Doesn't exist
if ($plugin === null) {
    $page_title = 'MCStats :: Invalid Plugin';
    $breadcrumbs = '<a href="/" class="current">Invalid Plugin</a>';
    send_header();
    echo '<div class="alert alert-error" style="margin-top: 15px">Invalid plugin name provided!</div>';
    send_footer();
    exit;
}
// Get the plugin name
$pluginName = htmlentities($plugin->getName());
$encodedName = urlencode($pluginName);
// encoded name, for use in signature url
$more = '';
if (is_loggedin() && in_array($plugin, get_accessible_plugins(false))) {
    $more = '<li><a href="/admin/plugin/' . $encodedName . '/view">Edit in Admin Panel</a>';
}
/// Template hook
$page_title = 'MCStats :: ' . $pluginName;
$breadcrumbs = '<a href="/plugin/' . $encodedName . '" class="current">Plugin: ' . $pluginName . ' by ' . htmlentities($plugin->getAuthors()) . '</a>';
$sidebar_more = '
                <li class="submenu active open">
                    <a href="#"><i class="icon icon-star"></i> <span>Plugin: <strong>' . $pluginName . '</strong></span></a>
                    <ul>
                        ' . $more . '
                        <li><a>Added on: <strong>' . date('F d, Y', $plugin->getCreated()) . '</strong></a></li>
                        <li><a>Rank held for: <strong>' . epochToHumanString(time() - $plugin->getLastRankChange(), false) . '</strong></a></li>
                        <li><a>Global starts: <strong>' . number_format($plugin->getGlobalHits()) . '</strong></a></li>
                    </ul>
                </li>
示例#23
0
                MCStats serves over <span style="font-weight:bold; font-size: 20px;">550 requests per second</span> 24 hours a day, 7 days a week
            </p>
            <p style="font-size: 16px;">
                That is over <b><span style="font-size: 20px;">1.5 billion</span> requests per month</b> and over <b><span style="font-size: 20px;">50 million</span> requests each day</b> and it will only continue to rise.
            </p>
            <p>
                Every single server is tracked. To get useful data for plugins, every server needs to be identified and from there
                data is stored such as the plugins the server is using (that support MCStats), the amount of players online,
                and even the Minecraft version the server is on.
            </p>
            <p>
                This is no simple task. It requires a lot of power and it also needs room for growth. Right now the service
                is <b>entirely funded by myself, Hidendra</b>. MCStats has no sponsors or outside funding other than occasional donations.
            </p>';
// appeal to their plugins they have if they are logged in
if (is_loggedin() && ($pluginCount = count($plugins = get_accessible_plugins())) > 0) {
    // shuffle the plugins
    shuffle($plugins);
    // use the first one
    $plugin = $plugins[0];
    echo '
            <p>
                You have ' . $pluginCount . ' plugin' . ($pluginCount > 1 ? 's' : '') . ' that collect' . ($pluginCount > 1 ? '' : 's') . ' data using MCStats.
                Even if you only have one plugin, or a dozen, you have still helped MCStats in a tremendous way by helping
                it rise to where it is today. And I\'m sure this has also been mutual &mdash; this service has helped you
                see live, real world statistics about your plugin that download counters can\'t give you.
            </p>
        </div>
    </div>
</div>
<div class="row-fluid">
示例#24
0
<?php

use Theme\Variables;
/**
 * Variables Object
 */
$variables = new Variables();
# Debug helpers
$variables->add('dev', array('localhost' => is_localhost()));
# Theme
$variables->add('theme', array('supports' => array_key_exists('supports', $theme) ? $theme['supports'] : array()));
# Global Site Variables
$variables->add('site', array('name' => SITE_NAME, 'email' => SITE_EMAIL, 'domain' => SITE_DOMAIN, 'styles' => load_asset($theme_config['styles'], 'css'), 'scripts' => load_asset($theme_config['scripts'], 'js'), 'assets' => assets_dir(), 'ie' => array('min' => 9, 'strict' => false)));
# Page variables
$variables->add('page', array('is_home' => is_home(), 'path' => $path, 'slug' => get_page()), true);
# User variables
$variables->add('user', array('logged_in' => is_loggedin()));
# Various useful variables
$variables->add('this_year', this_year());
/** ----------------------------------- **
 * Default page meta is set here but     *
 * should be overridden in your          *
 * model files. Access the array using   *
 * $_['page']['meta'] from your model.   *
 ** ----------------------------------- **/
# Page meta data
$meta = array($variables->get('page|slug') => array('title' => SITE_NAME, 'description' => 'Description', 'keywords' => 'Keywords', 'canonical' => 'Canonical'));
$variables->extend('page', 'meta', $meta[$variables->get('page|slug')]);
示例#25
0
<?php

# Check user & validate data
switch (true) {
    # Not logged in
    case !is_loggedin():
        JSON::parse(100, 'negative', '<i class="fa fa-exclamation-triangle"></i> Access denied: you\'re not logged in.', null, true);
        break;
        # No post data
    # No post data
    case !is_form_data():
        JSON::parse(100, 'negative', '<i class="fa fa-exclamation-triangle"></i> There was a problem saving your changes. (Error: No data received)', null, true);
        break;
}
# Saved Posts
$saved = 0;
# Unsaved
$unsaved = 0;
# New GUMP Object
$form = new GUMP();
# Get Input
$data = form_data();
# Run GUMP
$response = $form->run($data);
# Get Response
if ($response === false) {
    JSON::parse(100, 'negative', $form->get_readable_errors(true));
} else {
    # Loop through each of the submitted fields and
    # if a an html file exists, then we will update
    # the file with the newly uploaded content.
                    echo "<a name='song' class='alink" . $i . "' onclick='add(" . $song_id . ", " . $i . ");'>Add this to your playlist</a>";
                }
                echo "<div id='" . $i . "link' class='link'>" . $row["Link"] . "</div>";
                echo "<div class='like-bar'><div class='like' style='width:" . $like . "%'></div></div>";
                echo "</div></div>";
                $i++;
                //use this variable to give each div a separate id
            }
        }
    }
}
?>
</section>

<?php 
if (is_loggedin() === true) {
    $user_id = $_SESSION["id"];
    echo "<div class='settings-nav hidenav'>";
    echo "<h5> Hello, " . get_name($user_id) . "!</h5>";
    echo "<p>Username: "******"</p>";
    echo "<h4> SETTINGS </h4>";
    echo "<ul><li><a href='mysql/change.php'> Change password </a>";
    echo "<li><a name='user_id' onclick='delete_username(" . $user_id . ");'> Delete my username </a></ul></div>";
}
?>

<div class='player'>
  <div class='inplayer'>
      <div class='controls'>
        <button class='play ion-ios-play-outline'></button>     
      </div>
<!DOCTYPE html>
<html>
    <head>
        <title>Mijn website - Recept van de krabburger</title>
        <meta charset="utf-8">
        <link rel="stylesheet" type="text/css" href="style.css">
    </head>
    <body>
        <div id="container">
            <h1>Mijn website</h1>
            
            <ul id="nav">
                <li><a href="index.php">Home</a></li>
                <li><a href="secret.php">Recept van de krabburger</a></li>
                <?php 
if (is_loggedin()) {
    // De gebruiker is ingelogd.
    echo '<li><a href="logout.php">Uitloggen</a></li>';
} else {
    // De gebruiker is nog niet ingelogd!
    echo '<li><a href="login.php">Inloggen</a></li> ';
    echo '<li><a href="register.php">Registreren</a></li> ';
}
?>
            </ul>
            
            <p>Het geheime recept voor de krabburger:</p>
            
            <h3>Benodigdheden</h3>
            <ul>
                <li>500 gram rundergehakt;</li>
示例#28
0
文件: index.php 项目: zxrlha/whom
function content($id, $content)
{
    global $d;
    echo is_loggedin() ? "<span title='" . $d['default']['content'] . "' id='" . $id . "' class='editText richText'>" . $content . "</span>" : $content;
}