/ Forside / Teknologi / Udvikling / PHP / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
PHP
#NavnPoint
rfh 3959
natmaden 3372
poul_from 3310
funbreak 2700
stone47 2230
Jin2k 1960
Angband 1743
Bjerner 1249
refi 1185
10  Interkril.. 1146
Lidt til juledagene :-)
Fra : Søren


Dato : 24-12-08 11:55

Hej og god jul til alle..

Er der slet ikke nogen der kan greje dette her.. jeg synes jeg har prøvet at
finde ud af det, men kommer desværre ikke videre.

Problemet er at man skal udfylde et tekstfelt, hvor der står 250 karakterer
til rådighed. Jeg ville gerne ændre det, så man kan skrive ubegrænset.
Der er en registrerings fil, en edit fil, og en admin fil, hvor man kan
skrive/ændre i feltet.

Man kan godt skrive mere end 250 ord, eller kopiere en tekst ind.. Men.. Der
kommer kun de ca 250 karakteter med i proil.php filen, hvor det skal vises.

Lidt julehygge

Mvh Søren
-------------------------
Her er register filen..

<?php
include_once 'includes/config.php';
include 'languages/default/'.C_LANG.'.php';
include_once 'templates/header.php';
include_once 'includes/countrys.php';
include 'layout/menu.php';
include 'layout/menubar.php';
?>

<!-- Register -->

<script language="JavaScript">
<!--
function formCheck(form) {
if (form.usr_name.value == "") {alert( "<?=$lang_form_7?> ");return false ;}
if (form.usr_pass.value == "") {alert( "<?=$lang_form_8?> ");return false ;}
if (form.e_mail.value == "") {alert( "<?=$lang_form_2?> ");return false ;}
validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
strEmail = form.e_mail.value;
$tekst = str_replace("\n","<br>\n",$tekst);
if (strEmail.search(validRegExp) == -1)
{
alert('You have entered an invalid email address. ');return false;
}

<?if (REQ_FN){?>if (form.firstname.value == "") {alert( "<?=$lang_form_1?>
");return false ;}<?}?>
<?if (REQ_GNDR){?>if (form.gender.value == "") {alert( "<?=$lang_form_9?>
");return false ;}<?}?>
<?if (REQ_AGE){?>
if (form.age.value == "0") {alert( "<?=$lang_form_10?> ");return false ;}
if (form.day.value == "") {alert( "<?=$lang_form_11?> ");return false ;}
if (form.month.value == "") {alert( "<?=$lang_form_12?> ");return false ;}
if (form.year.value == "") {alert( "<?=$lang_form_13?> ");return false ;}
<?}?>
<?if (REQ_MS){?>if (form.mar_status.value == "") {alert( "<?=$lang_form_14?>
");return false ;}<?}?>
<?if (REQ_CTY){?>if (form.city.value == "") {alert( "<?=$lang_form_15?>
");return false ;}<?}?>
<?if (REQ_CTRY){?>if (form.location.value == "0") {alert(
"<?=$lang_form_16?> ");return false ;}<?}?>
<?if (REQ_ABME){?>if (form.aboutme.value == "") {alert( "<?=$lang_form_17?>
");return false ;}<?}?>
<?if (DATING){?>
if (form.seek_gender.value =="") {alert( "<?=$lang_form_18?> ");return false
;}
if (form.minage.value =="0") {alert( "<?=$lang_form_19?> ");return false ;}
if (form.maxage.value =="0") {alert( "<?=$lang_form_20?> ");return false ;}
if (form.seek_purpose.value =="") {alert( "<?=$lang_form_21?> ");return
false ;}
<?}?>

if (!(form.terms.checked)) {alert( "<?=$lang_form_22?> ");return false ;}
}
// -->
</script>

<?
if(sizeof($_POST)){
$_POST = strip_tags($_POST);
$maxsize = PHOTOSIZE; // photo size - set in config.php
$usr_name = ereg_replace (" ", "", $usr_name); // remove spaces from
username

if ($action!='update'){
$tmp=mysql_query("SELECT DISTINCT * FROM pro_membersu_privchatf WHERE
usrname='$usr_name' OR e_mail='$e_mail' order by id DESC LIMIT 1");
while($i=mysql_fetch_array($tmp)) {
if ($i['usrname'] == $usr_name){$reg_error='Username';}
if ($i['e_mail'] == $e_mail){$reg_error='Email';}
?>
<table class="table_body" width="900"><tr><td>
<br><br><br><br><br><br>
<table width="900" class=body_text cellpadding=0><tr><td align=center
valign=middle>
<br><br>
<font color=red><b><?=$lang_reg_1?></b></font><br>
<?=$reg_error?> <?=$lang_reg_2?>
<br><br>
<a href="javascript:history.back()"><?=$lang_reg_3?></font>
</td></tr></table>
<br><br><br><br><br><br>
<br><br><br>
<?
include_once 'templates/footer.php';
return;
}
}

//// CHECK MEMBERSHIP EXISTS OR IS NEW ////
$sql = "SELECT * FROM pro_membersu_privchatf WHERE usrname = '$usr_name'
LIMIT 1";
$result=mysql_query($sql);
$num_rows = mysql_num_rows($result);

if (
FREE_MEMBERSHIP && FREE_GENDER =='1' && $gender==$lang_browse_7 ||
FREE_MEMBERSHIP && FREE_GENDER =='2' && $gender==$lang_browse_8 ||
FREE_MEMBERSHIP && FREE_GENDER =='3' && $gender==$lang_browse_9 ||
FREE_MEMBERSHIP && FREE_GENDER =='4'
){
$expires_date = date('U', strtotime('+'.FREE_DURATION.' days'));
$mlevel='1';
}

$file = $_FILES['file']['tmp_name'];

if ($file !='' and $num_rows <='0'){
$file_name = $_FILES['file']['name'];
$new_name = $usr_name;

if ($_FILES['file']['size']>$maxsize) $status = "$lang_reg_4<br>$lang_reg_5
$maxsize bytes.";
if (($_FILES['file']['type']!="image/gif") &&
($_FILES['file']['type']!="image/jpeg") &&
($_FILES['file']['type']!="image/jpg") &&
($_FILES['file']['type']!="image/pjpeg")) $status .= $lang_reg_6;
$picext = substr($file_name,-3);
$picext = strtolower($picext);
if ((!$status) && ($picext!="gif") && ($picext!="jpg") && ($picext!="peg"))
$status .= $lang_reg_6;

if (!$status){

$file_name = str_replace(' ', '_', $new_name.'.'.$picext);
if(file_exists("./members/uploads/".$file_name.".".$picext)){unlink("./members/uploads/".$file_name.".".$picext);}
@copy($file, "./members/uploads/".$file_name);
chmod("./members/uploads/".$file_name, 0644);
}

$aboutme = preg_replace("/([^\s]{25})/","$1 ",$aboutme);
$birthday = $day."-".$month."-".$year;
$seeking_ages = $minage."-".$maxage;
$location = $wcr[$location];
$seek_location = $wcr[$seek_location];
if(C_APPR_MEMBER=='0'){$admin_check='0';}else{$admin_check='1';}
$firstname = ereg_replace ("'", "", $firstname);
$lastname = ereg_replace ("'", "", $lastname);
$city = ereg_replace ("'", "", $city);
$birthday = ereg_replace ("'", "", $birthday);
$usr_name = ereg_replace ("'", "", $usr_name);
$usr_pass = ereg_replace ("'", "", $usr_pass);
$e_mail = ereg_replace ("'", "", $e_mail);
$aboutme = ereg_replace ("'", "", $aboutme);
$sql = "INSERT INTO pro_membersu_privchatf (firstname, lastname,
seek_location, city, seek_purpose, seek_age, seek_gender, mar_status,
birthday, usrname, usrpassword, e_mail, age, gender, location, hobbies,
aboutme, photo, terms, date, admin_check, expires_date, memberlevel)
VALUES ('$firstname', '$lastname', '$seek_location', '$city',
'$seek_purpose', '$seeking_ages', '$seek_gender', '$mar_status',
'$birthday', '$usr_name', '$usr_pass', '$e_mail', '$age', '$gender',
'$location', '$hobbies', '$aboutme', '$file_name', '$terms', NOW(),
'$admin_check', '$expires_date', '$mlevel')";mysql_query($sql) or
die(mysql_error());

$tmp=mysql_query("SELECT * FROM pro_membersu_privchatf WHERE usrname =
'$usr_name' order by id DESC LIMIT 1");
while($e=mysql_fetch_array($tmp)) {$new_member = ($e['usrname']);$new_id =
($e['id']);}
$system_c = date("U");$today = date("M j, Y - g:i a");
$sql = "INSERT INTO pro_membersu_privchatd (memberid, membername, status,
ontime, active) VALUES ('$new_id', '$new_member', 'Online', '$today',
'$system_c')";mysql_query($sql) or die(mysql_error());
$sql = "INSERT INTO pro_membersu_privchatk (userid, username, view_page)
VALUES ('$new_id', '$new_member', 'online')";mysql_query($sql) or
die(mysql_error());

$fromname = C_ADMINM; // site name
$fromaddress = C_MAIL; // email address
$subject = C_SNAME." - membership details";
if(C_APPR_MEMBER=='0'){
$body = $lang_reg_7." ".$usr_name."\n\n".$lang_reg_8."
".C_SNAME."\n".$lang_reg_9."\n\n".$lang_reg_10.":
".$usr_name."\n".$lang_reg_11.": ".$usr_pass."\n".$lang_reg_12.":
".$e_mail."\n\n".$lang_reg_13."\n\n\n".$lang_reg_14.",\n".C_ADMINM."\n".C_URL;
}else{
$body = $lang_reg_7." ".$usr_name."\n\n".$lang_reg_8."
".C_SNAME."\n".$lang_reg_9."\n\n".$lang_reg_10.":
".$usr_name."\n".$lang_reg_11.": ".$usr_pass."\n".$lang_reg_12.":
".$e_mail."\n\n".$lang_reg_13."\n\n".$lang_reg_13b."\n".C_URL."/activate.php?u=".$new_id."&a=".md5(date("U"))."\n\n\n".$lang_reg_14.",\n".C_ADMINM."\n".C_URL;
}
$to = $e_mail;
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
$headers .= "X-Priority: 3\n";
$headers .= "X-MSMail-Priority: Normal\n";
$headers .= "X-Mailer: php\n";
$headers .= "From: \"".$fromname."\" <".$fromaddress.">\n";
if (mail($to, $subject, $body, $headers)){echo("");} else {echo("");}

//// END //////////////////////////

}

elseif ($file =='' and $num_rows <='0'){
$aboutme = preg_replace("/([^\s]{25})/","$1 ",$aboutme);
$birthday = $day."-".$month."-".$year;
$seeking_ages = $minage."-".$maxage;
$location = $wcr[$location];
$seek_location = $wcr[$seek_location];
if(C_APPR_MEMBER=='0'){$admin_check='0';}else{$admin_check='1';}
$firstname = ereg_replace ("'", "", $firstname);
$lastname = ereg_replace ("'", "", $lastname);
$city = ereg_replace ("'", "", $city);
$birthday = ereg_replace ("'", "", $birthday);
$usr_name = ereg_replace ("'", "", $usr_name);
$usr_pass = ereg_replace ("'", "", $usr_pass);
$e_mail = ereg_replace ("'", "", $e_mail);
$aboutme = ereg_replace ("'", "", $aboutme);
$sql = "INSERT INTO pro_membersu_privchatf (firstname, lastname,
seek_location, city, seek_purpose, seek_age, seek_gender, mar_status,
birthday, usrname, usrpassword, e_mail, age, gender, location, hobbies,
aboutme, terms, date, photo, admin_check, expires_date, memberlevel)
VALUES ('$firstname', '$lastname', '$seek_location', '$city',
'$seek_purpose', '$seeking_ages', '$seek_gender', '$mar_status',
'$birthday', '$usr_name', '$usr_pass', '$e_mail', '$age', '$gender',
'$location', '$hobbies', '$aboutme', '$terms', NOW(), '$photo',
'$admin_check', '$expires_date', '$mlevel')";mysql_query($sql) or
die(mysql_error());

$tmp=mysql_query("SELECT * FROM pro_membersu_privchatf WHERE usrname =
'$usr_name' order by id DESC LIMIT 1");
while($e=mysql_fetch_array($tmp)) {$new_member = ($e['usrname']);$new_id =
($e['id']);}
$system_c = date("U");$today = date("M j, Y - g:i a");
$sql = "INSERT INTO pro_membersu_privchatd (memberid, membername, status,
ontime, active) VALUES ('$new_id', '$new_member', 'Online', '$today',
'$system_c')";mysql_query($sql) or die(mysql_error());
$sql = "INSERT INTO pro_membersu_privchatk (userid, username, view_page)
VALUES ('$new_id', '$new_member', 'online')";mysql_query($sql) or
die(mysql_error());

$fromname = C_ADMINM; // site name
$fromaddress = C_MAIL; // email address
$subject = C_SNAME." - membership details";
if(C_APPR_MEMBER=='0'){
$body = $lang_reg_7." ".$usr_name."\n\n".$lang_reg_8."
".C_SNAME."\n".$lang_reg_9."\n\n".$lang_reg_10.":
".$usr_name."\n".$lang_reg_11.": ".$usr_pass."\n".$lang_reg_12.":
".$e_mail."\n\n".$lang_reg_13."\n\n\n".$lang_reg_14.",\n".C_ADMINM."\n".C_URL;
}else{
$body = $lang_reg_7." ".$usr_name."\n\n".$lang_reg_8."
".C_SNAME."\n".$lang_reg_9."\n\n".$lang_reg_10.":
".$usr_name."\n".$lang_reg_11.": ".$usr_pass."\n".$lang_reg_12.":
".$e_mail."\n\n".$lang_reg_13."\n\n".$lang_reg_13b."\n".C_URL."/activate.php?u=".$new_id."&a=".md5(date("U"))."\n\n\n".$lang_reg_14.",\n".C_ADMINM."\n".C_URL;
}
$to = $e_mail;
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
$headers .= "X-Priority: 3\n";
$headers .= "X-MSMail-Priority: Normal\n";
$headers .= "X-Mailer: php\n";
$headers .= "From: \"".$fromname."\" <".$fromaddress.">\n";
if (mail($to, $subject, $body, $headers)){echo("");} else {echo("");}

//// END //////////////////////////

}

elseif ($file !='' and $num_rows >='1'){

$file_name = $_FILES['file']['name'];
$new_name = $usr_name;

if ($_FILES['file']['size']>$maxsize) $status =
"$lang_reg_4<br>$lang_reg_5";
if (($_FILES['file']['type']!="image/gif") &&
($_FILES['file']['type']!="image/jpeg") &&
($_FILES['file']['type']!="image/jpg") &&
($_FILES['file']['type']!="image/pjpeg")) $status .= $lang_reg_6;
$picext = substr($file_name,-3);
$picext = strtolower($picext);
if ((!$status) && ($picext!="gif") && ($picext!="jpg") && ($picext!="peg"))
$status .= $lang_reg_6;

if (!$status){

$file_name = str_replace(' ', '_', $new_name.'.'.$picext);
if(file_exists("./uploads/".$file_name.".".$picext)){unlink("./uploads/".$file_name.".".$picext);}
@copy($file, "./uploads/".$file_name);
chmod("./uploads/".$file_name, 0644);
}

$aboutme = preg_replace("/([^\s]{25})/","$1 ",$aboutme);
$sql = "UPDATE pro_membersu_privchatf SET usrname='$usr_name',
usrpassword='$usr_pass', e_mail='$e_mail', age='$age', gender='$gender',
location='$location', hobbies='$hobbies', aboutme='$aboutme',
photo='$file_name', terms='$terms', date = NOW(''), website='$site_id' WHERE
usrname = '$usr_name'";;mysql_query($sql);
}

elseif ($file =='' and $num_rows >='1'){
$aboutme = preg_replace("/([^\s]{25})/","$1 ",$aboutme);
$sql = "UPDATE pro_membersu_privchatf SET usrname='$usr_name',
usrpassword='$usr_pass', e_mail='$e_mail', age='$age', gender='$gender',
location='$location', hobbies='$hobbies', aboutme='$aboutme',
terms='$terms', date = NOW('') WHERE usrname =
'$usr_name'";;mysql_query($sql);
}

else{}
?>
<table class="table_body" width="800"><tr><td>
<br><br><br><br>
<table width="780" border="0"><tr><td
align="center"><h4><?=$lang_reg_15?></h4></td></tr></table>
<table width="900" height="250" class="body_text" cellpadding="0">
<tr><td align="center" valign="top">
<?if(C_APPR_MEMBER!='0'){?>
<?=$lang_reg_61?>
<?}else{?>
<?=$lang_reg_16?><br><?=$lang_reg_17?> <a
href="login.php"><?=$lang_reg_18?></a>.
<?}?>
</td></tr></table>
<?
include_once 'templates/footer.php';
return;
}
?>
<table class="table_body" width="900"><tr><td>
<table width="850"><tr>
<div align="left"></div>
<td class="body_text">
<div align="left"></div>

<br>

<!-- page title -->
<table width="850" border="0"><tr><td
align="center"><h4><?=$lang_reg_19?></h4></td></tr>
<tr><td align="center" class="body_text">
<?=$lang_reg_20?><br>
</td></tr></table>

<?if (isset($pro_name)){?><br><center><font
color=red><b><?=$lang_reg_23?></b></font> <a
href="members.php">(<?=$lang_reg_24?>)</a></center><?}?>

<form enctype="multipart/form-data" method="post" action="register.php"
name=form OnSubmit="return formCheck(this)">
<div align="left"></div>

<input type="hidden" name="MAX_FILE_SIZE" value="<?=$maxsize?>">
<table align=center border="0" width="600" cellpadding="10">
<tr><td valign="top" width="120">

<!-- showcase existing members -->



<!-- registration details -->
</td><td valign="top" align=left>

<table align="center" cellspacing="0" width="700" border="0"
cellpadding="0">
<tr><td height="12" background="images/<?=C_STYLE?>/bg.gif"
class="body_title">
<div class="tl"><div class="tr">&nbsp;<?=$lang_reg_26?> <font
size=1>(<?=$lang_reg_27?>)</font></div></div></td></tr></table>

<table cellspacing="0" width="700" class="table_border" border="0"
cellpadding="4">
<tr class="table_body"><td colspan=2><b><?=$lang_reg_28?></b></td></tr>
<tr class="table_body"><td width=150><?=$lang_reg_29?></td><td><input
type="text" name="usr_name" value="" minlength="2" maxlength="16"></td></tr>
<tr class="table_body"><td width=150><?=$lang_reg_30?></td><td><input
type="password" name="usr_pass" value="" minlength="2"
maxlength="25"></td></tr>
<tr class="table_body"><td width=150><?=$lang_reg_31?></td><td><input
type="text" name="e_mail" value="" ></td></tr>
<?if (REQ_PR){?>
<tr class="table_body"><td colspan=2>&nbsp;</td></tr>
<tr class="table_body_light"><td
colspan=2><b><?=$lang_reg_31a?></b></td></tr>
<?}?>
<?if (REQ_FN){?>
<tr class="table_body_light"><td width=150><?=$lang_reg_32?></td><td><input
type="text" name="firstname" value="" minlength="2"
maxlength="20"></td></tr>
<tr class="table_body_light"><td width=150><?=$lang_reg_33?></td><td><input
type="text" name="lastname" value="" minlength="2" maxlength="20"></td></tr>
<?}?>
<?if (REQ_GNDR){?>
<tr class="table_body_light"><td width=150><?=$lang_reg_34?></td><td>
<select name="gender">
<option value=""><?=$lang_reg_18a?>
<option value="<?=$lang_browse_7?>"><?=$lang_browse_7?>
<option value="<?=$lang_browse_8?>"><?=$lang_browse_8?>
<option value="<?=$lang_browse_9a?>"><?=$lang_browse_9?>
</select>
</td></tr>
<?}?>
<?if (REQ_AGE){?>
<tr class="table_body_light"><td width=150><?=$lang_reg_35?></td>
<td>
<select name="age"><option value="0"> -----
<?for($p=MINAGE;$p<MAXAGE+1;$p++) {echo '<option>'.$p;}?>
</select></td>
</tr>
<tr class="table_body_light"><td width=150><?=$lang_reg_36?></td>
<td>
<font size="1">
<input type="text" name="day" maxlength="2" size="2"> (<?=$lang_reg_37?>)
<input type="text" name="month" maxlength="2"size="2"> (<?=$lang_reg_38?>)
<input type="text" name="year" maxlength="4" size="4">
(<?=$lang_reg_39?>)</font></tr>
<?}?>
<?if (REQ_MS){?>
<tr class="table_body_light"><td width=150><?=$lang_reg_40?></td><td>
<select name="mar_status">
<option value=""><?=$lang_reg_18a?>
<option value="<?=$lang_reg_41?>"><?=$lang_reg_41?>
<option value="<?=$lang_reg_42?>"><?=$lang_reg_42?>
<option value="<?=$lang_reg_43?>"><?=$lang_reg_43?>
<option value="<?=$lang_reg_44?>"><?=$lang_reg_44?>
<option value="<?=$lang_reg_45?>"><?=$lang_reg_45?>
</select></td></tr>
</td></tr>
<?}?>
<?if (REQ_CTY){?>
<tr class="table_body_light"><td width=150><?=$lang_reg_46?></td><td>
<input type="text" name="city" value=""></td></tr>
<?}?>
<?if (REQ_CTRY){?>
<tr class="table_body_light"><td width=150><?=$lang_reg_47?></td><td>
<select name="location"><option value="0"> -----
<? $p=0;asort($wcr);reset($wcr);
while (list ($p, $val) = each ($wcr)) {
echo '<option value="'.$p.'">'.$val;
}
?>
</select>
</td></tr>
<?}?>
<?if (REQ_ABME){?>
<script language="JavaScript">
<!-- Begin
function textCounter(field, countfield, maxlimit)
{if (field.value.length > maxlimit) field.value = field.value.substring(0,
maxlimit);
else countfield.value = maxlimit - field.value.length;}
function eraseValue(field){ field.value = ''; }
$tekst = str_replace("\n","<br>\n",$tekst);
// End -->
</script>
<tr class="table_body_light"><td
width=200><?=$lang_reg_48?></td><td><textarea name="aboutme" cols="60"
rows="10" onKeyDown="textCounter(this.form.aboutme,this.form.remLen,250);"
onKeyUp="textCounter(this.form.aboutme,this.form.remLen,250);"></textarea><br><font
size=1>Karakterer tilbage</font>&nbsp;<input readonly type="text"
name="remLen" size="3" maxlength="5" value="250"></td></tr>
<?}?>
<?if(DATING){?>
<tr class="table_body_light"><td colspan=2>&nbsp;</td></tr>
<tr class="table_body"><td colspan=2><b><?=$lang_reg_49?></b></td></tr>

<tr class="table_body"><td width=150><?=$lang_browse_12?></td><td>
<select name="seek_gender">
<option value=""><?=$lang_reg_18a?>
<option value="<?=$lang_browse_7?>"><?=$lang_browse_7?>
<option value="<?=$lang_browse_8?>"><?=$lang_browse_8?>
<option value="<?=$lang_browse_9a?>"><?=$lang_browse_9a?>
</select>
</td></tr>

<tr class="table_body"><td width=150><?=$lang_browse_13?></td><td>
<select name="minage"><option value="0"> -----
<?for($p=18;$p<101;$p++) {echo '<option>'.$p;}?>
</select>
&nbsp;<?=$lang_browse_17?>&nbsp;
<select name="maxage"><option value="0"> -----
<?for($p=18;$p<101;$p++) {echo '<option>'.$p;}?>
</select>
</td></tr>

<tr class="table_body"><td width=150><?=$lang_browse_14?></td><td>
<select name="seek_location"><option value="0"> -----
<? $p=0;asort($wcr);reset($wcr);
while (list ($p, $val) = each ($wcr)) {
echo '<option value="'.$p.'">'.$val;
}
?>
</select>
</td></tr>
<tr class="table_body"><td width=150><?=$lang_reg_50?></td><td>
<select name="seek_purpose">
<option value=""><?=$lang_reg_18a?>
<option value="<?=$lang_reg_51?>"><?=$lang_reg_51?>
<option value="<?=$lang_reg_52?>"><?=$lang_reg_52?>
<option value="<?=$lang_reg_53?>"><?=$lang_reg_53?>
<option value="<?=$lang_reg_54?>"><?=$lang_reg_54?>
<option value="<?=$lang_reg_55?>"><?=$lang_reg_55?>
</select>
</td></tr>
<tr class="table_body"><td colspan=2>&nbsp;</td></tr>
<?}?>
<?if (REQ_PIC){?>
<tr class="table_body_light"><td
colspan=2><b><?=$lang_reg_56?></b></td></tr>
<tr class="table_body_light"><td width=150><?=$lang_reg_57?></td><td>
<input class=input type=file name="file<?=$i?>">
</td></tr>
<?}?>
<tr class="table_body_light"><td width=150>&nbsp;</td><td><input
type="checkbox" name="terms" value="yes" CHECKED><?=$lang_reg_58?> <a
href="terms.php" target="_blank"><?=$lang_reg_59?></a>.</td></tr>
<tr class="table_body"><td width=150>&nbsp;</td><td>
<?if(!isset($pro_name)){?>
<input type="submit" name="submit" value="<?=$lang_reg_60?>">
<?}else{?>
<input type="button" name="reset" value="<?=$lang_reg_60?>" onClick="return
false;">
<?}?>
</td></tr>
</table>
</td></tr>
</table>
</td>
<div align="left"></div>
</tr>
<div align="left"></div>
</table>
</form>
<?
include_once 'templates/footer.php';
?>

----------------------------
Her er edit filen

<?php
$view_page='edit_profile';
include_once 'includes/config.php';
include 'languages/default/'.C_LANG.'.php';
include_once 'templates/header.php';
include_once 'includes/countrys.php';
include 'layout/menu.php';
include 'layout/menubar.php';
?>

<!-- Edit Profile -->

<script language="JavaScript">
<!--
function formCheck(form) {
if (form.usr_name.value == "") {alert( "<?=$lang_form_7?> ");return false ;}
if (form.usr_pass.value == "") {alert( "<?=$lang_form_8?> ");return false ;}
if (form.e_mail.value == "") {alert( "<?=$lang_form_2?> ");return false ;}
validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
strEmail = form.e_mail.value;
if (strEmail.search(validRegExp) == -1)
{
alert('<?=$lang_form_6?> ');return false;
}
<?if(REQ_FN){?>if (form.firstname.value == "") {alert( "<?=$lang_form_1?>
");return false ;}<?}?>
<?if(REQ_AGE){?>
if (form.gender.value == "") {alert( "<?=$lang_form_9?> ");return false ;}
if (form.age.value == "0") {alert( "<?=$lang_form_10?> ");return false ;}
if (form.day.value == "") {alert( "<?=$lang_form_11?> ");return false ;}
if (form.month.value == "") {alert( "<?=$lang_form_12?> ");return false ;}
if (form.year.value == "") {alert( "<?=$lang_form_12?> ");return false ;}
<?}?>
<?if(REQ_FN){?>if (form.mar_status.value == "") {alert( "<?=$lang_form_14?>
");return false ;}<?}?>
<?if(REQ_FN){?>if (form.city.value == "") {alert( "<?=$lang_form_15?>
");return false ;}<?}?>
<?if(REQ_FN){?>if (form.location.value == "0") {alert( "<?=$lang_form_16?>
");return false ;}<?}?>
<?if(REQ_FN){?>if (form.aboutme.value == "") {alert( "<?=$lang_form_17?>
");return false ;}<?}?>
<?if (DATING){?>
if (form.seek_gender.value =="") {alert( "<?=$lang_form_18?> ");return false
;}
if (form.minage.value =="0") {alert( "<?=$lang_form_19?> ");return false ;}
if (form.maxage.value =="0") {alert( "<?=$lang_form_20?> ");return false ;}
if (form.seek_location.value == "0") {alert( "<?=$lang_form_20a?> ");return
false ;}
if (form.seek_purpose.value =="") {alert( "<?=$lang_form_21?> ");return
false ;}
<?}?>
}
// -->
</script>

<?
if(sizeof($_POST)){

$_POST = strip_tags($_POST);

$maxsize = PHOTOSIZE; // photo size - set in config.php

$file = $_FILES['file']['tmp_name'];

if ($file !=''){

$file_name = $_FILES['file']['name'];
$new_name = $usr_name;
$max_kb = $maxsize / 1000;

if ($_FILES['file']['size']>$maxsize) $status = "<br><br>".$lang_reg_4."
".$lang_reg_5." ".$max_kb." KB";
if (($_FILES['file']['type']!="image/gif") &&
($_FILES['file']['type']!="image/jpeg") &&
($_FILES['file']['type']!="image/jpg") &&
($_FILES['file']['type']!="image/pjpeg")) $status .= "<br><br>".$lang_reg_6;
$picext = substr($file_name,-3);
$picext = strtolower($picext);
if ((!$status) && ($picext!="gif") && ($picext!="jpg") && ($picext!="peg"))
$status .= "<br><br>".$lang_reg_6;

if (!$status){

$file_name = str_replace(' ', '_', $new_name.'.'.$picext);
if(file_exists("./members/uploads/".$file_name.".".$picext)){unlink("./members/uploads/".$file_name.".".$picext);}
@copy($file, "./members/uploads/".$file_name);
chmod("./members/uploads/".$file_name, 0644);
}else{
echo "<table width=780 height=300><tr><td align=center><font
color=red>".$status."</font><br><br><a href=\"#\"
onClick=\"history.go(-1);\">".$lang_reg_3."</a></td></tr></table>";
include 'layout/menu.php';
include_once 'templates/footer.php';
return;
}

$aboutme = preg_replace("/([^\s]{25})/","$1 ",$aboutme);
$birthday = $day."-".$month."-".$year;
$seek_age = $minage."-".$maxage;
if(is_numeric($location)){$location = $wcr[$location];}
if(is_numeric($seek_location)){$seek_location = $wcr[$seek_location];}
$sql = "UPDATE pro_membersu_privchatf SET mar_status = '$mar_status',
birthday = '$birthday', lastname = '$lastname', firstname = '$firstname',
city = '$city', seek_purpose='$seek_purpose', seek_gender='$seek_gender',
seek_age='$seek_age', seek_location='$seek_location', usrname='$usr_name',
usrpassword='$usr_pass', e_mail='$e_mail', age='$age', gender='$gender',
location='$location', hobbies='$hobbies', aboutme='$aboutme',
photo='$file_name', terms='$terms', date = NOW(''), website='$site_id' WHERE
usrname = '$usr_name'";;mysql_query($sql);
}

if ($file ==''){

if ($delete_pic=='1' && $photo!=''){$delete_pic = "photo = '',";
if(file_exists("./members/uploads/".$photo)){unlink("./members/uploads/".$photo);}
}

$birthday = $day."-".$month."-".$year;
$seek_age = $minage."-".$maxage;
if(is_numeric($location)){$location = $wcr[$location];}
if(is_numeric($seek_location)){$seek_location = $wcr[$seek_location];}
$aboutme = preg_replace("/([^\s]{25})/","$1 ",$aboutme);
$sql = "UPDATE pro_membersu_privchatf SET ".$delete_pic." mar_status =
'$mar_status', birthday = '$birthday', lastname = '$lastname', firstname =
'$firstname', city = '$city', seek_purpose='$seek_purpose',
seek_gender='$seek_gender', seek_age='$seek_age',
seek_location='$seek_location', usrname='$usr_name',
usrpassword='$usr_pass', e_mail='$e_mail', age='$age', gender='$gender',
location='$location', hobbies='$hobbies', aboutme='$aboutme',
terms='$terms', date = NOW('') WHERE usrname =
'$usr_name'";;mysql_query($sql);
}
?>
<table class="table_body" width="800"><tr><td>
<br><br><br><br>
<table width="780" border="0"><tr><td
align="center"><h4><?=$lang_reg_15?></h4></td></tr></table>
<table width="780" height="250" class="body_text" cellpadding="0"><tr><td
align="center" valign="top">
<?=$lang_edit_1?><br><?=$lang_edit_2?> <a
href="members.php"><?=$lang_reg_18?></a>.
</td></tr></table>
<?
include_once 'templates/footer.php';
return;
}

?>
<table class="table_body" width="900"><tr><td>
<table width="780"><tr><td class="body_text">
<br>

<!-- page title -->
<table width="780" border="0"><tr><td
align="center"><h4><?=$lang_edit_3?></h4></td></tr>
<tr><td align="center" class="body_text">
<?=$lang_edit_4?><br>
(<?=$lang_edit_5?> <a href="members.php"><?=$lang_edit_6?></a>)
</td></tr></table>

<form enctype="multipart/form-data" method="post" action="edit.php"
name=form OnSubmit="return formCheck(this)">
<input type="hidden" name="MAX_FILE_SIZE" value="<?=$maxsize?>">
<table align=center border="0" width="700" cellpadding="10">
<tr><td align=center>

<?
$tmp=mysql_query("SELECT DISTINCT * FROM pro_membersu_privchatf WHERE
usrname = '$pro_name' LIMIT 1");
while($i=mysql_fetch_array($tmp)) {
$usr_name = ($i['usrname']);
$usr_pass = ($i['usrpassword']);
$e_mail = ($i['e_mail']);
$firstname = ($i['firstname']);
$lastname = ($i['lastname']);
$gender = ($i['gender']);
$age = ($i['age']);
$birthday = ($i['birthday']);
$mar_status = ($i['mar_status']);
$city = ($i['city']);
$location = ($i['location']);
$aboutme = ($i['aboutme']);
$seek_gender = ($i['seek_gender']);
$seek_age = ($i['seek_age']);
$seek_location = ($i['seek_location']);
$seek_purpose = ($i['seek_purpose']);
$photo = ($i['photo']);
?>

<table align="center" cellspacing="0" width="700" border="0"
cellpadding="0">
<tr><td height="12" background="images/<?=C_STYLE?>/bg.gif"
class="body_title">
<div class="tl"><div class="tr">&nbsp;<?=$lang_edit_7?> <font
size=1>(<?=$lang_reg_27?>)</font></div></div></td></tr></table>

<table cellspacing="0" width="700" class="table_border" border="0"
cellpadding=2>
<tr class="table_body"><td colspan=2><b><?=$lang_reg_28?></b></td></tr>
<input type="hidden" name="usr_name" value="<?=$usr_name?>">
<tr class="table_body"><td
width=700><?=$lang_reg_29?></td><td><?=$usr_name?></td></tr>
<tr class="table_body"><td width=700><?=$lang_reg_30?></td><td><input
type="password" name="usr_pass" value="<?=$usr_pass?>" minlength="2"
maxlength="20"><br><font size=1>(<?=$lang_edit_8?>)</font></td></tr>
<tr class="table_body"><td width=700><?=$lang_reg_31?></td><td><input
type="text" name="e_mail" value="<?=$e_mail?>" ></td></tr>
<tr class="table_body"><td colspan=2>&nbsp;</td></tr>

<?if(REQ_PR){?><tr class="table_body_light"><td
colspan=2><b><?=$lang_reg_31a?></b></td></tr><?}?>
<?if(REQ_FN){?>
<tr class="table_body_light"><td width=700><?=$lang_reg_32?></td><td><input
type="text" name="firstname" value="<?=$firstname?>" minlength="2"
maxlength="20"></td></tr>
<tr class="table_body_light"><td width=700><?=$lang_reg_33?></td><td><input
type="text" name="lastname" value="<?=$lastname?>" minlength="2"
maxlength="20"></td></tr>
<?}?>
<?if(REQ_GNDR){?>
<tr class="table_body_light"><td width=700><?=$lang_reg_34?></td><td>
<select name="Køn">
<option value="" <?if ($gender==''){?>SELECTED<?}?>>select
<option value="Mand" <?if
($gender==$lang_browse_7){?>SELECTED<?}?>><?=$lang_browse_7?>
<option value="Kvinde" <?if
($gender==$lang_browse_8){?>SELECTED<?}?>><?=$lang_browse_8?>
<option value="Par" <?if
($gender==$lang_browse_9a){?>SELECTED<?}?>><?=$lang_browse_9?>
</select>
</td></tr>
<?}?>
<?if(REQ_AGE){?>
<tr class="table_body_light"><td width=700><?=$lang_reg_35?></td>
<td>
<select name="age"><option value="0"> -----
<?for($p=MINAGE;$p<MAXAGE+1;$p++) {
if ($age == $p){echo '<option SELECTED>'.$p;}else{echo '<option>'.$p;}
}
?>
</select>
</td>
</tr>

<tr class="table_body_light"><td width=700><?=$lang_reg_36?></td>
<td>
<font size="1">
<?
$days = substr($birthday, 0, 2);
$months = substr($birthday, 3, 2);
$years = substr($birthday, 6, 10);
?>
<input type="text" name="day" maxlength="2" size="2" value="<?=$days?>">
(<?=$lang_reg_37?>)
<input type="text" name="month" maxlength="2" size="2" value="<?=$months?>">
(<?=$lang_reg_38?>)
<input type="text" name="year" maxlength="4" size="4" value="<?=$years?>">
(<?=$lang_reg_39?>)
</font>
</tr>
<?}?>
<?if(REQ_MS){?>
<tr class="table_body_light"><td width=150><?=$lang_reg_40?></td><td>
<select name="mar_status">
<option value=""><?=$lang_reg_18a?>
<option value="<?=$lang_reg_41?>" <?if
($mar_status==$lang_reg_41){?>SELECTED<?}?>><?=$lang_reg_41?>
<option value="<?=$lang_reg_42?>" <?if
($mar_status==$lang_reg_42){?>SELECTED<?}?>><?=$lang_reg_42?>
<option value="<?=$lang_reg_43?>" <?if
($mar_status==$lang_reg_43){?>SELECTED<?}?>><?=$lang_reg_43?>
<option value="<?=$lang_reg_44?>" <?if
($mar_status==$lang_reg_44){?>SELECTED<?}?>><?=$lang_reg_44?>
<option value="<?=$lang_reg_45?>" <?if
($mar_status==$lang_reg_45){?>SELECTED<?}?>><?=$lang_reg_45?>
</select></td></tr>
<?}?>
</td></tr>
<?if(REQ_CTY){?>
<tr class="table_body_light"><td width=700><?=$lang_reg_46?></td><td>
<input type="text" name="city" value="<?=$city?>"></td></tr>
<?}?>
<?if(REQ_CNTY){?>
<tr class="table_body_light"><td width=700><?=$lang_reg_47?></td><td>
<select name="location"><option value="<?=$location?>"> <?=$location?>
<? $p=0;asort($wcr);reset($wcr);
while (list ($p, $val) = each ($wcr)) {
echo '<option value="'.$p.'">'.$val;
}
?>
</select>
</td></tr>
<?}?>
<?if (REQ_ABME){?>
<script language="JavaScript">
<!-- Begin
function textCounter(field, countfield, maxlimit)
{if (field.value.length > maxlimit) field.value = field.value.substring(0,
maxlimit);
else countfield.value = maxlimit - field.value.length;}
function eraseValue(field){ field.value = ''; }
// End -->
</script>
<tr class="table_body_light"><td
width=700><?=$lang_reg_48?></td><td><textarea name="aboutme" cols="60"
rows="10" onKeyDown="textCounter(this.form.aboutme,this.form.remLen,250);"
onKeyUp="textCounter(this.form.aboutme,this.form.remLen,250);"><?=$aboutme?></textarea><br><font
size=1>Characters Remaining</font>&nbsp;<input readonly type="text"
name="remLen" size="3" maxlength="5" value="250"></td></tr>
<?}?>
<?if(DATING){?>
<tr class="table_body"><td colspan=2>&nbsp;</td></tr>
<tr class="table_body"><td colspan=2><b><?=$lang_reg_49?></b></td></tr>
<tr class="table_body"><td width=700><?=$lang_browse_12?></td><td>
<select name="seek_gender">
<option value=""><?=$lang_reg_18a?>
<option value="<?=$lang_browse_7?>" <?if
($seek_gender==$lang_browse_7){?>SELECTED<?}?>><?=$lang_browse_7?>
<option value="<?=$lang_browse_8?>" <?if
($seek_gender==$lang_browse_8){?>SELECTED<?}?>><?=$lang_browse_8?>
<option value="<?=$lang_browse_9a?>" <?if
($seek_gender==$lang_browse_9a){?>SELECTED<?}?>><?=$lang_browse_9a?>
</select>
</td></tr>

<tr class="table_body"><td width=150><?=$lang_browse_13?></td><td>
<select name="minage"><option value="0"> -----
<?
$seek_minage = substr($seek_age, 0, 3);
for($p=18;$p<101;$p++) {
if ($seek_minage == $p){echo '<option SELECTED>'.$p;}else{echo
'<option>'.$p;}
}
?>
</select>
&nbsp;<?=$lang_browse_17?>&nbsp;
<select name="maxage"><option value="0"> -----
<?
$seek_maxage = substr($seek_age, 3);
for($p=18;$p<101;$p++) {
if ($seek_maxage == $p){echo '<option SELECTED>'.$p;}else{echo
'<option>'.$p;}
}
?>
</select>
</td></tr>

<tr class="table_body"><td width=150><?=$lang_browse_14?></td><td>
<select name="seek_location"><option value="<?=$seek_location?>">
<?=$seek_location?>
<? $p=0;asort($wcr);reset($wcr);
while (list ($p, $val) = each ($wcr)) {
echo '<option value="'.$p.'">'.$val;
}
?>
</select>
</td></tr>

<tr class="table_body"><td width=150><?=$lang_reg_50?></td><td>
<select name="seek_purpose">
<option value=""><?=$lang_reg_18a?>
<option value="<?=$lang_reg_51?>" <?if
($seek_purpose==$lang_reg_51){?>SELECTED<?}?>><?=$lang_reg_51?>
<option value="<?=$lang_reg_52?>" <?if
($seek_purpose==$lang_reg_52){?>SELECTED<?}?>><?=$lang_reg_52?>
<option value="<?=$lang_reg_53?>" <?if
($seek_purpose==$lang_reg_53){?>SELECTED<?}?>><?=$lang_reg_53?>
<option value="<?=$lang_reg_54?>" <?if
($seek_purpose==$lang_reg_54){?>SELECTED<?}?>><?=$lang_reg_54?>
<option value="<?=$lang_reg_55?>" <?if
($seek_purpose==$lang_reg_55){?>SELECTED<?}?>><?=$lang_reg_55?>
</select>
</td></tr>
<tr class="table_body"><td colspan=2>&nbsp;</td></tr>
<tr class="table_body_light"><td
colspan=2><b><?=$lang_reg_56?></b></td></tr>
<?}?>
<?if(REQ_PIC){?>
<tr class="table_body_light"><td width=150>&nbsp;</td><td>
<input type="hidden" name="photo" value="<?=$photo?>">
<?if($photo!=''){?>
<img src="members/uploads/<?=$photo?>" height="90">
<?}else{?>
<img src="members/uploads/nopic.jpg" height="90">
<?}?>
<br>
<input type="checkbox" name="delete_pic" value="1"> <?=$lang_edit_9?>
</td></tr>

<tr class="table_body_light"><td width=150><?=$lang_reg_57?></td><td>
<input class="input" type="file" name="file">
</td></tr>
<?}?>
<tr class="table_body"><td width=150>&nbsp;</td><td>
<input type="submit" name="submit" value="<?=$lang_edit_10?>">
</td></tr>
</table>
</td></tr></table><br>
</form>
<?
}
include_once 'templates/footer.php';
?>

----------------------------------
Her er admin filen (edit)

<?php
include_once '../includes/config.php';
include '../languages/default/'.C_LANG.'.php';
include_once '../templates/header.php';
include_once '../includes/countrys.php';
include '../layout/menu.php';
include '../layout/menubar.php';

if(sizeof($_POST)){

$maxsize = PHOTOSIZE; // photo size - set in config.php

$file = $_FILES['file']['tmp_name'];

if ($file !=''){

$file_name = $_FILES['file']['name'];
$new_name = $usr_name;

if ($_FILES['file']['size']>$maxsize) $status = "Error: Picture size too
large.<br>Max file size is $maxsize bytes.";
if (($_FILES['file']['type']!="image/gif") &&
($_FILES['file']['type']!="image/jpeg") &&
($_FILES['file']['type']!="image/jpg") &&
($_FILES['file']['type']!="image/pjpeg")) $status .= "Error: Wrong file
type. Must be JPG or GIF only.";
$picext = substr($file_name,-3);
$picext = strtolower($picext);
if ((!$status) && ($picext!="gif") && ($picext!="jpg") && ($picext!="peg"))
$status .= "Error: Wrong file type. Must be JPG or GIF only.";

if (!$status){

$file_name = str_replace(' ', '_', $new_name.'.'.$picext);
if(file_exists("../members/uploads/".$file_name.".".$picext)){unlink("./members/uploads/".$file_name.".".$picext);}
@copy($file, "../members/uploads/".$file_name);
chmod("../members/uploads/".$file_name, 0644);
}

$aboutme = preg_replace("/([^\s]{25})/","$1 ",$aboutme);
$birthday = $day."-".$month."-".$year;
$seek_age = $minage."-".$maxage;
if(is_numeric($location)){$location = $wcr[$location];}
if(is_numeric($seek_location)){$seek_location = $wcr[$seek_location];}
$sql = "UPDATE pro_membersu_privchatf SET mar_status = '$mar_status',
birthday = '$birthday', lastname = '$lastname', firstname = '$firstname',
city = '$city', seek_purpose='$seek_purpose', seek_gender='$seek_gender',
seek_age='$seek_age', seek_location='$seek_location', usrname='$usr_name',
usrpassword='$usr_pass', e_mail='$e_mail', age='$age', gender='$gender',
location='$location', hobbies='$hobbies', aboutme='$aboutme',
photo='$file_name', terms='$terms', date = NOW(''), website='$site_id' WHERE
usrname = '$usr_name'";;mysql_query($sql);
}

if ($file ==''){

if ($delete_pic=='1' && $photo!=''){$delete_pic = "photo = '',";
if(file_exists("./members/uploads/".$photo)){unlink("./members/uploads/".$photo);}
}

$birthday = $day."-".$month."-".$year;
$seek_age = $minage."-".$maxage;
if(is_numeric($location)){$location = $wcr[$location];}
if(is_numeric($seek_location)){$seek_location = $wcr[$seek_location];}
$aboutme = preg_replace("/([^\s]{25})/","$1 ",$aboutme);
$sql = "UPDATE pro_membersu_privchatf SET ".$delete_pic." mar_status =
'$mar_status', birthday = '$birthday', lastname = '$lastname', firstname =
'$firstname', city = '$city', seek_purpose='$seek_purpose',
seek_gender='$seek_gender', seek_age='$seek_age',
seek_location='$seek_location', usrname='$usr_name',
usrpassword='$usr_pass', e_mail='$e_mail', age='$age', gender='$gender',
location='$location', hobbies='$hobbies', aboutme='$aboutme',
terms='$terms', date = NOW('') WHERE usrname =
'$usr_name'";;mysql_query($sql);
}

?>
<table class="table_body" width="900"><tr><td align="center">
<br><br><br><br>
<table width="780" border="0"><tr><td
align="center"><h4>Success!</h4></td></tr></table>
<table width="780" height="250" class="body_text" cellpadding="0"><tr><td
align="center" valign="top">
User details have been updated.<br>Please return to the <a
href="<?=C_URL?>/admin/">admin area</a>.
</td></tr></table>
<?
include_once '../templates/footer.php';
return;
}
?>
<table class="table_body" width="800"><tr><td align="center">
<table width="780"><tr><td class="body_text">
<br>

<!-- page title -->
<table width="780" border="0"><tr><td align="center"><h4>Edit Profile
Details</h4></td></tr>
<tr><td align="center" class="body_text">
Please edit your details below.<br>
(Return to <a href="<?=C_URL?>/admin/">Admin Area</a>)
</td></tr></table>

<form enctype="multipart/form-data" method="post" action="edit.php"
name=form OnSubmit="return formCheck(this)">
<input type="hidden" name="MAX_FILE_SIZE" value="<?=$maxsize?>">
<table align=center border="0" width="600" cellpadding="10">
<tr><td align=center>

<?
$tmp=mysql_query("SELECT DISTINCT * FROM pro_membersu_privchatf WHERE
usrname = '$member' LIMIT 1");
while($i=mysql_fetch_array($tmp)) {
$usr_name = ($i['usrname']);
$usr_pass = ($i['usrpassword']);
$e_mail = ($i['e_mail']);
$firstname = ($i['firstname']);
$lastname = ($i['lastname']);
$gender = ($i['gender']);
$age = ($i['age']);
$birthday = ($i['birthday']);
$mar_status = ($i['mar_status']);
$city = ($i['city']);
$location = ($i['location']);
$aboutme = ($i['aboutme']);
$seek_gender = ($i['seek_gender']);
$seek_age = ($i['seek_age']);
$seek_location = ($i['seek_location']);
$seek_purpose = ($i['seek_purpose']);
$photo = ($i['photo']);
?>
<table cellspacing="0" width="400" class="table_border" border="0"
cellpadding=2>
<tr><td height="12" colspan=2 class="table_header">&nbsp;Membership Details
<font size=1>(all fields are required)</font></td></tr>
<tr class="table_body"><td colspan=2><b>Your Details</b></td></tr>
<input type="hidden" name="usr_name" value="<?=$usr_name?>">
<tr class="table_body"><td width=150>Choose
Username</td><td><?=$usr_name?></td></tr>
<tr class="table_body"><td width=150>Choose Password</td><td><input
type="password" name="usr_pass" value="<?=$usr_pass?>" minlength="2"
maxlength="20"><br><font size=1>(you will need to relogin
again)</font></td></tr>
<tr class="table_body"><td width=150>Enter Your Email</td><td><input
type="text" name="e_mail" value="<?=$e_mail?>" ></td></tr>
<tr class="table_body"><td colspan=2>&nbsp;</td></tr>

<?if(REQ_PR){?>
<tr class="table_body_light"><td colspan=2><b>Your Profile</b></td></tr>
<?}?>
<?if(REQ_FN){?>
<tr class="table_body_light"><td width=150>First Name</td><td><input
type="text" name="firstname" value="<?=$firstname?>" minlength="2"
maxlength="20"></td></tr>
<tr class="table_body_light"><td width=150>Last Name</td><td><input
type="text" name="lastname" value="<?=$lastname?>" minlength="2"
maxlength="20"></td></tr>
<?}?>
<?if(REQ_GNDR){?>
<tr class="table_body_light"><td width=150>Gender</td><td>
<select name="gender">
<option value="" <?if ($gender==''){?>SELECTED<?}?>>Vælg
<option value="Mand" <?if ($gender=='Male'){?>SELECTED<?}?>>Mand
<option value="Kvinde" <?if ($gender=='Female'){?>SELECTED<?}?>>Kvinde
</select>
</td></tr>
<?}?>
<?if(REQ_AGE){?>
<tr class="table_body_light"><td width=150>Age</td>
<td>
<select name="age"><option value="0"> -----
<?for($p=MINAGE;$p<MAXAGE+1;$p++) {
if ($age == $p){echo '<option SELECTED>'.$p;}else{echo '<option>'.$p;}
}
?>
</select>
</td>
</tr>
<tr class="table_body_light"><td width=150>Birthday</td>
<td>
<font size="1">
<?
$days = substr($birthday, 0, 2);
$months = substr($birthday, 3, 2);
$years = substr($birthday, 6, 10);
?>
<input type="text" name="day" maxlength="2" size="2" value="<?=$days?>">
(dd)
<input type="text" name="month" maxlength="2"size="2" value="<?=$months?>">
(mm)
<input type="text" name="year" maxlength="4" size="4" value="<?=$years?>">
(yyyy)
</font>
</tr>
<?}?>
<?if(REQ_MS){?>
<tr class="table_body_light"><td width=150>Marital Status</td><td>
<select name="mar_status">
<option value="">select
<option value="Single" <?if ($mar_status=='Single'){?>SELECTED<?}?>>Escort
<option value="Engaged" <?if
($mar_status=='Engaged'){?>SELECTED<?}?>>Massage
<option value="Married" <?if ($mar_status=='Married'){?>SELECTED<?}?>>
<option value="Divorced" <?if ($mar_status=='Divorced'){?>SELECTED<?}?>>
<option value="Widow" <?if ($mar_status=='Widowed'){?>SELECTED<?}?>>
</select></td></tr>
<?}?>
</td></tr>
<?if(REQ_CTY){?>
<tr class="table_body_light"><td width=150>E-mail</td><td>
<input type="text" name="city" value="<?=$city?>"></td></tr>
<?}?>
<?if(REQ_CTRY){?>
<tr class="table_body_light"><td width=150>Country</td><td>
<select name="location"><option value="<?=$location?>"> <?=$location?>
<? $p=0;asort($wcr);reset($wcr);
while (list ($p, $val) = each ($wcr)) {
echo '<option value="'.$p.'">'.$val;
}
?>
</select>
</td></tr>
<?}?>
<?if(REQ_ABME){?>
<tr class="table_body_light"><td width=150>Write a brief description about
yourself.</td>
<td><textarea name="aboutme" cols="20"
rows="20"><?=$aboutme?></textarea></td></tr>
<?}?>
<?if(DATING){?>
<tr class="table_body_light"><td colspan=2>&nbsp;</td></tr>
<tr class="table_body"><td colspan=2><b>My Ideal Partner</b></td></tr>

<tr class="table_body"><td width=150>I'm Seeking</td><td>
<select name="seek_gender">
<option value="">select
<option value="Male" <?if ($seek_gender=='Male'){?>SELECTED<?}?>>Male
<option value="Female" <?if ($seek_gender=='Female'){?>SELECTED<?}?>>Female
<option value="Couples" <?if
($seek_gender=='Couples'){?>SELECTED<?}?>>Couples
</select>
</td></tr>

<tr class="table_body"><td width=150>Aged</td><td>
<select name="minage"><option value="0"> -----
<?
$seek_minage = substr($seek_age, 0, 3);
for($p=18;$p<101;$p++) {
if ($seek_minage == $p){echo '<option SELECTED>'.$p;}else{echo
'<option>'.$p;}
}
?>
</select>
&nbsp;To&nbsp;
<select name="maxage"><option value="0"> -----
<?
$seek_maxage = substr($seek_age, 3);
for($p=18;$p<101;$p++) {
if ($seek_maxage == $p){echo '<option SELECTED>'.$p;}else{echo
'<option>'.$p;}
}
?>
</select>
</td></tr>

<tr class="table_body"><td width=150>From</td><td>
<select name="seek_location"><option value="<?=$seek_location?>">
<?=$seek_location?>
<? $p=0;asort($wcr);reset($wcr);
while (list ($p, $val) = each ($wcr)) {
echo '<option value="'.$p.'">'.$val;
}
?>
</select>
</td></tr>

<tr class="table_body"><td width=150>For</td><td>
<select name="seek_purpose">
<option value="">select
<option value="Fun" <?if ($seek_purpose=='Fun'){?>SELECTED<?}?>>Fun
<option value="Friendship" <?if
($seek_purpose=='Friendship'){?>SELECTED<?}?>>Friendship
<option value="Dating" <?if ($seek_purpose=='Dating'){?>SELECTED<?}?>>Dating
<option value="Romance" <?if
($seek_purpose=='Romance'){?>SELECTED<?}?>>Romance
<option value="Long Relationship" <?if ($seek_purpose=='Long
Relationship'){?>SELECTED<?}?>>Long Relationship
</select>
</td></tr>
<tr class="table_body"><td colspan=2>&nbsp;</td></tr>
<tr class="table_body_light"><td colspan=2><b>Optional</b></td></tr>
<?}?>
<?if(REQ_PIC){?>
<tr class="table_body_light"><td width=150>&nbsp;</td><td>
<input type="hidden" name="photo" value="<?=$photo?>">
<?if($photo!=''){?>
<img src="<?=C_URL?>/members/uploads/<?=$photo?>" height="90">
<?}elseif($photo=='' && $gender=='Male'){?>
<img src="<?=C_URL?>/members/uploads/nopic_male.jpg" height="90">
<?}elseif($photo=='' && $gender=='Female'){?>
<img src="<?=C_URL?>/members/uploads/nopic_female.jpg" height="90">
<?}else{?>
<img src="<?=C_URL?>/members/uploads/nopic.gif" height="90">
<?}?>
<br>
<input type="checkbox" name="delete_pic" value="1"> delete photo?
</td></tr>

<tr class="table_body_light"><td width=150>Update Photo/Image</td><td>
<input class="input" type="file" name="file">
</td></tr>
<?}?>
<tr class="table_body"><td width=150>&nbsp;</td><td>
<input type="submit" name="submit" value="Update Details">
</td></tr>
</table>
</td></tr></table><br>
</form>
<?
}
include_once '../templates/footer.php';
?>

-----------------------------------

Her er profil filen ( hvor den skal vises)

<?php
$view_page='profile';
include_once 'includes/config.php';
include 'languages/default/'.C_LANG.'.php';
if(PROFILES>='1'){include_once 'includes/session.php';}
if(!isset($admin) && PROFILES=='2' &&
$p_member!='1'){header("Refresh:0;URL=premium.php");die;}
setcookie("vprofile", $user, 0, "/");
include_once 'templates/header.php';
include_once 'includes/countrys.php';
include 'layout/menu.php';
include 'layout/menubar.php';
if($addusr){$user = $addusr;}

$none = '<i>'.$lang_profile_1.'</i>';

$tmp=mysql_query("SELECT DISTINCT * FROM pro_membersu_privchatf WHERE
usrname = '".$user."' OR id = '".$user."' LIMIT 1");
while($i=mysql_fetch_array($tmp)) {$user=($i['usrname']);$_views =
($i['profile_views'])+1;

if($vprofile!=$user){
$sql = "UPDATE pro_membersu_privchatf set profile_views='$_views' where
usrname='$user'";mysql_query($sql);
}
?>
<table class="table_body" width="900"><tr><td>
<table width="780" border=0><tr><td>
<br>

<!-- page title -->
<table width="780" border="0"><tr><td align="center"><h4>
<?if($add=='1'){?>
<?=$lang_profile_2?>
<?}else{?>
<?}?>
<?if($add!='1'){?>
<?}?>
</table>
<table width="850" height="462" border="0" align="center" cellpadding="20">
<tr><td valign="top" align="left" class="body_text">
<?if ($add == '1' && $pro_id && $pro_name){include 'fav.php';return;}?>

<!-- members profile -->

<?
$_memberid = ($i['id']);
$_membername = ($i['usrname']);
$_memberlevel = ($i['memberlevel']);
$_age = ($i['age']); if($_age=='0'){$_age=' - ';}
$_gender = ($i['gender']);
$_website = ($i['website']);
$_photo = ($i['photo']);
$_location = ($i['location']);
$_aboutme = (nl2br($i['aboutme']));
$_birthday = ($i['birthday']);
$_city = ($i['city']);
$_mar_status = ($i['mar_status']);
$_firstname = ($i['firstname']);
$_lastname = ($i['lastname']);
$seek_age = ($i['seek_age']);
$seek_gender = ($i['seek_gender']);
$seek_purpose = ($i['seek_purpose']);
$seek_location = ($i['seek_location']);

//// CHECK ONLINE STATUS ////
$get_online=mysql_query("SELECT status FROM pro_membersu_privchatd WHERE
membername = '".$user."'");
while($_online=mysql_fetch_array($get_online)) {
$_is_online = ($_online['status']);
if ($_is_online=='Offline'){$_is_online='<font size=1
color=red>'.$_is_online.'</font><img src="off.gif" align=absmiddle height=12
width=12>';}
if ($_is_online=='Online'){$_is_online='<font size=1
color=green>'.$_is_online.'</font><img src="on.gif" align=absmiddle
height=12 width=12>';}
}
?>

<div align=center>
<a href="gallery/?member=<?=$user?>"><?=$lang_profile_5?></a>

<?
if(C_CHAT_MODULE){
if(isset($pro_name) && PRIVATE_CHAT=='1' || isset($pro_name) &&
PRIVATE_CHAT=='2'){?>
<?if(CHAT=='2' && $p_member=='1' || CHAT=='1'){?>
<a href="#"
onClick="window.open('messenger/index.php?rec=<?=$_memberid?>&snd=<?=$pro_id?>&new=1','<?=$_memberid?>','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=600,height=433,left=230,top=200');return
false;"><?=$lang_profile_9?></a> |
<?}else{?>
<a href="premium.php"><?=$lang_profile_9?></a> |
<?}?>
<?}else{?>
<a href="login.php"><?=$lang_profile_9?></a> |
<?}}?>

<?if ($pro_id && $pro_name){?>
<a
href="profile.php?user=<?=$user?>&add=1&addusr=<?=$_membername?>"><?=$lang_profile_10?></a></div>
<?}else{?>
<a href="login.php"><?=$lang_profile_10?></a></div>
<?}?>

<br>

<table align="center" cellspacing="0" width="800" border="0"
cellpadding="0">
<tr>
<td width="80%" height="12" background="images/<?=C_STYLE?>/bg.gif"
class="body_title">
<div class="tl"><div class="tr">&nbsp;<?if ($_memberlevel=='1'){echo
$lang_premium_1;}?></div></div>
</td>
<td align="center" valign="top" width="20%" height="12"
background="images/<?=C_STYLE?>/bg.gif" class="body_title">
<div class="tl"><div class="tr"><?=$_is_online?></div></div>
</td>
</tr>
</table>

<table align=center cellspacing="0" cellpadding="0" border=0 width="800"
class="body_text">
<tr class="table_body"><td class="table_border" width=120 height=100%
valign=top align=left>
<?if($_photo=='' && $_gender==$lang_browse_7){?>
<img src="<?=C_URL?>/members/uploads/nopic_<?=$lang_browse_7s?>.jpg"
height=90 border=0>
<?}elseif($_photo=='' && $_gender==$lang_browse_8){?>
<img src="<?=C_URL?>/members/uploads/nopic_<?=$lang_browse_8s?>.jpg"
height=90 border=0>
<?}elseif($_photo=='' && $_gender==$lang_browse_9a){?>
<img src="<?=C_URL?>/members/uploads/nopic_<?=$lang_browse_9s?>.jpg"
height=90 border=0>
<?}elseif($_photo=='' && $_gender==''){?>
<img src="<?=C_URL?>/members/uploads/nopic.gif" height=90 border=0>
<?}else{?>
<a href="<?=C_URL?>/members/uploads/<?=$_photo?>" target="_blank">
<img src="<?=C_URL?>/members/uploads/<?=$_photo?>" height=90 border=0>
<br></a>
<?}?>

</td><td class="table_body_light" valign=top>

<table align=left cellspacing="0" cellpadding="4" border=0 width="100%"
class="body_text">
<tr><td>
<?
if($_firstname ==''){$_firstname=$none;}
if($_lastname ==''){$_lastname='';}
if($_gender ==''){$gender=$none;}
if($_age ==''){$_age=$none;}
if($_mar_status ==''){$_mar_status=$none;}
if($_birthday ==''){$_birthday=$none;}
if($_city ==''){$_city=$none;}
if($_location ==''){$_location=$none;}
if($_views ==''){$_views='none';}
if($_hobbies ==''){$_hobbies=$none;}
if($_aboutme ==''){$_aboutme=$none;}
?>
<b><?=$lang_profile_11?></b>: <?=$_membername?><br>
<?if (REQ_FN){?><b><?=$lang_profile_12?></b>: <?=$_firstname?>
<?=$_lastname?><br><?}?>
<?if (REQ_GNDR){?><b><?=$lang_profile_13?></b>: <?=$_gender?><br><?}?>
<?if (REQ_AGE){?><b><?=$lang_profile_14?></b>: <?=$_age?><br><?}?>
<?if (REQ_MS){?><b><?=$lang_profile_15?></b>: <?=$_mar_status?><br><?}?>
<?if (REQ_AGE){?><b><?=$lang_profile_16?></b>: <?=$_birthday?><br><?}?>
<?if (REQ_CTY){?><b><?=$lang_profile_17?></b>: <?=$_city?><br><?}?>
<?if (REQ_CTRY){?><b><?=$lang_profile_18?></b>: <?=$_location?><br><?}?>
<?if (REQ_POP){?><b><?=$lang_profile_19?></b>: <?=$_views?><br><?}?>
<?if (REQ_ABME){?><b><?=$lang_profile_21?></b>: <?=$_aboutme?><br><?}?>
<br>
</td><tr>
</table>

<?}?>
</td><tr></table>

<?if(DATING && $seek_gender!=''){?>
<br><br>
<table align=center cellspacing="0" cellpadding="0" border=0 width="800"
class=body_text>
<tr><td align=left>
<b><?=$_membername?></b> <?=$lang_profile_22?></b>: <?=$seek_gender?>,
<?=$lang_profile_23?> <?=$seek_age?> <?=$lang_profile_24?>
<?=$seek_location?> <?=$lang_profile_25?> <?=$seek_purpose?>.
</td><tr>
</table>
<?}?>

<?if (!$_membername || !$user){?>
<table cellspacing="0" height=100% cellpadding="0" border=0 width="800"
class=body_text>
<tr><td colspan="2" align=left class=body_text>
<b><font color=red><?=$lang_profile_26?>:</font></b>
<?=$lang_profile_27?><br>
<a href="<?=C_URL?>/"><?=$lang_profile_28?></a>
</td></tr>
<table>
<?}?>

</table>

</td></tr></table>

</td><td height="151"></tr></table>
<?
include_once 'templates/footer.php';
?>



 
 
zigma.dk (24-12-2008)
Kommentar
Fra : zigma.dk


Dato : 24-12-08 12:19

Hej Søren

Har ikke liget læst hele din kode - skal til juleaften kl 18

Bliver strengen gemt i en database? For det lyder som om det kun er noget af strengen der bliver gemt,
så min tanke er om tabellen er sat korrekt op, til strenge over 150 tegn? Hvis du vil have ubegrænset
data og du f.eks. bruger MySQL, så skal du sikre dig at feltet i tabellen er sat til BLOB og ikke VARCHAR eller lign.

--
Vil du lære at kode HTML, XHTML, CSS, SSI, ASP eller ASP.NET?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! => http://www.html.dk/tutorials

Søren (24-12-2008)
Kommentar
Fra : Søren


Dato : 24-12-08 12:23


"zigma.dk" <zigma@zigma.dk> skrev i meddelelsen
news:49521a88$0$90269$14726298@news.sunsite.dk...
> Hej Søren
>
> Har ikke liget læst hele din kode - skal til juleaften kl 18
>
> Bliver strengen gemt i en database? For det lyder som om det kun er noget
> af strengen der bliver gemt,
> så min tanke er om tabellen er sat korrekt op, til strenge over 150 tegn?
> Hvis du vil have ubegrænset
> data og du f.eks. bruger MySQL, så skal du sikre dig at feltet i tabellen
> er sat til BLOB og ikke VARCHAR eller lign.
>
> --

Ja.. prøvede at skrive 5000 istedet for 250.. Men det hjalp ikke..

Kan jeg bare ændre det til BLOB uden videre.. Og skal det være over det
hele, jeg skal ændre til BLOB?

Søren


Søren (27-12-2008)
Kommentar
Fra : Søren


Dato : 27-12-08 10:08


"zigma.dk" <zigma@zigma.dk> skrev i meddelelsen
news:49521a88$0$90269$14726298@news.sunsite.dk...
> Hej Søren
>
> Har ikke liget læst hele din kode - skal til juleaften kl 18
>
> Bliver strengen gemt i en database? For det lyder som om det kun er noget
> af strengen der bliver gemt,
> så min tanke er om tabellen er sat korrekt op, til strenge over 150 tegn?
> Hvis du vil have ubegrænset
> data og du f.eks. bruger MySQL, så skal du sikre dig at feltet i tabellen
> er sat til BLOB og ikke VARCHAR eller lign.
>

Har prøvet det ned BLOB.. det hjalp ikke..

Mvh Søren


Philip Nunnegaard (27-12-2008)
Kommentar
Fra : Philip Nunnegaard


Dato : 27-12-08 14:42

"zigma.dk" <zigma@zigma.dk> skrev

> så skal du sikre dig at feltet i tabellen er sat til BLOB og ikke VARCHAR
> eller lign.

Jeg spørger sikkert dumt, men er BLOB ikke overkill, hvis det kun er tekst
(og ikke binær data) der skal indsættes i feltet?
Jeg ville nøjes med "text" eller "longtext".


Søren (27-12-2008)
Kommentar
Fra : Søren


Dato : 27-12-08 23:28


"Philip Nunnegaard" <nunnenospam@hitsurf.dk> skrev i meddelelsen
news:495630ac$0$56792$edfadb0f@dtext02.news.tele.dk...
> "zigma.dk" <zigma@zigma.dk> skrev
>
>> så skal du sikre dig at feltet i tabellen er sat til BLOB og ikke VARCHAR
>> eller lign.
>
> Jeg spørger sikkert dumt, men er BLOB ikke overkill, hvis det kun er tekst
> (og ikke binær data) der skal indsættes i feltet?
> Jeg ville nøjes med "text" eller "longtext".

Super.. longtekst viker..

Mange tak

Søren


MooreHojer (24-12-2008)
Kommentar
Fra : MooreHojer


Dato : 24-12-08 12:21

> function textCounter(field, countfield, maxlimit)
> {if (field.value.length > maxlimit) field.value =
> field.value.substring(0, maxlimit);
> else countfield.value = maxlimit - field.value.length;}

Denne funtion tager så vidt jeg kan se inholdet og korter det ned til maxlimit tegn

> <textarea name="aboutme" cols="60" rows="10"
> onKeyDown="textCounter(this.form.aboutme,this.form.remLen,250);"
> onKeyUp="textCounter(this.form.aboutme,this.form.remLen,250);"></textarea>

Her kalder du metoden med 250 som maxlimit...


Søren (24-12-2008)
Kommentar
Fra : Søren


Dato : 24-12-08 12:26


"MooreHojer" <simon@moorehojer.dk> skrev i meddelelsen
news:49521b29$0$90269$14726298@news.sunsite.dk...
>> function textCounter(field, countfield, maxlimit)
>> {if (field.value.length > maxlimit) field.value =
>> field.value.substring(0, maxlimit);
>> else countfield.value = maxlimit - field.value.length;}
>
> Denne funtion tager så vidt jeg kan se inholdet og korter det ned til
> maxlimit tegn
>
>> <textarea name="aboutme" cols="60" rows="10"
>> onKeyDown="textCounter(this.form.aboutme,this.form.remLen,250);"
>> onKeyUp="textCounter(this.form.aboutme,this.form.remLen,250);"></textarea>
>
> Her kalder du metoden med 250 som maxlimit...
>
Ja.. Har prøvet at ændre de 250 til 5000, men det hjalp ikke noget..

Søren


Søg
Reklame
Statistik
Spørgsmål : 177558
Tips : 31968
Nyheder : 719565
Indlæg : 6408920
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste