Location: PHPKode > scripts > Salary module for PHP Nuke > salary-module-for-php-nuke/index.php
<?php

/***************************************************************************
 *                              Salary modul
 *   
 *   copyright            : (C) 2003 PB & MPL
 *   email                :  hide@address.com
 *   home page            :  http://www.hwsk.sk/salary
 *
 * This program is free software. You can redistribute it and/or modify 
 * it under the terms of the GNU General Public License as published by 
 * the Free Software Foundation;
 ***************************************************************************/ 


    if (!eregi("modules.php", $PHP_SELF)) {
	die ("You can't access this file directly...");
    }
  
    include("header.php");
    OpenTable();
   


echo "<table width=98% border=0>";
echo "<tr>";
    echo "<td width=250><B>SALLARY MODUL</B><BR><BR></td>";
    echo "<td></td>";
  echo "</tr>";
  
  echo "<tr>";
      echo "<td width=250 valign=top>";





echo "<form action='modules.php?mop=modload&name=Salary&file=salary.0.11' method='post'>";
echo "Authors : ";
echo "<select name='author'>";

require_once("config.php"); 
  
$spojenie = MySQL_Connect($dbhost , $dbuname, $dbpass) or die("Could not connect db");
mysql_select_db($dbname) or die("Could not select db");

$dopyt = "SELECT aid FROM nuke_authors";
$vysledok = MySQL_Query($dopyt) or die ("Select error");

	while($line = mysql_fetch_array($vysledok)){
	$retazec = $line["aid"];
        echo "<option value='$retazec'>";
        echo $line["aid"];
	}

echo "</select><BR><BR>";



$imms = date("m")-1;
if ($imms<10) {
          $imms = "0".$imms;
          }
$idds = date("d");
$iyyyys = date("Y");

$imme = date("m");
$idde = date("d");
$iyyyye = date("Y");


echo "<table width=200 border=0>";

echo "<tr>";
    echo "<td></td>";
    echo "<td>";
    echo " MM : DD : YYYY<td>";
  echo "</tr>";

echo "<tr>";
    echo "<td>Start date :</td>";
    echo "<td>";
echo "<input type='text' name='mms' size=2 maxlength=2 value='$imms'>";
echo "<input type='text' name='dds' size=2 maxlength=2 value='$idds'>";
echo "<input type='text' name='yyyys' size=4 maxlength=4 value='$iyyyys'></td>";
  echo "</tr>";
  echo "<tr>";
    echo "<td>Finish date :</td>";
    echo "<td>";
echo "<input type='text' name='mme' size=2 maxlength=2 value='$imme'>";
echo "<input type='text' name='dde' size=2 maxlength=2 value='$idde'>";
echo "<input type='text' name='yyyye' size=4 maxlength=4 value='$iyyyye'></td>";
  echo "</tr>";
  echo "<tr>";
    echo "<td></td>";
    echo "<td></td>";
  echo "</tr>";
  echo "<tr>";
    echo "<td>Letter payment :</td>";
    echo "<td><input type='text' name='letter' size=5 maxlength=5 value='0.01'>";
    echo "<font color='#FFFFFF'>,-</font>";
      echo "<select name='currency'>";
        echo "<option selected>$</option>";
        echo "<option>Sk</option>";
        echo "<option>Ck</option>";
      echo "</select>";
    echo "</td>";
  echo "</tr>";
    echo "<tr>";
    echo "<td>Author coef. :</td>";
    echo "<td><input type='text' name='acoef' size=5 maxlength=5 value='1.00'></td>";
  echo "</tr>";
echo "</table>";


echo "<br><center>"; 
echo "<input type='submit' name='odosli' value='Submit'></center>";

echo "</form>";





echo "</td>";
    
    echo "<td valign='top'>  Help / Description of parameters";
    
echo "<table width=100% border=1 cellspacing=0 bordercolorlight='#99CCFF' bordercolordark='#0000CC' bgcolor='#B3D0B4'>";
echo "<tr>";
echo "<td>";
echo "<LI><B>Authors</B> : list of authors</LI><BR><BR>";
echo "<LI><B>Start date</B> : start date for sallary calculation</LI><BR><BR>";
echo "<LI><B>Finish date</B> : last day for sallary calculation</LI><BR><BR>";
echo "<LI><B>Letter payment</B> : price for one letter from text. Obviously are writers payed for one letter. For example, if price for letter is 0.01 dolar and author write article with 1000 letter, he obtains for this article 10 dollars. Only letters are counted, not white space, or html code.</LI><BR><BR>";
echo "<LI><B>Author coefficient</B> :  not all authors that writes have the same importance. So it is normal that one author could obtain X times more money for one letter than the other. So <B>'author coefficient'</B> is implementing such a difference. Default value is 1.00, but you can change this as you desire for the different authors.</LI><BR>";
echo "</td>";
echo "</tr>";
echo "</table>";
    
    echo "</td>";
    
  echo "</tr>";

echo "</table>";


echo "<center><BR><BR><B>(c) 2003 <a href='http://hwsk.sk/salary'>PB & MPL</a></B><center>";


    CloseTable();
    include("footer.php");

?>
Return current item: Salary module for PHP Nuke