[CMS/PHP Code] Jobs Rank Page Link?

Kurth

New Member
Jun 18, 2012
28
2
Hi there,

I am using this code below, and wondering what the links are to the Promote, Demote & Fire links?

Thanks for your help in advance,
Kurt-Brown



<?php
$getUsers = mysql_query("SELECT * FROM users WHERE secure_id = '".$rankInfo['id']."'");
?>
<div class="contentBox">
<div class="boxHeader">
Employees(<?php echo mysql_num_rows($getUsers); ?>)
</div>

<p class="credits-countries-select">
<?php
while($Users = mysql_fetch_array($getUsers)) {
echo '<img src=" " align="left">
<strong><a href="#">'.$Users['name'].'</a></strong><br />'.$Users['mission'].'<br /><br />Last visit: '.$Users['lastvisit'].'<br /><a href="#">Promote</a> | <a href="#">Demote</a> | <a href="#">Fire</a><br /><br />';
}
?>
</p>
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,132
2,456
Wouldn't make much difference by telling you, as its the same code for most CMS's, but I'm both using iPorn's and PHPRetro RP Edit by Rasta.


All the best.
Ofcourse it makes a difference... every code is different, same as the pages. I don't think those CMS's have such a page to do so. But the code is easy to make tho.
 

Kurth

New Member
Jun 18, 2012
28
2
Hiya,

Below is the C# code which is used to fire people in-game. I would like to use this code to fire people within the CMS, using PHP.

Could anyone help me with this?

Thanks in advance,
Kurt


#region :fire <user>
case "fire":
case "dismiss":
{
int myCorp;
int getCorp;
virtualUser User = userManager.getUser(args[1]);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
myCorp = dbClient.getInt("SELECT corp_id FROM users WHERE name = '" + _Username + "'");
getCorp = dbClient.getInt("SELECT corp_id FROM users WHERE name = '" + User._Username + "'");
}
if (myCorp == getCorp)
{
int myRank;
int getRank;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
myRank = dbClient.getInt("SELECT job_rank FROM users WHERE name = '" + _Username + "'");
getRank = dbClient.getInt("SELECT job_rank FROM users WHERE name = '" + User._Username + "'");
}
if (myRank > getRank)
{
int myJob;
int myAuth;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
myJob = dbClient.getInt("SELECT secure_id FROM users WHERE name = '" + _Username + "'");
myAuth = dbClient.getInt("SELECT manager_rank FROM jobs_ranks WHERE id = '" + myJob + "'");
}
if (myAuth > 1)
{
int isWorking;
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
isWorking = dbClient.getInt("SELECT working FROM users WHERE name = '" + User._Username + "'");
dbClient.runQuery("UPDATE users SET corp_id = '0', job_rank = '0', secure_id = '0', working = '0' WHERE name = '" + User._Username + "'");
}
Room.sendSaying(roomUser, "*fires " + User._Username + " from their job*");
User.refreshAppearance(true, true, true);
if (isWorking == 1)
{
User.workLooper.Abort();
User.workLooper = null;
}
}
}
}
break;
}
#endregion
 

Users who are viewing this thread

Top