Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > FreeTSP
Reply
  #1  
Old 12th June 2014, 20:36
graaf graaf is offline
Senior Member
 
Join Date: Jun 2014
Posts: 17
Default Hide donate star
I have see this in u-232 and trying to add this in FreeTSP v1 but there is some little problems.. If someone can help me?

Code:
  1. ALTER TABLE `users` ADD `donorstar` TINYINT(1) NOT NULL DEFAULT '1';
function_user.php

PHP Code:
$str .= ($user['donor'] == 'yes' && $user['donorstar'] == '<img src="'.$image_dir.'donor.png" alt="" title="" />' ''); 
altusercp.php

PHP Code:
print ("<tr>
<td class='rowhead_form' align='center'>Hide donor star</td>
<td class='rowhead' align='left'>
<input type='radio' name='donorstar' value='1'"
.($CURUSER["donorstar"] == "1" " checked='checked'" "")." />Yes
<input type='radio' name='donorstar' value='0'"
.($CURUSER["donorstar"] == "0" " checked='checked'" "")." />No
</td></tr>"
); 
takeeditaltusercp.php

PHP Code:
if (isset($_POST["donorstar"]) && ($donorstar $_POST["donorstar"]) != $CURUSER["donorstar"]) {
                
$updateset[] = "donorstar= ".sqlesc($donorstar);
                } 
Reply With Quote
  #2  
Old 26th June 2014, 00:34
rushed rushed is offline
Member
 
Join Date: Feb 2012
P2P
Posts: 3
Default
try this

Code:
 alter table users add donorstar enum('yes,'no') NOT NULL DEFAULT 'yes';
Code:
$str .= ($user['donor'] == 'yes' && $user['donorstar'] == yes ? '<img src="'.$image_dir.'donor.png" alt="" title="" />' : '');
Code:
print ("<tr>
<td class='rowhead_form' align='center'>Hide donor star</td>
<td class='rowhead' align='left'>
<input type='radio' name='donorstar' value='yes'".($CURUSER["donorstar"] == "yes" ? " checked='checked'" : "")." />Yes
<input type='radio' name='donorstar' value='no'".($CURUSER["donorstar"] == "no" ? " checked='checked'" : "")." />No
</td></tr>");
Code:
if (isset($_POST["donorstar"]) && ($donorstar = $_POST["donorstar"]) != $CURUSER["donorstar"]) {
                $updateset[] = "donorstar= ".sqlesc($donorstar);
                }
Reply With Quote
Reply

Tags
donate , hide , star

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 20:25. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.