"SJC2TK, post: 73821":yeh , no T function in 2.05 i still use :angry:
if(!$imgtype['mime']){
show_error_msg(("FAILED"), 'file is not an image');
}elseif(
$imgtype['mime'] = 'image/gif' |
$imgtype['mime'] = 'image/jpeg' |
$imgtype['mime'] = 'image/png' |
$imgtype['mime'] = 'image/psd' |
$imgtype['mime'] = 'image/bmp' |
$imgtype['mime'] = 'image/tiff' |
$imgtype['mime'] = 'image/tiff' |
$imgtype['mime'] = 'image/jp2' |
$imgtype['mime'] = 'image/iff' |
$imgtype['mime'] = 'image/vnd.wap.wbmp' |
$imgtype['mime'] = 'image/xbm' |
$imgtype['mime'] = 'image/vnd.microsoft.icon'
){
$userbg = $_POST["userbg"];
}else{
show_error_msg(("FAILED"), 'file is not an image');
}this is the right code according to my first post.$userbg = $_POST["userbg"];if(!$imgtype['mime']){
show_error_msg(("FAILED"), 'file is not an image');
}elseif(
$imgtype['mime'] = 'image/gif' |
$imgtype['mime'] = 'image/jpeg' |
$imgtype['mime'] = 'image/png' |
$imgtype['mime'] = 'image/psd' |
$imgtype['mime'] = 'image/bmp' |
$imgtype['mime'] = 'image/tiff' |
$imgtype['mime'] = 'image/tiff' |
$imgtype['mime'] = 'image/jp2' |
$imgtype['mime'] = 'image/iff' |
$imgtype['mime'] = 'image/vnd.wap.wbmp' |
$imgtype['mime'] = 'image/xbm' |
$imgtype['mime'] = 'image/vnd.microsoft.icon'
){
$userbg = $_POST["fundo"];
}else{
show_error_msg(("FAILED"), 'file is not an image');
} "djhowarth, post: 73775":Its not really a secure mod...
You should at least check its a valid image / check the extenstion
" by the link of other background image you want.ALTER TABLE `users` ADD `userbg` VARCHAR( 500 ) NOT NULL DEFAULT ''Now, in your main theme folder open header.phpstyle="background: url(<?=$userbg2?>) 50% no-repeat fixed;"
after
<BODY
and after
</head>
add
<?
$id = $CURUSER['id'];
$get = mysql_query("SELECT * FROM users WHERE id=$id") or die(mysql_error());
$got = mysql_fetch_array($get);
$userbg = $got['userbg'];
if ($userbg == '')
$userbg2 = "http://demo.dzinerstudio.com/smf2/Themes/zone99_20/images/custom/body_bg.jpg";
else
$userbg2 = $userbg;
?>
or you can replace "print("<TR><TD align=right class=table_col2><B>" . AVATAR_URL . ":</b> </td><TD align=left class=table_col2><input name=avatar size=50 value=\"" . htmlspecialchars($CURUSER["avatar"]) .
"\"><br />\n<i>Link to your externally hosted avatar image: 80x80px</i></td></tr>");
and after add
print("<TR><TD align=right class=table_col2><B>Background:</b> </td><TD align=left class=table_col2><input name=userbg size=50 value=\"" . htmlspecialchars($CURUSER["userbg"]) .
"\"><br />\n<i>Link to your externally hosted background image.</i></td></tr>");
Now find
$avatar = $_POST["avatar"];
and after add
if(!$imgtype['mime']){
show_error_msg(("FAILED"), 'file is not an image');
}elseif(
$imgtype['mime'] = 'image/gif' |
$imgtype['mime'] = 'image/jpeg' |
$imgtype['mime'] = 'image/png' |
$imgtype['mime'] = 'image/psd' |
$imgtype['mime'] = 'image/bmp' |
$imgtype['mime'] = 'image/tiff' |
$imgtype['mime'] = 'image/tiff' |
$imgtype['mime'] = 'image/jp2' |
$imgtype['mime'] = 'image/iff' |
$imgtype['mime'] = 'image/vnd.wap.wbmp' |
$imgtype['mime'] = 'image/xbm' |
$imgtype['mime'] = 'image/vnd.microsoft.icon'
){
$userbg = $_POST["userbg"];
}else{
show_error_msg(("FAILED"), 'file is not an image');
}
Then find
$updateset[] = "avatar = " . sqlesc($avatar);
and add after
$updateset[] = "userbg = " . sqlesc($userbg);"buzz_me, post: 72609":how to add only donated member not counting download?
if ($user["donated"] > 0)
$downthis = 0;"blastro, post: 62843":thx m8 but its show the same mine stats by all mine user
i have this code in mine account-details.php
<? print("<B>".SIGNATURE.""); ?>:</b><?=$usersignature?>
<? print("<B>IP:</b> " . $CURUSER["ip"] . "\n"); ?><br>
</td></tr>
</table>
<BR><BR>After add:<?$SITEURL = $site_config["SITEURL"];
$SITENAME = $site_config["SITENAME"];
echo "<table align=center>";
echo "<div align=center><img border=0 src=$SITEURL/torrentbar/bar.php/" . $CURUSER["id"] . ".png></div><hr>";
echo "<tr>
<td><div align='center'><br>
Copy BB Code:<br>
<textarea cols='90' rows='2'>[url=$SITEURL][img]$SITEURL/torrentbar/bar.php/" . $CURUSER["id"] . ".png[/img][/url]</textarea>
</div></td></tr><tr>
<td><div align='center'><br>
Copy HTML:<br>
<textarea cols='90' rows='2'><a href='$SITEURL'><img border=0 src='$SITEURL/torrentbar/bar.php/" . $CURUSER["id"] . ".png' title='$SITENAME' border=0></a></textarea>
</div></td>
</tr></table>";?>