excuse me for my bad english...
these codes not written by me, i'm just picking up them, and integrating to v2.05 (working to me...)
Find:
//make first member admin
if ($numsitemembers == '0')
$signupclass = '7';
else
$signupclass = '1';
Add after:
Many thanks all of you guys! For this code parts, and all of mods & hacks...
This work based on Phoenix_UK's code
[url="http://www.torrenttrader.pw/index.php?showtopic=4591&hl=birthday"]http://www.torrenttrader.pw/index.php?sho...amp;hl=birthday[/url]
these codes not written by me, i'm just picking up them, and integrating to v2.05 (working to me...)
ALTER TABLE `users` ADD dob DATE NOT NULL default '0000-00-00';open account-signup.phpFind:
//make first member admin
if ($numsitemembers == '0')
$signupclass = '7';
else
$signupclass = '1';
Add after:
$dob = $year."-".$month."-".$day;
$updateset[] = "dob = '$dob'";
Find:
$ret = mysql_query("INSERT INTO users (username, password, secret, email, status, added, age, country, gender, client, stylesheet, language, class) VALUES (" .
implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["default_language"], $signupclass))).")");
Replace with this:
$ret = mysql_query("INSERT INTO users (username, password, secret, email, status, added, dob, country, gender, client, stylesheet, language, class) VALUES (" .
implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), $dob, $country, $gender, $client, $site_config["default_theme"], $site_config["default_language"], $signupclass))).")");
Find:
<tr>
<td>Age:</td>
<td><input type="text" size="40" name="age" maxlength="3" /></td>
</tr>
Add after (or replace with this...)
<tr>
<?php
echo "<tr><td><b><font color=FF0000>Date of birth: </font></b></td><td valign=\"top\" align=left>";
list($year,$month,$day) = explode('-',$CURUSER['dob']);
echo "<select name='year'>\n";
echo "<option value='0'>--</option>\n";
for ($y=1909;$y<=date('Y');$y++) {
$s = $y == $year ? 'selected' : '';
echo "<option value='$y' $s>$y</option>\n";
}
echo "</select>\n";
echo "<select name='month'>\n";
echo "<option value='0'>--</option>\n";
for ($m=1;$m<=12;$m++) {
$s = ($m == $month ? 'selected' : '');
printf("<option value='$m' $s>%s</option>\n",date("F", mktime(0,0,0,$m,1,1970)));
}
echo "</select>\n";
echo "<select name='day'>\n";
echo "<option value='0'>--</option>\n";
for ($d=1;$d<=31;$d++) {
$s = $d == $day ? 'selected' : '';
echo "<option value='$d' $s>$d</option>\n";
}
echo "</select></td></tr>";
?>
save & upload
open account.php
Find:
<?php print("<B>".AGE.""); ?>:</b> <? print("" . $CURUSER["age"] . "\n"); ?><br>
Add after (or replace with this...)
<?php print("<B>Date of birth: </b>");
list($year,$month,$day) = explode('-',$CURUSER["dob"]);
print(" ".$year."-".$month."-".$day); ?><br>
save & upload
open account-details.php
Find:
<td align="left">
Age: <?php=htmlspecialchars($user["age"])?><br>
Add after (or replace with this...)
Date of birth: <?list($year,$month,$day) = explode('-',$user['dob']);
print("".$year."-".$month."-".$day."");?><br>save & uploadMany thanks all of you guys! For this code parts, and all of mods & hacks...
This work based on Phoenix_UK's code
[url="http://www.torrenttrader.pw/index.php?showtopic=4591&hl=birthday"]http://www.torrenttrader.pw/index.php?sho...amp;hl=birthday[/url]