function CheckCookies($IsUserChecked) { global $lang, $game_config, $basic_pages; getLang('cookies'); $UserRow = array(); include ROOT_PATH . 'config' . UNIVERSE . '.php'; if (isset($_COOKIE[$game_config['COOKIE_NAME']])) { $TheCookie = explode("/%/", $_COOKIE[$game_config['COOKIE_NAME']]); $UserResult = doquery("SELECT * FROM {{table}} WHERE `username` = '" . cleanstring($TheCookie[1]) . "';", 'users'); // On verifie s'il y a qu'un seul enregistrement pour ce nom if (mysql_num_rows($UserResult) == 0) { message(sprintf($lang['cookies']['Error1'], cleanstring($TheCookie[1]))); } $UserRow = FetchArray($UserResult); // On teste si on a bien le bon UserID if ($UserRow["id"] != $TheCookie[0]) { message($lang['cookies']['Error2']); } // On teste si le mot de passe est correct ! if (sha($UserRow["password"] . "--" . $dbsettings["secretword"]) !== $TheCookie[2]) { message($lang['cookies']['Error3']); } $NextCookie = implode("/%/", $TheCookie); // Au cas ou dans l'ancien cookie il etait question de se souvenir de moi // 3600 = 1 Heure // 86400 = 1 Jour // 31536000 = 365 Jours // on ajoute au compteur! if ($TheCookie[3] == 1) { $ExpireTime = time() + 31536000; } else { $ExpireTime = 0; } if ($IsUserChecked == false) { setcookie($game_config['COOKIE_NAME'], $NextCookie, $ExpireTime, "/", "", 0); } if (SMALL_LOAD) { //Just a small query doquery("UPDATE {{table}} SET `onlinetime` = '" . time() . "' WHERE `id` = '" . $TheCookie[0] . "' LIMIT 1;", 'users'); } else { $QryUpdateUser = "******"; $QryUpdateUser .= "`onlinetime` = '" . time() . "', "; $QryUpdateUser .= "`current_page` = '" . mysql_real_escape_string($_GET['page']) . "', "; $QryUpdateUser .= "`user_lastip` = '" . mysql_real_escape_string($_SERVER['REMOTE_ADDR']) . "', "; $QryUpdateUser .= "`user_agent` = '" . mysql_real_escape_string($_SERVER['HTTP_USER_AGENT']) . "' "; $QryUpdateUser .= "WHERE "; $QryUpdateUser .= "`id` = '" . $TheCookie[0] . "' LIMIT 1;"; doquery($QryUpdateUser, 'users'); } $IsUserChecked = true; } unset($dbsettings); $Return['state'] = $IsUserChecked; $Return['record'] = $UserRow; return $Return; }
<div id="planetname[{n}]" class="planetname">{name}</div> <div id="planet[{n}]" class="planet "> <img src="{{skin}}/img/planets{moon}/{type}_{subtype}_7.jpg" width="156" height="156" /> </div> <div id="coords[{n}]" class="coords"> <a href="./?page=galaxy&galaxy={gal}&system={sys}">[{gal}:{sys}:{pos}]</a> </div> <div id="" class="fields tips" title="|Current fields / max fields"> <span id="space[{n}]">{current_feild}/{max_feild}</span> </div> <div class="clearfloat"></div> </td>'; $parse['planets'] = ''; $array = array(); $n = 0; while ($p = FetchArray($planetsrow)) { $n++; $pl = PlanetType($p['image']); $pl['n'] = $n; $pl['gal'] = $p['galaxy']; $pl['sys'] = $p['system']; $pl['pos'] = $p['planet']; $pl['current_feild'] = $p['field_current']; $pl['max_feild'] = $p['field_max']; $pl['name'] = $p['name']; $pl['moon'] = ''; if ($p['planet_type'] == 3) { $pl['moon'] = '/moon'; } $parse['planets'] .= parsetemplate($planetsTPL, $pl); $array['resources']['metal']['n'] = $lang['Metal'];
require_once ROOT_PATH . 'includes/vars.php'; //Load the variables require_once ROOT_PATH . 'includes/db.php'; //Load the sql database require_once ROOT_PATH . 'includes/strings.php'; //Load some strings //We need some pages to only have a small load on the server. $basic_pages = array('im', 'fleetajax'); if (in_array($_GET['page'], $basic_pages) && strlen($_GET['page']) > 0) { define("SMALL_LOAD", true); } else { define("SMALL_LOAD", false); } // Lecture de la table de configuration $query = doquery("SELECT * FROM {{table}}", 'config'); while ($row = FetchArray($query)) { $game_config[$row['config_name']] = $row['config_value']; } if (!$InLogin) { $Result = CheckTheUser($IsUserChecked); $IsUserChecked = $Result['state']; $user = $Result['record']; } else { // Jeux en mode 'clos' ??? if ($game_config['game_disable'] > 0) { if ($user['authlevel'] < 1) { message(stripslashes($game_config['close_reason']), $game_config['game_name']); } } } require_once ROOT_PATH . 'includes/userconstants.php';
<?php /*Modification History: 2008.05.08 RJC Define undefined variables and set undefined constants to text to reduce phperror.log */ require_once "includes/variables.php"; include_once "class/BusinessPermitClass.php"; include_once "class/BusinessEstablishmentClass.php"; $staxfee = SelectMultiTable($dbtype, $dbLink, "ebpls_buss_preference", "staxesfees,swaivetax, predcomp", ""); $prefset = FetchArray($dbtype, $staxfee); $predcomp = $prefset['predcomp']; $owner_id = isset($owner_id) ? $owner_id : ''; //2008.05.08 if ($owner_id == '') { $owner_id = 0; } $strValues = "edit_by='',edit_locked=0"; $strWhere = "owner_id='{$owner_id}'"; $qu = mysql_query("update ebpls_owner set {$strValues} where {$strWhere}"); $business_id = isset($business_id) ? $business_id : ''; //2008.05.08 if ($business_id != '') { $ifpaid = SelectDataWhere($dbtype, $dbLink, $permittable, "where owner_id = {$owner_id}\n and business_id = {$business_id} and active = 1"); $strValues = "edit_by='',edit_locked=0"; $strWhere = "business_id='{$business_id}'"; $qu = mysql_query("update ebpls_business_enterprise set {$strValues} where {$strWhere}"); //$ifpaid = mysql_query("select paid from $permittable where owner_id = $owner_id // and business_id = $business_id and active = 1"); $ifpaid = FetchRow($dbtype, $ifpaid); $ifpaid = $ifpaid[0]; if ($ifpaid > 0) {
$msg = stripslashes($re[msg]); $cellnum = $re[telnum]; $pos7 = strpos($msg, " "); if ($pos7 == "") { $pos7 = 4; } $keyword = trim(strtolower(substr($msg, 0, $pos7))); $othermsg = trim(substr($msg, $pos7 + 1, 10)); //get reply $res = SelectDataWhere($dbtype, $dbLink, "sms_message", "where keyword='{$keyword}'"); $cnt = NumRows($dbtype, $res); if ($cnt == 0) { $sendthis = "Your message {$msg} is not a valid message.Please type HELP for more information"; } else { if ($othermsg == "") { $sendthis = FetchArray($dbtype, $res); $sendthis = $sendthis[full_message]; $sendthis = addslashes($sendthis); } else { $keyword = strtolower($keyword); $pt = substr($othermsg, 0, 1); $pt = strtoupper($pt); if ($pt == 'B') { $permit_type = 'Business'; $pld = 'steps, owner_id, business_id'; $idme = 'business_permit_id'; } elseif ($pt == 'M') { $permit_type = 'Motorized'; $pld = 'steps, owner_id'; $idme = 'motorized_operator_permit_id'; } elseif ($pt == 'F') {
$totfee = round($totfee, 2); $ttax = $grandamt - $totfee; $gid = SelectDataWhere($dbtype, $dbLink, "bus_grandamt", "where business_id={$business_id} and active = 0 and\n owner_id={$owner_id} order by gid desc limit 1"); $haveexist = NumRows($dbtype, $gid); if ($haveexist != 0) { $mt = FetchRow($dbtype, $gid); $grdmt = $mt[3]; } else { $grdmt = $grandamt + $totfee; } $tabs = abs($grdmt - $totalpaidtax); if ($grdmt == '0.00') { $grdmt = $grandamt; } $gettag = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_preference", ""); $gettag = FetchArray($dbtype, $gettag); if ($gettag[sassess] == '') { $grdmt = $ota - $add2fee + $totfee; $tabs = abs($grdmt - $totalpaidtax); $grandamt = $grdmt; } //getpayhistory $gethis = SelectDataWhere($dbtype, $dbLink, "ebpls_transaction_payment_or_details", "where trans_id={$owner_id} and payment_id={$business_id} and \n\t\t\t transaction='{$istat}' and payment_part='{$s}+1' and \n\t\t\t or_entry_type<>'CHECK'"); $getc = NumRows($dbtype, $gethis); $gethis = SelectDataWhere($dbtype, $dbLink, "ebpls_transaction_payment_or_details a, \n\t\t\tebpls_transaction_payment_check b", "where a.trans_id={$owner_id} and a.payment_id={$business_id} \n\t\t\t and a.transaction='{$istat}' and a.payment_part='{$s}+1' \n\t\t\t and a.or_entry_type='CHECK' and b.check_status='CLEARED'\n and a.or_no=b.or_no"); $getch = NumRows($dbtype, $gethis); $gethis = $getc + $getch; if ($gethis > 0 and $pmode == 'ANNUAL') { $grdmt = 0; $tabs = 0; $grandamt = 0;
$getot = SelectDataWhere($dbtype, $dbLink, $fee, " where permit_type='{$stat}' and active=1"); $getact = SelectMultiTable($dbtype, $dbLink, "fish_activity", "sum(act_fee)", "where owner_id={$owner_id} and transaction='{$stat}' and active = 1"); $getact = FetchRow($dbtype, $getact); $tfee1 = $getact[0]; $getboat = SelectDataWhere($dbtype, $dbLink, "fish_assess", "where owner_id={$owner_id}"); while ($getb = FetchArray($dbtype, $getboat)) { $getfee = SelectDataWhere($dbtype, $dbLink, "culture_fee", "where culture_id='{$getb['culture_id']}' and\n\t\t transaction='{$stat}' and active = 1 "); $getnum = FetchArray($dbtype, $getfee); if ($getnum[fee_type] == '3') { $getfee = SelectDataWhere($dbtype, $dbLink, "culture_range", "where culture_id='{$getb['culture_id']}' and\n\t\t range_lower<{$getb['amt']} and range_higher>={$getb['amt']} "); $getnum = NumRows($dbtype, $getfee); if ($getnum == 0) { $getfee = SelectDataWhere($dbtype, $dbLink, "culture_range", "where culture_id='{$getb['culture_id']}' and\n range_lower<={$getb['amt']} and range_higher=0"); } } $getfee1 = FetchArray($dbtype, $getfee); $ttfee1 = $ttfee1 + $getfee1[amt]; } ?> <table width=60%> <tr> <td>Fees from Boat Registration</td><td><?php echo number_format($ttfee, 2); ?> </td> </tr> <tr> <td>Fees from Fish Activities</td><td><?php echo number_format($ttfee1, 2); ?> </td>
<?php require_once "includes/variables.php"; include "lib/multidbconnection.php"; $dbLink = Open($dbtype, $connecttype, $dbhost, $dbuser, $dbpass, $dbname); $wil2 = UpdateQuery($dbtype, $dbLink, "tempbusnature", "retire=1", "owner_id={$owner_id} and\n business_id={$business_id} and\n active=1 and transaction='Retire'"); $updatebusnature = UpdateQuery($dbtype, $dbLink, "tempbusnature", "active=0", "owner_id={$owner_id} and\n business_id={$business_id} and transaction='Retire'"); $chkretire = SelectDataWhere($dbtype, $dbLink, "tempbusnature", "where owner_id={$owner_id} and\n business_id={$business_id} and active=1"); $chkretire = FetchRow($dbtype, $chkretire); if ($chkretire == 0) { $updateretire = UpdateQuery($dbtype, $dbLink, "ebpls_business_enterprise", "retire=1, business_retirement_date=now()", "owner_id={$owner_id} and business_id={$business_id}"); $ubp = UpdateQuery($dbtype, $dbLink, "ebpls_business_enterpr1ise_permit", "active = 0", "owner_id = {$owner_id} and\n business_id = {$business_id}"); } else { //deact all permit $ubp = UpdateQuery($dbtype, $dbLink, "ebpls_business_enterprise_permit", "active = 0", "owner_id = {$owner_id} and \n\t business_id = {$business_id}"); //active 1 $updatepermit = UpdateQuery($dbtype, $dbLink, "ebpls_business_enterprise_permit", "active=1", "owner_id={$owner_id} and business_id={$business_id}\n and transaction<>'Retire' order by business_permit_id desc limit 1"); //change pmode back to orig -- ang orig sa bicol ay baboy $getpmode = SelectDataWhere($dbtype, $dbLink, "ebpls_business_enterprise_permit", "where owner_id={$owner_id} and business_id={$business_id}\n and pmode<>'' order by business_permit_id desc limit 1"); $pmode = FetchArray($dbtype, $getpmode); $pmode = $pmode[pmode]; $updatepmode = UpdateQuery($dbtype, $dbLink, "ebpls_business_enterprise", "business_payment_mode = '{$pmode}'", "owner_id={$owner_id} and business_id={$business_id}"); } ?> <body onload="parent.location='index.php?part=4&class_type=Permits&permit_type=Business&busItem=Business&itemID_=2212&mtopsearch=SEARCH'";></body>
} else { ?> <body onload='javascript: alert("Cannot Process. No Payment Is Made");'></body> <?php $nopayment = '1'; require_once "includes/payform.php"; } } else { $tfee = SelectMultiTable($dbtype, $dbLink, "ebpls_fees_paid", "sum(fee_amount)* multi_by", "where owner_id = {$owner_id} and\n permit_type='{$permit_type}'"); $totalfee = FetchRow($dbtype, $tfee); $totpay = $totalfee[0]; $totchnge = SelectMultiTable($dbtype, $dbLink, "temppayment", "sum(payamt)", "where owner_id = {$owner_id} \n\t\t\t\t and permit_type='{$permit_type}' and status=1\n and permit_status='{$stat}'"); $amtchange = FetchRow($dbtype, $totchnge); $ort = SelectDataWhere($dbtype, $dbLink, "temppayment", "where owner_id = {$owner_id} and permit_type='{$permit_type}' \n\t\t\t\t and status=1 and permit_status='{$stat}'"); $ort = FetchArray($dbtype, $ort); $totpaid = $amtchange[0]; $amtchange = $totpay - $amtchange[0]; $orno = $ort[or_no]; //please populate ACCOUNT CODES $getmax = SelectDataWhere($dbtype, $dbLink, "ebpls_transaction_payment_or", ""); $or = NumRows($dbtype, $getmax); $or = $or + 1; $trans_id = $owner_id; $payment_code = $orno; $payment_id = 0; $tax_fee_code = 'taxcode'; $account_code = 'acntcode'; $account_desc = 'acnt desc'; $insertor = InsertQuery($dbtype, $dbLink, "ebpls_transaction_payment_or", "\n (or_no, payment_code, trans_id,or_date,total_amount_due,\n total_amount_less,total_amount_paid,ts_create,payment_officer)", "'{$or}','{$payment_code}', {$trans_id}, now(), {$totpaid},\n {$amtchange}, {$totpaid}, now(),'{$usern}'"); $insertdetails = InsertQuery($dbtype, $dbLink, "ebpls_transaction_payment_or_details", "(or_no,trans_id, payment_id, tax_fee_code,\n account_code, account_nature, account_desc, \n\t\t\t\tamount_due, ts, permit_type)", "'{$or}',{$trans_id}, {$payment_id}, '{$tax_fee_code}',\n '{$account_code}','CREDIT', '{$account_desc}', {$totpaid},\n\t\t\t\tnow(), '{$permit_type}'");
/** * MissionCaseDestroy.php * * @version 1.0 * @copyright 2009 By MadnessRed for XNova Redesigned */ function MissionCaseDestroy($FleetRow, $CurrentPlanet) { global $resource, $lang, $CombatCaps, $pricelist; //Get the fleet $fleet = array(); foreach (explode(';', $FleetRow['array']) as $r) { $r = explode(',', $r); $fleet[$r[0]] = $r[1]; } //Check we still have Deathstarts if ($fleet[214] > 0) { $destroyed = array(false, false); //Firstly is the moon destroyed: $chance_m = (100 - pow($moonsize, 0.5)) * pow($fleet[214], 0.5); if ($chance_m > mt_rand(0, 100)) { //Any fleet going to the moon should be recalled $tomoon = doquery("SELECT `fleet_id` FROM {{table}} WHERE `target_id` = '" . $CurrentPlanet['id'] . "' AND `fleet_mess` = '0' ;", 'fleets', false); while ($row = FetchArray($tomoon)) { $fleetrow = doquery("SELECT *, COUNT('fleet_id') AS `count` FROM {{table}} WHERE `fleet_id` = '" . idstring($row['fleet_id']) . "' AND `fleet_mess` = '0' AND `mission` <> '0' ;", 'fleets', true); //Check we found the fleet: if ($fleetrow['count'] == 1) { //Incase script takes over a second, lets keep now constant. $now = time(); //Duration in flight $duration = $now - $fleetrow['departure']; //ok, lets update the fleet doquery("UPDATE {{table}} SET `departure` = '" . $now . "', `arrival` = '" . ($now + $duration) . "', `target_id` = '" . $fleetrow['owner_id'] . "', `target_userid` = '" . $fleetrow['owner_userid'] . "', `owner_id` = '" . $fleetrow['target_id'] . "', `owner_userid` = '" . $fleetrow['target_userid'] . "', `fleet_mess` = '1', `mission` = '0' WHERE `fleet_id` = '" . $fleetrow['fleet_id'] . "' ;", 'fleets', false); //Remove any partner fleets doquery("DELETE FROM {{table}} WHERE `partner_fleet` = '" . $fleetrow['fleet_id'] . "' ;", 'fleets', false); //Update menus doquery("UPDATE {{table}} SET `menus_update` = '" . time() . "' WHERE `id` = '" . $fleetrow['owner_userid'] . "' LIMIT 1 ;", 'users', false); } } //And fleets returning to the moon should go the planet $planet = doquery("SELECT `id` FROM {{table}} WHERE `galaxy` = '" . $CurrentPlanet['galaxy'] . "' AND `system` = '" . $CurrentPlanet['system'] . "' AND `planet` = '" . $CurrentPlanet['planet'] . "' AND `planet_type` = '1' LIMIT 1 ;", 'planets', true); doquery("UPDATE {{table}} SET `target_id` = '" . $planet['id'] . "' WHERE `target_id` = '" . $CurrentPlanet['id'] . "' ;", 'fleets', false); doquery("UPDATE {{table}} SET `owner_id` = '" . $planet['id'] . "' WHERE `owner_id` = '" . $CurrentPlanet['id'] . "' ;", 'fleets', false); //Delete the moon doquery("DELETE FROM {{table}} WHERE `id` = '" . $CurrentPlanet['id'] . "' LIMIT 1 ;", 'planets', false); //Mark it as destroyed for the message $destroyed[0] = true; } //Secondly are the Deathstars destroyed. $chance_k = 0.5 * pow($moonsize, 0.5); if ($chance_k > mt_rand(0, 100)) { //Are there any other ships in the fleet? if (array_sum($fleet) > $fleet[214]) { //Remove rips from the fleet unset($fleet[214]); //Compile fleet array $array = array(); foreach ($fleet as $id => $c) { $array[] = $id . "," . $c; } $array = implode(";", $array); //Update row doquery("UPDATE {{table}} SET `array` = '" . $array . "', `count` = `count` - '" . array_sum($fleet) . "' WHERE `fleet_id` = '" . $FleetRow['fleet_id'] . "' LIMIT 1 ;", 'fleets', false); } else { //Just remove the fleet DeleteFleet($FleetRow['fleet_id']); } //Mark it as destroyed for the message $destroyed[1] = true; } //Start the message $HomePlanet = doquery("SELECT * FROM {{table}} WHERE `id` = '" . $row['target_id'] . "' LIMIT 1 ;", 'planets', true); $message = ''; $message .= sprintf($lang['fleet_9_mess1'], $HomePlanet['name'] . " [" . $HomePlanet['galaxy'] . ":" . $HomePlanet['system'] . ":" . $HomePlanet['planet'] . "]", "[" . $CurrentPlanet['galaxy'] . ":" . $CurrentPlanet['system'] . ":" . $CurrentPlanet['planet'] . "]"); $message .= sprintf($lang['fleet_9_moon'], $chance_m . '%') . "<br />"; $message .= sprintf($lang['fleet_9_rips'], $chance_k . '%') . "<br />"; $message .= $lang['fleet_9_mess2']; //So what happen (for the message?) if ($destroyed[0] && $destroyed[1]) { //Both moon and RIPs destroyed $message .= $lang['fleet_9_messD']; $message .= $lang['fleet_9_messK']; } elseif ($destroyed[0]) { //Moon Destroyed $message .= $lang['fleet_9_messD']; } elseif ($destroyed[1]) { //RIPs destroyed $message .= $lang['fleet_9_messK']; } else { //Nothing destroyed $message .= $lang['fleet_9_messN']; } PM($FleetRow['owner_userid'], 0, $message, sprintf($lang['fleet_9_tit'], $CurrentPlanet['name']), $lang['fleet_control'], 2); PM($FleetRow['target_userid'], 0, $message, sprintf($lang['fleet_9_tit'], $CurrentPlanet['name']), $lang['fleet_control'], 2); } }
$compvalrange = $totind; } else { $getd[1] = $range[0]; eval("\$totind={$d}({$xv}{$range['0']};"); $compvalrange = $totind; } } else { $indi = 0; $xv = 1; $totind = $getd[1]; $rtag = ''; } include 'includes/minimum_compute.php'; $getd[0] = addslashes($getd[0]); $chkiffee = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_tfo", "where tfodesc='{$getd['0']}'"); $chkiffee = FetchArray($dbtype, $chkiffee); if ($chkiffee[taxfeetype] != 1) { $totfee = $totfee + $totind; } $getd[0] = stripslashes($getd[0]); if ($getd[4] == 2 or $getd[4] == 3) { if ($getd[5] != 3) { $xd = number_format($xv, 2); print "<tr><td align=left width=25%>{$getd['0']} </td><td align=right>\r\n <input type=hidden name=x[{$varx}] size=5 value={$xv} {$lockit}>{$xd}</td>"; } else { print "<tr><td align=left width=25%>{$getd['0']} </td><td align=right>{$getd['9']}  \r\n <input type=text name=x[{$varx}] size=5 value=0 {$lockit}></td>"; $tbut = 1; $xv = 0; $totind = 0; } } elseif ($getd[5] == 3) {
&busItem=Occupational";'></body> <?php } } } } //end if occupational /* if ($owner_id=='') { $owner_id=$id; } */ if ($permit_type == 'Occupational' || $permit_type == 'Peddlers') { $totalvec = 1; } //need to add drop command $getcnt = SelectDataWhere($dbtype, $dbLink, $temptbl, "where owner_id={$owner_id}"); $cnts = NumRows($dbtype, $getcnt); // $lop=1; for ($lop = 1; $lop <= $cnts; $lop++) { $gettemp = SelectDataWhere($dbtype, $dbLink, $temptbl, "where owner_id={$owner_id} limit 1"); $getfee = FetchArray($dbtype, $gettemp); $slash = 'add'; require_once "includes/stripslash.php"; //insert fees to main table $fee_desc = addslashes($getfee[fee_desc]); $insertit = InsertQuery($dbtype, $dbLink, "ebpls_fees_paid", "(owner_id, fee_desc, fee_amount, \n\t\t\t\tmulti_by, permit_type, permit_status,\n\t\t\t\tinput_by, input_date)", "{$owner_id}, '{$fee_desc}', {$getfee['fee_amount']}, \n\t\t\t\t{$totalvec}, '{$permit_type}', '{$status}', \n\t\t\t\t'{$usern}', '{$tdate}'"); $deltemp = DeleteQuery($dbtype, $dbLink, $temptbl, "owner_id ={$owner_id} and \n\t\t\t\t\tpermit_type='{$permit_type}' limit 1"); } }
//$owner_id=$owner_id; $owner_first_name = $res[0]; $owner_middle_name = $res[1]; $owner_last_name = $res[2]; if ($tag == 'Occupational' and $permit_type == 'Occupational') { //$owner_id = $idcnt; require_once "includes/form_add_mtoppermit.html"; //require_once "includes/form_pay_occu.html"; $getemp = SelectMultiTable($dbtype, $dbLink, "{$permittable} a, ebpls_business_enterprise b", "a.occ_permit_code,a.occ_permit_application_date, \r\n\t\t\t a.occ_position_applied , b.business_name", "where a.owner_id={$owner_id} and a.business_id=b.business_id"); $getit = FetchRow($dbtype, $getemp); $permit_code = $getit[0]; $pos_app = $getit[2]; $permit_date = $getit[1]; $employer_name = $getit[3]; require_once "includes/form_pay_midoccu.php"; require_once "includes/paymtop.php"; } elseif ($permit_type == 'Peddlers') { require_once "includes/form_add_mtoppermit.html"; $getemp = SelectDataWhere($dbtype, $dbLink, $permittable, "where owner_id={$owner_id}"); $getit = FetchArray($dbtype, $getemp); $merchandise = stripslashes($getit[merchandise_sold]); $peddler_bus = stripslashes($getit[peddlers_business_name]); $apply = $getit[application_date]; $permid = $getit[peddlers_permit_id]; require_once "includes/form_pay_midpeddler.html"; require_once "includes/paymtop.php"; } else { require_once "includes/form_add_mtoppermit.html"; require_once "includes/paymtop.php"; } }
/** * DestroyPlanet.php * * @version 1.0 * @copyright 2010 By MadnessRed for XNova Redesigned */ function DestroyPlanet($id, $CurrentUser = false, $CurrentPlanet = false, $moon_dest = false) { //Do we have the current planet? if (!$CurrentPlanet) { $CurrentPlanet = doquery("SELECT * FROM {{table}} WHERE `id` = '" . idstring($id) . "' LIMIT 1 ;", "planets", true); } //Do we have the current user? if (!$CurrentUser) { $CurrentUser = doquery("SELECT * FROM {{table}} WHERE `id` = '" . idstring($CurrentPlanet['id_owner']) . "' LIMIT 1 ;", "users", true); } //Destroy the planet if ($CurrentPlanet['planet_type'] == 1) { //Destroy the planet $destruyed = time() + 60 * 60 * 24; $QryUpdatePlanet = "UPDATE {{table}} SET "; $QryUpdatePlanet .= "`destruyed` = '" . $destruyed . "', "; $QryUpdatePlanet .= "`id_owner` = '0' "; $QryUpdatePlanet .= "WHERE "; $QryUpdatePlanet .= "`id` = '" . $CurrentPlanet['id'] . "' AND `id_owner` = '" . $CurrentUser['id'] . "' LIMIT 1;"; doquery($QryUpdatePlanet, 'planets'); //Delete the moon $QryUpdateMoon = "SELECT `id` FROM {{table}} WHERE "; $QryUpdateMoon .= "`galaxy` = '" . $CurrentPlanet['galaxy'] . "' AND "; $QryUpdateMoon .= "`system` = '" . $CurrentPlanet['system'] . "' AND "; $QryUpdateMoon .= "`planet` = '" . $CurrentPlanet['planet'] . "' AND "; $QryUpdateMoon .= "`planet_type` = '3' LIMIT 1 ;"; $moon = doquery($QryUpdateMoon, 'planets'); if ($moon['id'] > 0) { DestroyPlanet($moon['id'], $CurrentUser); } //Delete the moon } else { $QryUpdatePlanet = "DELETE FROM {{table}} WHERE "; $QryUpdatePlanet .= "`id` = '" . $CurrentUser['current_planet'] . "' AND "; $QryUpdatePlanet .= "`id_owner` = '" . $CurrentUser['id'] . "' LIMIT 1;"; doquery($QryUpdatePlanet, 'planets'); //If this is a destroy fleet, get the orbitted planet if ($moon_dest) { $QryUpdateMoon = "SELECT `id` FROM {{table}} WHERE "; $QryUpdateMoon .= "`galaxy` = '" . $CurrentPlanet['galaxy'] . "' AND "; $QryUpdateMoon .= "`system` = '" . $CurrentPlanet['system'] . "' AND "; $QryUpdateMoon .= "`planet` = '" . $CurrentPlanet['planet'] . "' AND "; $QryUpdateMoon .= "`planet_type` = '1' LIMIT 1 ;"; $planet = doquery($QryUpdateMoon, 'planets'); } } //Set the user to his homeworld $QryUpdateUser = "******"; $QryUpdateUser .= "`current_planet` = `id_planet`, "; $QryUpdateUser .= "`menus_update` = '" . time() . "' "; $QryUpdateUser .= "WHERE "; $QryUpdateUser .= "`id` = '" . $CurrentUser['id'] . "' LIMIT 1"; doquery($QryUpdateUser, "users"); //Deal with any fleets //Recall and fleets going to this planet $incoming = doquery("SELECT `fleet_id` FROM {{table}} WHERE `target_id` = " . $CurrentPlanet['id'] . " AND `fleet_mess` = '0' ;", 'fleets'); while ($row = FetchArray($incoming)) { RecallFleet($row['fleet_id']); } //Get all fleets returning to this planet if ($moon_dest) { //Divert returning fleets to the planet $incoming = doquery("UPDATE {{table}} SET `target_id` = " . $planet['id'] . " WHERE `target_id` = " . $CurrentPlanet['id'] . " AND `fleet_mess` = '1' ;", 'fleets'); } else { //This planet was not destroyed that way, jsut remove any ships going to it. doquery("DELETE FROM {{table}} WHERE `target_id` = " . $CurrentPlanet['id'] . " AND `fleet_mess` = '1' ;", 'fleets', false, true); } }
//formula eval("\$tfee={$ft['1']}{$gf['3']};"); ?> <td><?php echo number_format($tfee, 2); ?> </td> <?php } elseif ($gf[2] == '3') { //range $getr = SelectDataWhere($dbtype, $dbLink, "culture_range", "where\n\t\t\tculture_id={$getengine211['culture_id']} and range_lower<={$ft['1']} and\n\t\t\trange_higher >= {$ft['1']}"); $numr = NumRows($dbtype, $getr); if ($numr == 0) { $getr = SelectDataWhere($dbtype, $dbLink, "culture_range", "where\n culture_id={$getengine211['culture_id']} and range_lower<={$ft['1']} and\n range_higher = '0'"); } $getre = FetchArray($dbtype, $getr); if (is_numeric($getre[amt])) { ?> <td><?php $tfee = $getre[amt]; echo number_format($getre[amt], 2); ?> </td> <?php } else { eval("\$tfee={$ft['1']}{$getre['amt']};"); ?> <td><?php echo number_format($tfee, 2); ?> </td>
$buttag = 'Add'; $buttag1 = 'Clear'; $verdel = SelectDataWhere($dbtype, $dbLink, $vehicle, "where motorized_motor_id={$mid}"); $getver = FetchArray($dbtype, $verdel); $stat1 = $getver[status]; $owner_id = $ownerID; require_once "includes/form_add_mtoppermit.html"; require_once "includes/form_add_middlepermit.php"; if ($com == 'Delete') { //search history $getown = SelectMultiTable($dbtype, $dbLink, "ebpls_motorized_vehicles a, vehicle_transfer b", "motorized_motor_id", " where a.motorized_motor_id ='{$mid}' and a.motorized_motor_id=b.motor_id "); $gg = NumRows($dbtype, $getown); if ($gg > 0) { $getown = SelectMultiTable($dbtype, $dbLink, "ebpls_motorized_vehicles a, vehicle_transfer b", "*", " where a.motorized_motor_id ='{$mid}' and a.motorized_motor_id=b.motor_id and\n b.new_owner='{$owner_id}'"); $ff = NumRows($dbtype, $getown); $ft = FetchArray($dbtype, $getown); if ($ff > 0) { //update vehicle $updateit = UpdateQuery($dbtype, $dbLink, $vehicle, "motorized_operator_id = {$ft['old_owner']},permit_type='{$permit_type}',retire=2,transaction='Drop'", " motorized_motor_id='{$mid}'"); $D = DeleteQuery($dbtype, $dbLink, "vehicle_transfer", "motor_id='{$mid}' and\n\t\t\t\t\t\tnew_owner='{$owner_id}'"); ?> <body onload='javascript:("Vehicle Transferred Cancelled");'</body> <?php } else { ?> <body onload='javascript:ExistOther();'></body> <?php } } else { $delvec = DeleteQuery($dbtype, $dbLink, $vehicle, "motorized_motor_id={$mid}"); }
die; break; default: $parse['name'] = $allyrow['ally_name']; $parse['tag'] = $allyrow['ally_tag']; $parse['www'] = addslashes($allyrow['ally_web']); $parse['members'] = idstring($allyrow['ally_members']); $parse['yourrank'] = addslashes($user['ally_rank_name']); $parse['internal'] = $bb->parse(addslashes($allyrow['ally_text'])); $parse['external'] = $bb->parse(addslashes($allyrow['ally_description'])); $parse['image'] = addslashes($allyrow['ally_image']); $members = $lang; $membersort = 'ally_register_time'; $memberquery = doquery("SELECT \r\n\t\t\t`id`,`username`,`galaxy`,`system`,`planet`,\r\n\t\t\t`ally_register_time`,`ally_rank_name`,`total_points`,`onlinetime` \r\n\t\t\tFROM {{table}} WHERE `ally_id` = '" . $allyrow['id'] . "' ORDER BY `" . $membersort . "` ASC ;", 'users'); $n = 0; while ($row = FetchArray($memberquery)) { $n++; $lastclick = time() - $row['onlinetime']; if (!$user['permisions'][2]) { $activeon = ' - '; $activeover = ''; } elseif ($lastclick > 20) { $activeon = 'Off'; $activeover = 'overmark'; } else { $activeon = 'On'; $activeover = 'undermark'; } if ($user['permisions'][32] && $row['id'] != $user['id']) { $kick = "<a title=\"Kick user\" class=\"tips thickbox\" onclick=\"loadpage('./?page=network&mode=kick&id=" . $row['id'] . "','{Alliance}','network'); document.getElementById('memberlist_contentz').innerHTML = '<p align=center><img src=\\'{{skin}}/img/ajax-loader.gif\\' /> {Loading}</p>'; return false;\" href=\"#\">\r\n\t\t\t\t\t\t\t<img alt=\"Kick user\" src=\"" . GAME_SKIN . "/img/icons/against.gif\" />\r\n\t\t\t\t\t\t</a>"; }
<?php if ($totind < $getd['defamt']) { $totind = $getd['defamt']; $compvalrange = $getd['defamt']; $usemin = 'Replaced with Minimum Amount '; $compval = $getd['defamt']; } $getd['tfodesc'] = addslashes($getd['tfodesc']); $chkintfo = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_tfo", "where tfodesc='{$getd['tfodesc']}'"); $chkintfo = FetchArray($dbtype, $chkintfo); if ($chkintfo['taxfeetype'] == 1) { $tottax = $tottax + $totind; } $getd['tfodesc'] = stripslashes($getd['tfodesc']);
<tr> <td> Copy from Line of Business </td> <td align=center ><?php echo get_select_data($dbLink, "fromnat", "ebpls_buss_nature", "natureid", "naturedesc", $fromnat, "true", "naturestatus='A' and natureid<>'{$natureid}' order by naturedesc", "onchange='_FRM.submit();'"); ?> </td> </tr> </table> <table border =0 width=70% align=center><Br> <?php $ic = 0; $col1 = 0; $getreq = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_taxfeeother a, ebpls_buss_tfo b", "where a.tfo_id=b.tfoid and a.natureid='{$fromnat}' order by a.mode"); $gt = NumRows($dbtype, $getreq); while ($ic < $gt) { while ($s = FetchArray($dbtype, $getreq)) { $ic++; if ($col1 == 0) { include 'tablecolor-inc.php'; print "<tr bgcolor='{$varcolor}'>\n"; } if ($s[taxtype] == 1) { $lbl = ' (New)'; } if ($s[taxtype] == 2) { $lbl = ' (ReNew)'; } if ($s[taxtype] == 3) { $lbl = ' (Retire)'; } if ($s[mode] == 2) {
$geyr = NumRows($dbtype, $getyears); if ($geyr == 0) { $cnt = $getyr[or_print] + 1; $bill_date = $bill_date + 1; } $fg = $fg - 1; } } //gety tempassess $temp = SelectMultiTable($dbtype, $dbLink, "tempassess a, ebpls_buss_taxfeeother b, ebpls_buss_tfo c", "a.natureid, a.taxfeeid, a.multi,\n c.tfodesc, b.amtformula,b.indicator, \n \t\t\t\t b.mode, b.uom, c.tfoid,a.date_create, a.compval", "where b.taxtype='{$tftype}'\n and a.owner_id={$owner_id} and a.business_id={$business_id} and\n\t\t\t\ta.taxfeeid = '{$getd['taxfeeid']}' and a.natureid = '{$getn['0']}' and \n\t\t\t\t a.active = 1 and a.natureid=b.natureid and a.taxfeeid=b.taxfeeid \n\t\t\t\t and b.tfo_id=c.tfoid {$tft}"); //$temp = SelectMultiTable($dbtype,$dbLink, //"tempassess a, ebpls_buss_taxfeeother b, ebpls_buss_tfo c", //"a.natureid, a.taxfeeid, a.multi, // c.tfodesc, b.amtformula,b.indicator, //b.mode, b.uom, c.tfoid,a.date_create, a.compval", /// "where a.assid='$varx' and b.taxtype='$tftype' // and a.owner_id=$owner_id and a.business_id=$business_id and //a.active = 1 and a.natureid=b.natureid and a.taxfeeid=b.taxfeeid //and b.tfo_id=c.tfoid $tft"); $gethuh = FetchArray($dbtype, $temp); $pdf->Cell(25, 5, $gethuh['compval'], 1, 1, 'C'); //simulan dito //end dito $gethuh[multi] = round($gethuh[multi], 2); //$tempamount = $totind; //echo $totind."<br>"; $grandamt = $grandamt + $totind; $gethuh[tfodesc] = stripslashes($gethuh[tfodesc]); } } }
print "<td class=hdr><a href='index.php?part=4&class_type=Preference&permit=others&selMode=ebpls_notherfees&action_=8&itemEvent=1&data_item=0&watfld=fee_desc&feet={$permit_type}&orderbyasde={$orderbyasde}&ordervalue=desc'>Fee Description</a></td>\n"; print "<td class=hdr><a href='index.php?part=4&class_type=Preference&permit=others&selMode=ebpls_notherfees&action_=8&itemEvent=1&data_item=0&watfld=fee_amount&feet={$permit_type}&orderbyasde={$orderbyasde}&ordervalue=amou'>Fee Amount</a></td>\n"; print "<td class=hdr><a href='index.php?part=4&class_type=Preference&permit=others&selMode=ebpls_notherfees&action_=8&itemEvent=1&data_item=0&watfld=permit_type&feet={$permit_type}&orderbyasde={$orderbyasde}&ordervalue=type'>Transaction Type</a></td>\n"; print "<td class=hdr>Action</td>\n"; $cmd = "Edit"; $cmd1 = "Delete"; //populate table $resultr = Query1($dbtype, $dbLink, $searchsqlr); require 'setup/setting.php'; $max_resultsr = $thIntPageLimit; $pagemulti = $page; if ($pagemulti == '') { $pagemulti = 1; } $norow = $pagemulti * $max_resultsr - $max_resultsr; while ($get_info = FetchArray($dbtype, $resultr)) { $norow++; if ($get_info[active] == 1) { $actag = 'Delete'; $com1 = 'deact'; } else { $actag = 'Delete'; $com1 = 'act'; } include 'tablecolor-inc.php'; print "<tr bgcolor='{$varcolor}'>\n"; //foreach ($get_info as $field ) echo "<td> " . $norow . " </td>\n"; echo "<td> " . $get_info[fee_desc] . " </td>\n"; echo "<td> " . number_format($get_info[fee_amount], 2) . " </td>\n"; echo "<td> " . $get_info[permit_type] . " </td>\n";
$getr = SelectDataWhere($dbtype, $dbLink, "culture_range", "where\n\t\t\t\t\t\t\t\tculture_id={$ft['3']} and range_lower<={$ft['1']} and\n\t\t\t\t\t\t\t\trange_higher = '0'"); } $getre = FetchArray($dbtype, $getr); if (is_numeric($getre[amt])) { $tfee = $getre[amt]; } else { eval("\$tfee={$ft['1']}{$getre['amt']};"); } } $tfee1 = $tfee1 + $tfee; } $backtaxcompute = $backtaxcompute + $tfee1; //Other Permit Fees $getot1 = SelectDataWhere($dbtype, $dbLink, "ebpls_fishery_fees", "where permit_type='{$stat}' and active=1"); $ff = 0; while ($getj = FetchArray($dbtype, $getot1)) { $otherfee = $getj[fee_amount]; $ff = $ff + $getj[fee_amount]; } $backtaxcompute = $backtaxcompute + $ff; $backtotalfee = $backtaxcompute; //Get Surcharge and Interest if ($getpen['indicator'] == '1') { $backpen = $getpen['rateofpenalty']; } elseif ($getpen['indicator'] == '2') { eval("\$backpen={$backtotalfee}*{$getpen['rateofpenalty']};"); } $backtaxcompute = $backtaxcompute + $backpen; $mpyear = date('Y'); $d = date('m', strtotime($mpyear . "-" . $getpen['renewaldate'])); //setting date
<td width=20%><?php echo $paymode[$si + 1]; ?> Payment</td> <td align=center width=20%><?php echo date('l', strtotime($pens[$ps])) . ' '; echo $pens[$ps]; ?> </td> <td align=right width=20%><?php if ($stat == 'New') { $staxfee1 = SelectMultiTable($dbtype, $dbLink, "ebpls_buss_preference", "swaivetax", ""); $feeset1 = FetchRow($dbtype, $staxfee1); if ($feeset1[0] == 1) { $getstartdate = SelectDataWhere($dbtype, $dbLink, "ebpls_business_enterprise", "where owner_id = {$owner_id} and\n\t\t\t\tbusiness_id={$business_id} and retire=0"); $getsd = FetchArray($dbtype, $getstartdate); //echo $getsd[business_start_date]; $getyr = date('Y', strtotime($getsd[business_start_date])); $getsd = date('m', strtotime($getsd[business_start_date])); //if ($getyr<=date('Y')) { //$tfrm=0; //} else { $tfrm = $getsd / 3; //time frame //} //echo $tfrm."sssssssss"; $totalwaive = 0; if ($ndsearch[0] == 100 and $feeset[0] == '') { $addme = $amt2pay[$si + 1]; } if (strtolower($pmode) == 'quarterly') {
if ($monthcounter <= $scounter) { $getsurchargepaid = @mysql_query("select sum(penalty), sum(surcharge), sum(backtax), sum(taxes) from comparative_statement where owner_id = '{$owner_id}' and business_id = '{$business_id}' and for_year = '{$taonnatinngayon}' and month >= {$a1} and month <= {$a2}"); //echo "select sum(penalty), sum(surcharge), sum(backtax), sum(taxes) from comparative_statement where owner_id = '$owner_id' and business_id = '$business_id' and for_year = '$taonnatinngayon' and month >= $a1 and month <= $a2"; $getsumnun = @mysql_fetch_row($getsurchargepaid); $getsumnun1 = $getsumnun[0] + $getsumnun[1] + $getsumnun[2]; $paidtaxes = $getsumnun[3]; } else { $getsumnun1 = 0; } $totalcash = $getcash[0]; $totalcheck = $totcheck[0]; $totalpayment = $totalcash + $totalcheck; $staxfee = SelectMultiTable($dbtype, $dbLink, "ebpls_buss_preference", "staxesfees,swaivetax, predcomp", ""); $prefset = FetchArray($dbtype, $staxfee); $startd = SelectMultiTable($dbtype, $dbLink, "ebpls_business_enterprise", " business_start_date", "where business_id='{$business_id}' and owner_id='{$owner_id}'"); $startdate = FetchArray($dbtype, $startd); $startdate = strtotime($startdate['business_start_date']); $predcomp = $prefset['predcomp']; if ($predcomp == 1 and $stat == 'New') { $exemptedfee = 0; } $totaltaxfee = $grandamt; $totalfee = $totfee - $exemptedfee; $totalexptax = $exemptot; $totaltax = $totaltaxfee - $totalfee; $totalexemptedfee = $exemptedfee; $totalremain = $totaltaxfee - $totalpayment; /* echo "<br>Total Tax/Fee = $totaltaxfee <br> Total Tax = $totaltax <br> Total Fee = $totalfee <BR>
$getline = mysql_query("select * from tempbusnature a\n\t\t\t\t\t\t\t\t where a.owner_id='{$resulta['owner_id']}' and\n\t\t\t\t\t\t\t\t a.business_id='{$resulta['business_id']}' and a.active=1\n\t\t\t\t\t\t\t\t "); /*-------------------------------------------------------------------------------- frederick >>> found out that this script is located below/after the $getcap query This is the reason why the array $getl[bus_code] resulted empty and the capital investment did not appear in the report, therefore, this has been moved here: */ $getl = mysql_fetch_assoc($getline); //---------------------------------------------------------------------------------- $getcap = mysql_query("select * from tempbusnature a\n\t\t\t\t\t\t\t\t where a.owner_id='{$resulta['owner_id']}' and\n\t\t\t\t\t\t\t\t a.business_id='{$resulta['business_id']}' and a.bus_code='{$getl['bus_code']}'\n\t\t\t\t\t\t\t\t order by tempid"); $getcap = mysql_fetch_assoc($getcap); $totcap = $totcap + $getcap[cap_inv]; $totgross = $totgross + $getl[last_yr]; $pdf->Cell(30, 5, number_format($getcap[cap_inv], 2), 1, 0, 'R'); $pdf->Cell(30, 5, number_format($getl[last_yr], 2), 1, 0, 'R'); $getcas = SelectMultiTable($dbtype, $dbLink, "ebpls_transaction_payment_or a,\n ebpls_transaction_payment_or_details b", "a.payment_code, a.or_date", "where a.or_no=b.or_no and b.trans_id={$resulta['owner_id']} and\n b.or_entry_type='CASH' and\n b.payment_id={$resulta['business_id']} and b.transaction='{$resulta['transaction']}' order by a.or_no desc"); $getcash = FetchArray($dbtype, $getcas); $pdf->Cell(40, 5, $getcash[payment_code] . "/" . substr($getcash[or_date], 0, 11), 1, 0, 'C'); $pdf->Cell(25, 5, substr($resulta[application_date], 0, 11), 1, 0, 'C'); $pdf->Cell(10, 5, $resulta[transaction], 1, 1, 'C'); $i++; } /* $i = 1; $pdf->SetY($Y_Table_Position); while ($i < $number_of_rows) { $pdf->SetX(1); $pdf->MultiCell(349,5,$i,1); $i = $i +1; } */ //new signatories table
$pdf->Cell(60, 5, $resulta[business_name], 1, 0, 'L'); $pdf->SetX(155); $pdf->Cell(90, 5, $resulta[bus_add], 1, 0, 'L'); if (strtolower($list_option) == 'capital investment') { $totinv = $resulta[cap_inv]; } else { $totinv = $resulta[last_yr]; } $totinv1 = $totinv1 + $totinv; $pdf->Cell(30, 5, number_format($totinv, 2), 1, 0, 'R'); $getlineb = mysql_query("select sum(a.compval) as tax_due \n\t\t\t\tfrom tempassess a where a.owner_id={$resulta['owner_id']} and\n a.business_id={$resulta['business_id']} and\n a.active=1 and natureid<>'' and taxfeeid<>''"); $resultb = mysql_fetch_assoc($getlineb); $totdue = $resultb[tax_due]; $gtotdue = $gtotdue + $totdue; $dec = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_preference", ""); $sas = FetchArray($dbtype, $dec); $sas = $sas[sassess]; if ($sas == '') { $resultf = SelectDataWhere($dbtype, $dbLink, "ebpls_buss_tfo", "where tfoindicator='1' and tfostatus='A' and taxfeetype<>'1' and \n\t\t\ttfodesc not in (select tfodesc from \n\t\t\tebpls_buss_tfo where tfodesc like 'garbage%')"); $cntfee = NumRows($dbtype, $resultf); $feetype = 1; while ($getf = FetchRow($dbtype, $resultf)) { $getex = SelectMultiTable($dbtype, $dbLink, "ebpls_business_enterprise a, \n\t\t\tfee_exempt b, ebpls_buss_tfo c", "a.*", "where a.business_id={$resulta['business_id']} and\n a.business_category_code=b.business_category_code and\n c.tfoid={$getf['0']} and b.tfoid={$getf['0']} and\n b.active=1"); $getfeex = NumRows($dbtype, $getex); if ($getfeex > 0) { $exemptedfee = $exemptedfee + $getf[6]; $usemin = 'Fee Exempted '; $getf[6] = 0; } $regfee = $regfee + $getf[6]; $totfee = $totfee + $getf[6];
} } } } //editline } if ($business_id == '') { $business_id = 0; } //get bus nature $getnat = SelectDataWhere($dbtype, $dbLink, "tempbusnature", " where owner_id={$owner_id} and business_id={$business_id}\n and active = 1"); while ($getit = FetchArray($dbtype, $getnat)) { $getit['bus_nature'] = stripslashes($getit['bus_nature']); $bus_code = $getit['bus_code']; $getcapinv = SelectDataWhere($dbtype, $dbLink, "tempbusnature", " where owner_id={$owner_id} and business_id={$business_id} and bus_code='{$bus_code}'\n order by tempid asc limit 1"); $getcapi = FetchArray($dbtype, $getcapinv); $ifpaid = $getit['recpaid']; $editline = isset($editline) ? $editline : ''; //2008.05.08 if ($editline == 'y' and $natcode == $getit['tempid']) { ?> <tr> <td align="left" valign="top" class='normal'> <?php if ($stat == 'New' || $stat == 'ReNew' and $watdo == '') { echo get_select_data_where($dbLink, 'business_nature_code', 'ebpls_buss_nature ', 'natureid', 'naturedesc', $getit['bus_code'], "naturestatus='A' and natureid not in (select bus_code from tempbusnature where business_id='{$business_id}' and owner_id='{$owner_id}' and bus_code<>{$getit['bus_code']} and retire < 1) order by naturedesc"); } else { echo $getit['bus_nature']; } ?>
<?php //get bus nature $lope = 0; $gr = 0; while ($lope < $delayed) { ?> <tr><td></td><td >Gross Sales for <?php echo $yearnow - $delayed + $lope; ?> </td></tr> <?php $yearko = $yearnow - $delayed + $lope; $yearar = $yearar . ($yearnow - $delayed + $lope) . ","; $lope++; $getnat = SelectDataWhere($dbtype, $dbLink, "tempbusnature", " where owner_id={$owner_id} and business_id={$business_id}\n and active = 1"); while ($getit = FetchArray($dbtype, $getnat)) { $getit[bus_nature] = stripslashes($getit[bus_nature]); //check if have inputted value $getinput = mysql_query("select * from ebpls_buss_taxfeeother where\n\t\t\t\t\t\t\t\t\t\t\t\tnatureid = '{$getit['bus_code']}' and basis=3 and taxtype=2"); $getin = mysql_num_rows($getinput); $getwe = mysql_fetch_assoc($getinput); ?> <tr> <td><?php echo $getit[bus_nature]; ?> <input type=hidden name=yearko[<?php echo $gr; ?> ] value=<?php echo $yearko;
break; default: //Overview. // -------------------------------------------------------------------------------------------------- $cpage = "overview"; //includeLang('overview'); getLang('overview'); includeLang('tech'); include "includes/overviewfunctions.php"; $parse = array_merge($lang, $planetrow); $type_array = PlanetType($planetrow['image']); $parse['type'] = $type_array['type']; $parse['subtype'] = $type_array['subtype']; $alt = doquery("SELECT * FROM {{table}} WHERE `galaxy` = '" . $planetrow['galaxy'] . "' AND `system` = '" . $planetrow['system'] . "' AND `planet` = '" . $planetrow['planet'] . "' AND `id` <> '" . $planetrow['id'] . "' AND `planet_type` <> '2' LIMIT 1 ;", 'planets', false); if (mysql_num_rows($alt) > 0) { $alt = FetchArray($alt); $alt_type_array = PlanetType($alt['image']); if ($alt['planet_type'] == 1) { $parse['moonlink'] = ' <div id="planet_as_moon"> <a onclick="loadpage(\'./?cp=' . $alt['id'] . '&re=0\',\'' . $lang['Overview'] . ' - ' . $alt['name'] . '\',\'overview\'); document.getElementById(\'planet_ext\').value = \'\'; document.getElementById(\'resources_menu_link\').style.display = \'block\'; return false;" href="./?cp=' . $alt['id'] . '&re=0" class="tips" onmouseover="mr_tooltip(\'' . $alt['name'] . '\')" onmouseout="UnTip()"> <img alt="" src="' . GAME_SKIN . '/img/planets/large/' . $alt_type_array['type'] . '.jpg"> </a> </div>'; } else { $parse['moonlink'] = ' <div id="moon"> <a onclick="loadpage(\'./?cp=' . $alt['id'] . '&re=0\',\'' . $lang['Overview'] . ' - ' . $alt['name'] . '\',\'overview\'); document.getElementById(\'planet_ext\').value = \'-moon\'; document.getElementById(\'resources_menu_link\').style.display = \'none\'; return false;"
$resulta = mysql_fetch_row($result); $getlgu = @mysql_query("select city_municipality_desc from ebpls_city_municipality where city_municipality_code = '{$resulta['0']}'"); $getlgu = @mysql_fetch_row($getlgu); $getprov = @mysql_query("select province_desc from ebpls_province where province_code = '{$resulta['1']}'"); $getprov = @mysql_fetch_row($getprov); $iAssess = $resulta[3]; $result = mysql_query("select lgumunicipality, lguprovince, lguoffice from ebpls_buss_preference") or die(mysql_error()); $resulta = mysql_fetch_row($result); //$pdf=new FPDF('P','mm','A4'); $pdf = new PDF('P', 'mm', 'A4'); $pdf->setLGUinfo($getprov[0], $getlgu[0], ''); // leo renton ' baliktad kasi ang pagkakalagay ng variable nauna ang getlgu sa getprov kaya binaliktad ko muna. .. $pdf->AddPage(); $pdf->AliasNbPages(); $getdata = mysql_query("select * from ebpls_owner a, ebpls_barangay b, \n\t\t\t\t\tebpls_city_municipality e, ebpls_province f\n\t\t\twhere owner_id = {$owner_id} and\n\t\ta.owner_barangay_code=b.barangay_code and\n\t\ta.owner_city_code=e.city_municipality_code and \n\t\ta.owner_province_code=f.province_code"); $getda = FetchArray($dbtype, $getdata); // 2008.04.04 build owner address from known pieces where * indicates unknown $add = "{$getda['owner_street']}"; if ($getda[barangay_desc] != "*") { $add .= ", {$getda['barangay_desc']}"; } if ($getda[city_municipality_desc] != "*") { $add .= ", {$getda['city_municipality_desc']}"; } $add .= ", {$getda['province_desc']}"; $result = mysql_query("select a.business_permit_code, a.application_date, \n\t\t\t\tb.business_name, a.transaction, \n\t\t\t\ta.business_permit_id, \n\t\t\t\tb.employee_male, b.employee_female,\n\t\t\t\tconcat(c.owner_first_name, ' ', c.owner_middle_name, ' ', c.owner_last_name) as fulln,\n\t\t\t\tb.business_payment_mode, business_occupancy_code, \n\t\t\t\tconcat(b.business_lot_no, ' ', b.business_street, ' ', f.barangay_desc, ', ',\n \t\tg.city_municipality_desc, ', ', h.province_desc, ' ', b.business_zip_code) as bus_add,\n \t\tc.owner_civil_status, \n \t\tc.owner_birth_date,\n\t\t\t\tc.owner_citizenship, \n\t\t\t\tb.business_sec_reg_no , \n\t\t\t\tb.business_dti_reg_no ,\n\t\t\t\tb.business_dti_reg_date,\n\t\t\t\tc.owner_tin_no, i.business_category_desc, i.tax_exemption\n\t\t\t\tfrom ebpls_business_enterprise_permit a, \n\t\t\t\tebpls_business_enterprise b, ebpls_owner c, \n\t\t\t\tebpls_barangay f , ebpls_city_municipality g , ebpls_province h, ebpls_business_category i\n\t\t\t\twhere {$ddt} and \n\t\t\t\ta.business_id = b.business_id and a.owner_id = c.owner_id \n\t\t\t\tand b.business_barangay_code = f.barangay_code and g.city_municipality_code = b.business_city_code \n \t\tand h.province_code = b.business_province_code and\n \t\tb.business_category_code=i.business_category_code") or die(mysql_error()); $resulta = mysql_fetch_assoc($result); $pdf->SetFont('Arial', 'BU', 12); $pdf->SetX(5); $pdf->Cell(190, 5, '', 0, 2, 'C'); //$pdf->Cell(190,5,'SWORN DECLARATION',0,1,'C');