Timer

kollegah
Topics: 11
Posts: 29
Rep: 10
Hey i have seen that the timers in the databse is like this: UT_Time: 1396947242

ok but if i want to set a user in jail for 15 hours how do i gona do it throu the database? how do i know what the 1396947242 mean?

hope you guys udnerstand my bad english :)

2014-04-08 09:22:10
Chris Day
Topics: 9
Posts: 71
Rep: 32
Times are stored as time stamps, to convert them you can use http://www.unixtimestamp.com/index.php

but to set the jail time to 15 hours you can use this code

$userjail = new user($userID);
$userJail->updateTimer("jail", (time() = (15*60*60)));
2014-04-08 09:30:42
Chris Day
Topics: 9
Posts: 71
Rep: 32
sorry
$userjail = new user($userID);

$userJail->updateTimer("jail", (time() + (15*60*60)));
2014-04-08 09:31:07
kollegah
Topics: 11
Posts: 29
Rep: 10
thank you Chris :)

and also if you could help me whit moving only the "Action" meny to right side how do im gona do it?
im trying to learn coding :)
2014-04-08 10:40:34
Chris Day
Topics: 9
Posts: 71
Rep: 32
What action menu?
2014-04-08 11:20:25
kollegah
Topics: 11
Posts: 29
Rep: 10
yea i want to move the action menu to right side :P http://vvcap.net/db/KY9AJXe7rzK2nsSQQFb_.htp
cause now its on the left side and i want it over to the right side :) but the other menu under it i want to be at the left side :)
2014-04-08 13:50:10
Chris Day
Topics: 9
Posts: 71
Rep: 32
Open up /template/default/loggedin.php and replace it with this

<?php

class mainTemplate {

public $pageMain = '<!DOCTYPE html>
<html>
<head>
<link href="template/default/css/bootstrap.min.css" rel="stylesheet" />
<link href="template/default/css/style.css" rel="stylesheet" />
<link rel="shortcut icon" href="template/default/images/icon.png" />
<title>{game_name} - {page}</title>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-12 header text-center">
<img src="template/default/images/logo.png" alt="Gangster Legends" />
</div>
</div>

<div class="row">
<div class="col-md-12 sub-header hidden-xs">

<div class="row">
<div class="col-md-3 col-sm-3 sub-header"><strong>Money:</strong> {money}</div>
<div class="col-md-3 col-sm-3 sub-header"><strong>Bullets:</strong> {bullets}</div>
<div class="col-md-3 col-sm-3 sub-header"><strong>Rank:</strong> {rank} {exp_perc}</div>
<div class="col-md-3 col-sm-3 sub-header"><strong>Family:</strong> {gang}</div>
</div>

</div>
<div class="col-md-12 sub-header timers hidden-xs">
<div class="row">
<div class="col-md-2 col-sm-2" data-timer-type="name" data-timer="{crime_timer}">
<a href="?page=crimes">
<span>Crime</span><span></span>
</a>
</div>
<div class="col-md-2 col-sm-2" data-timer-type="name" data-timer="{theft_timer}">
<a href="?page=theft">
<span>Theft</span><span></span>
</a>
</div>
<div class="col-md-2 col-sm-2" data-timer-type="name" data-timer="{chase_timer}">
<a href="?page=policeChase">
<span>Police Chase</span><span></span>
</a>
</div>
<div class="col-md-2 col-sm-2" data-timer-type="name" data-timer="{jail_timer}">
<a href="#">
<span>Jail</span><span></span>
</a>
</div>
<div class="col-md-2 col-sm-2" data-timer-type="name" data-timer="{bullet_timer}">
<a href="?page=bullets">
<span>Bullet Factory</span><span></span>
</a>
</div>
<div class="col-md-2 col-sm-2" data-timer-type="name" data-timer="{travel_timer}">
<a href="?page=travel">
<span>Travel</span><span></span>
</a>
</div>
</div>

</div>
</div>

<div class="row padding">

<div class="col-md-3 navigation text-center">
<div class="panel panel-danger">
<div class="panel-heading">
{location}
</div>
<div class="panel-body hidden-xs">
<a href="?page=bullets">Bullet Factory</a><br />
<a href="?page=bank">Bank</a><br />
<a href="?page=travel">Travel</a> <br />
<a href="?page=garage">Garage</a> <br />
<!--Search <br />
Jail-->
</div>
</div>
<div class="panel panel-danger">
<div class="panel-heading">
Family
</div>
<div class="panel-body hidden-xs">
<a href="?page=gang">My Family</a>
{family_links}
</div>
</div>
<div class="panel panel-danger">
<div class="panel-heading">
Account
</div>
<div class="panel-body hidden-xs">
<a href="?page=profile">My Profile</a><br />
<a href="?page=usersOnline">Users Online</a><br />
<a href="?page=leaderboards">Leaderboards</a><br />
<a href="?page=logout">Logout</a>
</div>
</div>
</div>

<div class="col-md-6">
<div class="panel panel-danger">
<div class="panel-heading">
{page}
</div>
<div class="panel-body text-center">
{game}
</div>
</div>
</div><div class="col-md-3 navigation text-center">
<div class="panel panel-danger">
<div class="panel-heading">
Actions
</div>
<div class="panel-body hidden-xs">
<a href="?page=crimes">Crimes </a> <br />
<a href="?page=theft">Theft</a><br />
<a href="?page=policeChase">Police Chase</a><br />
<!--Organised Crime<br />
Murder-->
</div>
</div>
</div>
</div>
</div>

<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<!--<script src="template/default/js/bootstrap.min.js"></script>-->
<script src="template/default/js/timer.js"></script>
<script src="template/default/js/mobile.js"></script>
</body>
</html>';

}

?>
2014-04-08 15:50:58
kollegah
Topics: 11
Posts: 29
Rep: 10
thank you so much chris :) (y)
2014-04-08 16:27:37
Chris Day
Topics: 9
Posts: 71
Rep: 32
no problem :)
2014-04-08 18:47:55