[HELP] RevCMS Mysql Coding Help Needed [HELP]

Zac

echo "Graphic Designer";
Feb 13, 2015
90
6
Hello,
I have recently coded a former staff page.
Yes i know, it does look like fresh hotels but i promise you it's not.

Anyway I need help with the mysql coding for the tickets and bans for the former staff. If someone can provide me with a mysql code which will show the tickets and bans which the former staff did perform then that will be great.

It currently shows the users only having one ticket and no bans when i see in the database that some have more than others!

You must be registered for see images attach


Thanks. P.S. I am on my phone in bed lmao.
!
 
Hello,
I have recently coded a former staff page.
Yes i know, it does look like fresh hotels but i promise you it's not.

Anyway I need help with the mysql coding for the tickets and bans for the former staff. If someone can provide me with a mysql code which will show the tickets and bans which the former staff did perform then that will be great.

It currently shows the users only having one ticket and no bans when i see in the database that some have more than others!

You must be registered for see images attach


Thanks. P.S. I am on my phone in bed lmao.
!
 

rent

Member
Sep 24, 2012
408
67
It is like freshs but you ruined it :L
you got it from the Fresh UberCMS leaked release :p
From my hotel:
26PctRU.png
 

Zac

echo "Graphic Designer";
Feb 13, 2015
90
6
It is like freshs but you ruined it :L
you got it from the Fresh UberCMS leaked release :p
From my hotel:
26PctRU.png
I actually didn't. I found a CMS on hee which had it in along with many other cool things.
 
Can we see the page code?
Here is the current code:
</div>
<div id="container">
<div id="content" style="position: relative" class="clearfix">
<?php
$q = mysql_query("SELECT * FROM users WHERE exstaff = '1'");
while ($m = mysql_fetch_array($q)) { ?>
<div style="float:left">
<div class="habblet-container " style="width:193px;">
<div class="cbb clearfix green">
<h2 class="title"> <?php echo $m['username']; ?></h2>
<div style="padding:1px;height:150px;">
<center><br>
<span style="font-size:10px">
<img style = "margin-top:-15px;" src=" echo $m['look']; ?>&direction=2&head_direction=3&gesture=sml&size=m"/>
<?php
$Bans = mysql_query("SELECT * FROM bans WHERE added_by = '" . $Users['username'] . "'");
$BanCount = mysql_num_rows($Bans);


$Tickets = mysql_query("SELECT * FROM moderation_tickets WHERE moderator_id = '" . $Users['id'] . "'");
$TicketsCount = mysql_num_rows($Tickets);
?>
<p>
<?php
echo "<br />Bans: <strong>$BanCount</strong> <br> Tickets: <strong>$TicketsCount</strong>
";
?>
</span>
</center>
</div>
 

rent

Member
Sep 24, 2012
408
67
Try this:

<?php
$getMod = mysql_query("SELECT moderator_id FROM moderation_tickets GROUP BY moderator_id");
while($showMod = mysql_fetch_array($getMod))
{
$getUsers = mysql_fetch_array(mysql_query("SELECT username, look FROM users WHERE id =". $showMod['moderator_id']." AND `rank` < 5 LIMIT 1"));
if($getUsers != null)
{
$getCFHs = mysql_num_rows(mysql_query("SELECT null FROM moderation_tickets WHERE moderator_id = ". $showMod['moderator_id'] .""));
$getBANs = mysql_num_rows(mysql_query("SELECT null FROM bans WHERE added_by = '". $getUsers['username'] ."'"));
echo '
<div style="float:left">
<div class="habblet-container " style="width:200px;">
<div class="cbb clearfix blue ">
<h2 class="title"> ', $getUsers['username'] ,'</h2>
<div style="padding:5px">
<center>
<img src=" ', $getUsers['look'] ,'&size=b&direction=2&head_direction=3&gesture=sml&size=m"/><br><br>
Tickets: <b>', number_format($getCFHs) ,'</b><br/>Bans: <b>', number_format($getBANs) ,'</b>
</center>
</div>
</div>
</div>
</div>
';
}
}
?>
 

Zac

echo "Graphic Designer";
Feb 13, 2015
90
6
Try this:

<?php
$getMod = mysql_query("SELECT moderator_id FROM moderation_tickets GROUP BY moderator_id");
while($showMod = mysql_fetch_array($getMod))
{
$getUsers = mysql_fetch_array(mysql_query("SELECT username, look FROM users WHERE id =". $showMod['moderator_id']." AND `rank` < 5 LIMIT 1"));
if($getUsers != null)
{
$getCFHs = mysql_num_rows(mysql_query("SELECT null FROM moderation_tickets WHERE moderator_id = ". $showMod['moderator_id'] .""));
$getBANs = mysql_num_rows(mysql_query("SELECT null FROM bans WHERE added_by = '". $getUsers['username'] ."'"));
echo '
<div style="float:left">
<div class="habblet-container " style="width:200px;">
<div class="cbb clearfix blue ">
<h2 class="title"> ', $getUsers['username'] ,'</h2>
<div style="padding:5px">
<center>
<img src=" ', $getUsers['look'] ,'&size=b&direction=2&head_direction=3&gesture=sml&size=m"/><br><br>
Tickets: <b>', number_format($getCFHs) ,'</b><br/>Bans: <b>', number_format($getBANs) ,'</b>
</center>
</div>
</div>
</div>
</div>
';
}
}
?>
That didn't work but you did get it working for me yesterday and I thank you for that!:)
 

Users who are viewing this thread

Top