Jump to content

Discounts To Subtract From Pilot Salary


Gabriel Fernandez

Recommended Posts

Hello, me and My Friend( Almost All My Friend :) ) Create A Little script for a VMS.

He put a topic in forums but Not explained correctly.

Discounts To Subtract From Pilot Salary V1.0

Well this addon remove the pilot's salary according to his flight log. For example, the limit of TD in his VA is -300 and the driver exceeds this limit, is much more constructive and interesting actually used the system's finances vms than simply delete the log. So if Exed the limit of touch, flaps, gear down or up, will be deducted from the pilot's account as follows:

Every 100 FT / M Exed (Default is -300, but you can change) is removed - $ 1,200, the same way with the flaps and gear, but in a non-linear. A New Box is create in your log accept on admin center ( Default Skin)

Installation

Unzip the file to a folder of your choice

Extract the files to folder "admin / templates" on your PHPVMS.

Change the links to your site in discontoauto.tpl, and pirep_list.tpl.

Change cfg database in autodisconto.php

Download Link: www.voericov.co.cc/Desconto Automatico.rar

Credits For me And Luiz Cortinhas

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Installation

Unzip the file to a folder of your choice

Extract the files to folder "admin / templates" on your PHPVMS.

Change the links to your site in discontoauto.tpl, and pirep_list.tpl.

Change cfg database in autodisconto.php

I dont know, how i have it to install.

Where omes the .php file? In the templates folder?

What links I have to change, where are they???

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

</head>

<?php

$numero_do_piloto = $_POST[numero_piloto];

$touchdown = $_POST[toque];

$cauda = $_POST[cauda];

$flaps = $_POST[flaps];

$gearup = $_POST[gearup];

$geardown = $_POST[geardown];

// por enquanto só isso devera ser carregado.

$total = ($touchdown + $cauda + $flaps + $geardown + $gearup); // essa linha soma os valores indicados e a sua variavel ira discontar do salario do piloto.

// apartir de agora vamos conectar ao BD e pegar o atual salario do piloto.

$con = mysql_connect("localhost", "USERNAME", "PASSWORD"); // este campo funciona assim a primeira informação é o local do BD, a segunda é Usuario, a terceira é a senha

$banc = mysql_select_db(DATABANK); // aqui selecionamos o banco de dados .

$qu = "UPDATE `".$banc."`.`table_pilots` SET `totalpay` = totalpay -".$total." WHERE `table_pilots`.`pilotid` = '".$numero_do_piloto."'"; // a variavel $qu esta carregando todo codigo para inserir no banco de dados.

mysql_query($qu); // aqui executamos a variavel $qu.

echo $qu;

echo "<br>Alteração feita com sucesso!";

?>

<body>

</body>

</html>

And what can I config here?

Pls help me.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 2 weeks later...
  • 7 months later...
  • 4 weeks later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...