Location: PHPKode > projects > phpBlogger > userpanel.php
<?php session_start();
/* * ********************************************************************
*  Copyright notice PHP Blogger 1.2.
*
*  (c) 2011 Predrag Rukavina - admin[at]phpblogger[dot]org
*  All rights reserved
*
*  This script is part of the PHP Blogger project. 
*  The PHP Blogger project is free software; you can redistribute it and/or
*  modify it under the terms of the GNU General Public License
*  as published by the Free Software Foundation; either version 2
*  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 General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software
*  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
*  MA  02110-1301, USA.
*
*  This copyright notice MUST appear in all copies of the script!
* ********************************************************************** */
include ('settings.php');
require_once ('languages/lang_english.php');
require_once ('salt.php');
require_once ('classes/securesession.class.php');
$ss = new SecSession();
$ss->check_browser = true;
$ss->check_ip_blocks = 2;
$ss->secure_word = $salt;
$ss->regenerate_id = true;
if (!$ss->Check() || !isset($_SESSION['loggedin']) || !$_SESSION['loggedin']){
	include ('form.php');
	die();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="themes/classic/styles/style.css" />
<link href="themes/<?php echo $themes; ?>/styles/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
<title><?php echo $lang['USERPANEL'] ?></title>
</head>
<body>
<div id="wrapper">
<div class="headers">
<div class="headerin">
<div id="menu">
<li><a href="<?php echo $sitepath; ?>"><img id="logo" src="themes/<?php echo $themes; ?>/styles/images/logo.png" width="215px" height="35px" border="0" title="<?php echo $sitetitle; ?>" alt="<?php echo $sitetitle; ?>" /></a></li>
</div>
<div class="headerinfo">
<li class="float">
&nbsp;<?php echo $lang['LOGEDAS']; ?>&nbsp;<?php echo $_SESSION['INC_USER_NAME']; ?>.&nbsp;<a href="signout.php"><?php echo $lang['LINKOUT'] ?></a>
</li>
<li style="float:right">
</li>
</div>
</div>
</div>
<div id="main">
<?php
$shouter = @$_SESSION['INC_USER_ID'];
$arecordSet = &$conn->Execute('SELECT * FROM users WHERE usid = ? LIMIT 1', array($shouter));
if(!$arecordSet)
	print $conn->ErrorMsg();
else
	while(!$arecordSet->EOF) {
		$kori = $arecordSet->fields['usid'];
		$usercc = $arecordSet->fields['username'];
		$thumbs = $arecordSet->fields['thumbs'];
		$eeuser = $arecordSet->fields['email'];
		$cpriv = $arecordSet->fields['privilege'];
		$cdate = $arecordSet->fields['date'];
		$lastime = $arecordSet->fields['lastime'];
		$cfullname = $arecordSet->fields['fullname'];
		$chomep = $arecordSet->fields['homep'];
		$cbiosi = $arecordSet->fields['biosi'];
		$cthumbs = $arecordSet->fields['thumbs'];
                $newsletter = $arecordSet->fields['newsletter'];
                $notification = $arecordSet->fields['notification'];

                $birthday = $arecordSet->fields['birthday'];
                $gender = $arecordSet->fields['gender'];
                $location = $arecordSet->fields['location'];
		$arecordSet->MoveNext();
	}

    ?>
<div id="panelform">
<div id="paneleft">
<form method="post" action="userset.php"  name="form"  enctype="multipart/form-data">
<h2><?php echo $usercc ?> <?php echo $cfullname ?></h2><br />
<div id="firstform">
<?php echo $lang['LINKFULL']; ?><br />
<input type="text" name="fullname" class="incc" value="<?php echo $cfullname ?>" />
</div>
<div id="firstform">
&nbsp;<?php echo $lang['LINKHOME']; ?><br />
<input type="text" name="homep" class="incc" value="<?php echo $chomep ?>" />
</div>
<div id="firstform">
<?php echo $lang['LINKABOUT']; ?><br />
<input type="text" name="biosi" class="incc" value="<?php echo $cbiosi ?>" />
</div>


<div id="firstform">
<?php echo $lang['MYPERI1']; ?>&nbsp;<?php echo $sitetitle; ?>&nbsp;<?php echo $lang['MYPERI2']; ?><br />
<?php if($newsletter == 1) { ?>
<select class="incc" name="newsletter">
<option value='1'>-- Yes</option>
<option style="background:#ffffff;" value='1'>---<?php echo $lang['LANGYES']; ?></option>
<option style="background:#ffffff;" value='0'>---<?php echo $lang['LANGNO']; ?></option>
</select>
<?php } ?>
<?php if($newsletter == 0) { ?>
<select class="incc" name="newsletter">
<option value='0'>-- No</option>
<option style="background:#ffffff;" value='1'>---<?php echo $lang['LANGYES']; ?></option>
<option style="background:#ffffff;" value='0'>---<?php echo $lang['LANGNO']; ?></option>
</select>
<?php } ?>
</div>



<div id="firstform">
<?php echo $lang['MYNOTE']; ?><br />
<?php if($notification == 1) { ?>
<select class="incc" name="notification">
<option value='1'>-- Yes</option>
<option style="background:#ffffff;" value='1'>----<?php echo $lang['LANGYES']; ?></option>
<option style="background:#ffffff;" value='0'>----<?php echo $lang['LANGNO']; ?></option>
</select>
<?php } ?>
<?php if($notification == 0) { ?>
<select class="incc" name="notification">
<option value='0'>-- No</option>
<option style="background:#ffffff;" value='1'>---<?php echo $lang['LANGYES']; ?></option>
<option style="background:#ffffff;" value='0'>---<?php echo $lang['LANGNO']; ?></option>
</select>
<?php } ?>
</div>

<div id="firstform">
<?php echo $lang['BIRTHDAY']; ?><br />
<input type="text" name="birthday" class="incc" value="<?php echo $birthday ?>" />
</div>




<div id="firstform">
<?php echo $lang['GENDER']; ?><br />

<?php if($gender == 0) { ?>
<select class="incc" name="gender">
<option value='0'>-- <?php echo $lang['GENDERN'] ?></option>
<option style="background:#ffffff;" value='0'>---- <?php echo $lang['GENDERN'] ?></option>
<option style="background:#ffffff;" value='1'>---- <?php echo $lang['GENDERM'] ?></option>
<option style="background:#ffffff;" value='2'>---- <?php echo $lang['GENDERF'] ?></option>
</select>
<?php } ?>
<?php if($gender == 1) { ?>
<select class="incc" name="gender">
<option value='1'>-- <?php echo $lang['GENDERM'] ?></option>
<option style="background:#ffffff;" value='0'>---- <?php echo $lang['GENDERN'] ?></option>
<option style="background:#ffffff;" value='1'>---- <?php echo $lang['GENDERM'] ?></option>
<option style="background:#ffffff;" value='2'>---- <?php echo $lang['GENDERF'] ?></option>
</select>
<?php } ?>
<?php if($gender == 2) { ?>
<select class="incc" name="gender">
<option value='2'>-- <?php echo $lang['GENDERF'] ?></option>
<option style="background:#ffffff;" value='0'>---- <?php echo $lang['GENDERN'] ?></option>
<option style="background:#ffffff;" value='1'>---- <?php echo $lang['GENDERM'] ?></option>
<option style="background:#ffffff;" value='2'>---- <?php echo $lang['GENDERF'] ?></option>
</select>
<?php } ?>
</div>






<div id="firstform">
<?php echo $lang['LOCATION']; ?><br />
<input type="text" name="location" class="incc" value="<?php echo $location ?>" />
</div>



<?php if($cthumbs == true) { ?>
<div id="incfirst">
<br />
<img style="padding:2px;border:1px solid #ccc;" src="<?php echo $sitepath.'/maxthumb/'.$cthumbs; ?>" width="50px" height="50px" border="0" />
<br />
<?php } ?>
<br />Upload New Image
<input style="float:left;width:28px;" type="checkbox" name="coption" value="1" />
<br /><br />
New Image:(only .jpg .jpeg formats);
<br /><br />
<input type="file" name="image" />
</div>
<div id="incfirst">
<input type="submit" value="<?php echo $lang['LINKSUB']; ?>" name="query" class="cbuton" />
</form>
</div>
</div>
<div id="panelrgt">
<h2><?php echo $lang['TOOLS'] ?></h2><br />
<?php if($editortrue == 1) { ?>
<?php echo $lang['BOOKMARK'] ?><br /><br />
<?php echo $lang['BOOKTEXT'] ?>
<br />
<a href="javascript:(function(){f='<?php echo $sitepath ?>/sharer.php?urld='+encodeURIComponent(window.location.href.replace(/http?:\/\//i, '').replace(/https?:\/\//i, ''))+'&title='+encodeURIComponent(document.title)+'&notes='+encodeURIComponent(''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text))+'&v=6&';a=function(){if(!window.open(f+'noui=1&jump=doclose','enter','location=yes,links=no,scrollbars=no,toolbar=no,width=620,height=250'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()">Save on <?php echo $sitetitle ?></a>
<?php } ?>
</div>


</div>
<?php
$arecordSet->Close();
$conn->Close();
//} 
?>
</div>
<?php
include ('static.php');
###############################
# userpanel.php version 1.1.6.#
###############################
?>
Return current item: phpBlogger