mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-07-26 09:42:01 -07:00
Merge remote-tracking branch 'sanky/dateformat-fix' into develop
This commit is contained in:
@@ -143,6 +143,10 @@
|
||||
$tccellh> Options</td>$tccellh> <tr>
|
||||
$tccell1><b>Timezone offset:$descbr How many hours you're offset from the time on the board (".date($dateformat,ctime()).").</td>
|
||||
$tccell2l>$inpt=timezone VALUE=$loguser[timezone] SIZE=5 MAXLENGTH=5><tr>
|
||||
$tccell1><b>Date format:$descbr How dates on the board are displayed (uses the <a href='http://php.net/manual/en/function.date.php'>PHP date()</a> function).</td>
|
||||
$tccell2l>$inpt=dateformat VALUE=\"$dateformat\" SIZE=16 MAXLENGTH=32><tr>
|
||||
$tccell1><b>Short date format:$descbr A short date format displayed on certain pages.</td>
|
||||
$tccell2l>$inpt=dateshort VALUE=\"$dateshort\" SIZE=8 MAXLENGTH=32><tr>
|
||||
$tccell1><b>Posts per page:$descbr The maximum number of posts you want to be shown in a page in threads.</td>
|
||||
$tccell2l>$inpt=postsperpage SIZE=4 MAXLENGTH=4 VALUE=$loguser[postsperpage]><tr>
|
||||
$tccell1><b>Threads per page:$descbr The maximum number of threads you want to be shown in a page in forums.</td>
|
||||
@@ -214,7 +218,10 @@
|
||||
}
|
||||
if(!isset($useranks)) $useranks=$loguser[useranks];
|
||||
|
||||
mysql_query("UPDATE users SET `password` = '$passwordenc', `picture` = '$picture', `minipic` = '$minipic', `signature` = '$signature', `bio` = '$bio', `email` = '$email', `icq` = '$icq', `title` = '$title', `useranks` = '$useranks', `aim` = '$aim', `sex` = '$sex', `homepageurl` = '$homepage', `homepagename` = '$pagename', `timezone` = '$timezone', `postsperpage` = '$postsperpage', `realname` = '$realname', `location` = '$location', `postbg` = '$postbg', `postheader` = '$postheader', `birthday` = '$birthday', `scheme` = '$sscheme', `threadsperpage` = '$threadsperpage', `viewsig` = '$viewsig', `layout` = '$tlayout', `moodurl` = '". $_POST['moodurl'] ."', `posttool` = '$posttool', `imood` = '$imood', `signsep` = '$signsep', `pagestyle` = '$pagestyle', `pollstyle` = '$pollstyle' WHERE `id` = '$loguserid' AND `password` = '$userpass'") OR print mysql_error();
|
||||
$dateformat = str_replace("'", "", $_POST['dateformat']);
|
||||
$dateshort = str_replace("'", "", $_POST['dateshort']);
|
||||
|
||||
mysql_query("UPDATE users SET `password` = '$passwordenc', `picture` = '$picture', `minipic` = '$minipic', `signature` = '$signature', `bio` = '$bio', `email` = '$email', `icq` = '$icq', `title` = '$title', `useranks` = '$useranks', `aim` = '$aim', `sex` = '$sex', `homepageurl` = '$homepage', `homepagename` = '$pagename', `timezone` = '$timezone', `dateformat` = '$dateformat', `dateshort` = '$dateshort', `postsperpage` = '$postsperpage', `realname` = '$realname', `location` = '$location', `postbg` = '$postbg', `postheader` = '$postheader', `birthday` = '$birthday', `scheme` = '$sscheme', `threadsperpage` = '$threadsperpage', `viewsig` = '$viewsig', `layout` = '$tlayout', `moodurl` = '". $_POST['moodurl'] ."', `posttool` = '$posttool', `imood` = '$imood', `signsep` = '$signsep', `pagestyle` = '$pagestyle', `pollstyle` = '$pollstyle' WHERE `id` = '$loguserid' AND `password` = '$userpass'") OR print mysql_error();
|
||||
|
||||
print "$header<br>$tblstart$tccell1>Thank you, $loguser[name], for editing your profile.<br>".redirect("profile.php?id=$loguserid",'view your profile',0).$tblend;
|
||||
}
|
||||
|
20
edituser.php
20
edituser.php
@@ -45,8 +45,8 @@
|
||||
$sexlist="
|
||||
$radio=sex value=0 $check2[0]>Male   
|
||||
$radio=sex value=1 $check2[1]>Female   
|
||||
$radio=sex value=2 $check2[2]>N/A
|
||||
$radio=sex value=-378>Raw value<br>
|
||||
$radio=sex value=2 $check2[2]>N/A
|
||||
$radio=sex value=-378>Raw value<br>
|
||||
$inpt=sexn value=$user[sex]>";
|
||||
$vsig="
|
||||
$radio=viewsig value=0 $checked2[0]>Disabled   
|
||||
@@ -139,6 +139,8 @@
|
||||
$lft Homepage URL $rgt$inpt=homepage VALUE=\"$user[homepageurl]\" SIZE=60 MAXLENGTH=80>
|
||||
$hlft Options $hrgt
|
||||
$lft Timezone offset $rgt$inpt=timezone SIZE=5 MAXLENGTH=5 VALUE=$user[timezone]>
|
||||
$lft Date format $rgt$inpt=dateformat VALUE=\"$dateformat\" SIZE=16 MAXLENGTH=32>
|
||||
$lft Short date format $rgt$inpt=dateshort VALUE=\"$dateshort\" SIZE=8 MAXLENGTH=32>
|
||||
$lft Posts per page $rgt$inpt=postsperpage SIZE=5 MAXLENGTH=5 VALUE=$user[postsperpage]>
|
||||
$lft Threads per page $rgt$inpt=threadsperpage SIZE=4 MAXLENGTH=4 VALUE=$user[threadsperpage]>
|
||||
$lft Use text toolbar when posting $rgt$vtool
|
||||
@@ -161,11 +163,15 @@
|
||||
$birthday=@mktime(0,0,0,$bmonth,$bday,$byear);
|
||||
if(!$bmonth && !$bday && !$byear) $birthday=0;
|
||||
if($password) $passedit=", `password` = '".md5($password)."'";
|
||||
//mysql_query("INSERT logs SET useraction ='Edit User ".$user[nick]."(".$user[id]."'");
|
||||
if ($sex == -378) {
|
||||
$sex = $sexn;
|
||||
//mysql_query("INSERT logs SET useraction ='Edit User ".$user[nick]."(".$user[id]."'");
|
||||
if ($sex == -378) {
|
||||
$sex = $sexn;
|
||||
}
|
||||
mysql_query("UPDATE `users` SET `posts` = '$numposts', `regdate` = '$regtime', `name` = '$username'$passedit, `picture` = '$picture', `signature` = '$signature', `bio` = '$bio', `powerlevel` = '$powerlevel', `title` = '$usertitle', `email` = '$email', `icq` = '$icq', `aim` = '$aim', `sex` = '$sex', `homepageurl` = '$homepage', `timezone` = '$timezone', `postsperpage` = '$postsperpage', `realname` = '$realname', `location` = '$location', `postbg` = '$postbg', `postheader` = '$postheader', `useranks` = '$useranks', `birthday` = '$birthday', `minipic` = '$minipic', `homepagename` = '$pagename', `scheme` = '$sscheme', `threadsperpage` = '$threadsperpage', `viewsig` = '$viewsig', `layout` = '$tlayout', `posttool` = '$posttool', `moodurl` = '$moodurl', `profile_locked` = '$profile_locked', `editing_locked` = '$editing_locked' WHERE `id` = '$userid'") or print mysql_error();
|
||||
|
||||
$dateformat = str_replace("'", "", $_POST['dateformat']);
|
||||
$dateshort = str_replace("'", "", $_POST['dateshort']);
|
||||
|
||||
mysql_query("UPDATE `users` SET `posts` = '$numposts', `regdate` = '$regtime', `name` = '$username'$passedit, `picture` = '$picture', `signature` = '$signature', `bio` = '$bio', `powerlevel` = '$powerlevel', `title` = '$usertitle', `email` = '$email', `icq` = '$icq', `aim` = '$aim', `sex` = '$sex', `homepageurl` = '$homepage', `timezone` = '$timezone', `dateformat` = '$dateformat', `dateshort` = '$dateshort', `postsperpage` = '$postsperpage', `realname` = '$realname', `location` = '$location', `postbg` = '$postbg', `postheader` = '$postheader', `useranks` = '$useranks', `birthday` = '$birthday', `minipic` = '$minipic', `homepagename` = '$pagename', `scheme` = '$sscheme', `threadsperpage` = '$threadsperpage', `viewsig` = '$viewsig', `layout` = '$tlayout', `posttool` = '$posttool', `moodurl` = '$moodurl', `profile_locked` = '$profile_locked', `editing_locked` = '$editing_locked' WHERE `id` = '$userid'") or print mysql_error();
|
||||
print "
|
||||
$tblstart
|
||||
$tccell1>Thank you, $loguser[name], for editing this user.<br>
|
||||
@@ -174,4 +180,4 @@
|
||||
}
|
||||
print $footer;
|
||||
printtimedif($startingtime);
|
||||
?>
|
||||
?>
|
||||
|
@@ -841,6 +841,8 @@ CREATE TABLE IF NOT EXISTS `users` (
|
||||
`lastexp` bigint(20) NOT NULL,
|
||||
`lastannouncement` int(11) NOT NULL,
|
||||
`fancy_js` tinyint(1) unsigned NOT NULL default '0',
|
||||
`dateformat` VARCHAR(32) NOT NULL,
|
||||
`dateshort` VARCHAR(32) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `posts` (`posts`),
|
||||
KEY `name` (`name`),
|
||||
|
@@ -128,6 +128,8 @@
|
||||
$tzoff=$loguser[timezone]*3600;
|
||||
$scheme=$loguser[scheme];
|
||||
$log=1;
|
||||
$dateformat=$loguser['dateformat'];
|
||||
$dateshort=$loguser['dateshort'];
|
||||
if ($loguser['powerlevel'] < 0) mysql_query("UPDATE `users` SET `lol` = '$logpassword' WHERE `id` = '$loguserid'");
|
||||
$hacks['comments'] = mysql_result(mysql_query("SELECT COUNT(*) FROM `users_rpg` WHERE `uid` = '$loguserid' AND (`eq6` = '71' OR `eq6` = '238' OR `eq6` = '43')"), 0);
|
||||
if ($loguser['id'] == 1) $hacks['comments'] = true;
|
||||
|
@@ -27,8 +27,12 @@
|
||||
// if($forumid==30) $boardtitle = "<a href='./'><img src=\"images/poniecentral.gif\" title=\"YAAAAAAAAAAY\"></a>";
|
||||
// end PONIES!!!
|
||||
|
||||
$dateformat='m-d-y h:i:s A';
|
||||
$dateshort='m-d-y';
|
||||
if(!$loguserid || $dateformat == "") {
|
||||
$dateformat='m-d-y h:i:s A';
|
||||
$dateshort='m-d-y';
|
||||
}
|
||||
|
||||
if (isset($_GET['dateformat'])) $dateformat = $_GET['dateformat'];
|
||||
|
||||
$race=postradar($loguserid);
|
||||
|
||||
|
2
update.sql
Normal file
2
update.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `users` ADD `dateformat` VARCHAR( 32 ) NOT NULL ,
|
||||
ADD `dateshort` VARCHAR( 32 ) NOT NULL
|
Reference in New Issue
Block a user