echo "<th>დრო</th>"; echo "<th>აბონენტი</th>"; echo "</tr>\n"; echo "</thead><tbody>\n"; } if ($contador % 2) { $odd = ""; } else { $odd = ""; } if ($last != "") { $last = $last . " " . $lang[$language]['min_ago']; } else { $last = $lang[$language]['no_info']; } $agent_name = agent_name($aname); $rr = mysql_fetch_array(mysql_query(" SELECT `user_info`.`name`,\n \t\t\t\t `file`.`rand_name`,\n\t\t\t\t `department`.`name`\n \t\t\t\t FROM `users`\n \t\t\t\t JOIN user_info ON users.id = user_info.user_id\n \t\t\t\t LEFT JOIN file ON users.id = file.users_id\n\t\t\t\t LEFT JOIN department ON user_info.dep_id = department.id\n \t\t\t\t WHERE users.extension_id = '{$myExt['1']}'")); echo '<tr ' . $odd . ' queue="' . $qn . '" dep="' . $rr[2] . '" ext="' . $myExt[1] . '" user="******" state="' . $color[$aval] . '" >'; echo "<td>{$qn}</td>"; echo "<td>{$rr['2']}</td>"; echo "<td>{$agent_name}</td>"; if ($stat != "") { $aval = "paused"; } if (!array_key_exists($key, $inuse)) { if ($aval == "busy") { $aval = "not in use"; } } $aval2 = ereg_replace(" ", "_", $aval); $mystringaval = $lang[$language][$aval2];
function region_move_money($method_name, $params, $app_data) { global $economy_sink_account; $req = $params[0]; $agentid = $req['agentId']; $sessionid = $req['secureSessionId']; $regionid = $req['regionId']; $secret = $req['secret']; $currencySecret = $req['currencySecret']; $destid = $req['destId']; $cash = $req['cash']; $aggregatePermInventory = $req['aggregatePermInventory']; $aggregatePermNextOwner = $req['aggregatePermNextOwner']; $flags = $req['flags']; $transactiontype = $req['transactionType']; $description = $req['description']; $ipAddress = $_SERVER['REMOTE_ADDR']; # # Validate region secret # $db = new DB(); $sql = "select UUID from " . C_REGIONS_TBL . " " . "where UUID='" . $db->escape($regionid) . "' and " . "regionSecret='" . $db->escape($secret) . "'"; $db->query($sql); list($region_id) = $db->next_record(); if ($region_id) { # We have a region, check agent session $sql = "select UUID from " . C_AGENTS_TBL . " " . "where UUID='" . $db->escape($agentid) . "' and " . "secureSessionID='" . $db->escape($sessionid) . "' and " . "agentOnline=1 and " . "currentRegion='" . $db->escape($regionid) . "'"; $db->query($sql); list($user_id) = $db->next_record(); if ($user_id) { if (get_balance($agentid) < $cash) { $response_xml = xmlrpc_encode(array('success' => False, 'errorMessage' => "You do not have sufficient funds for this purchase", 'errorURI' => " ")); } else { if ($destid == "00000000-0000-0000-0000-000000000000") { $destid = $economy_sink_account; } if ($transactiontype == 1002) { user_alert($agentid, "00000000-0000-0000-0000-000000000000", "You paid L\$ " . $cash . " to create a group"); $description = "Group creation fee"; } else { if ($transactiontype == 1101) { user_alert($agentid, "00000000-0000-0000-0000-000000000000", "You paid L\$ " . $cash . " to upload."); $description = "Upload Charge"; } else { if ($transactiontype == 3000) { $description = "Give Inventory"; } else { if ($transactiontype == 5001) { $destName = agent_name($destid); $sourceName = agent_name($agentid); user_alert($agentid, "00000000-0000-0000-0000-000000000000", "You paid " . $destName . " L\$" . $cash); user_alert($destid, "00000000-0000-0000-0000-000000000000", $sourceName . " paid you L\$" . $cash); $description = "Gift"; } else { if ($transactiontype == 5002) { if ($destid == $economy_sink_account) { user_alert($agentid, "00000000-0000-0000-0000-000000000000", "You paid L\$ " . $cash . " for a parcel of land."); } else { $destName = agent_name($destid); $sourceName = agent_name($agentid); user_alert($agentid, "00000000-0000-0000-0000-000000000000", "You paid " . $destName . " L\$" . $cash . " for a parcel of land."); user_alert($destid, "00000000-0000-0000-0000-000000000000", $sourceName . " paid you L\$" . $cash . " for a parcel of land"); } $description = "Land Sale"; } else { if ($transactiontype == 5008) { $destName = agent_name($destid); $sourceName = agent_name($agentid); user_alert($agentid, "00000000-0000-0000-0000-000000000000", "You paid " . $destName . " L\$" . $cash); user_alert($destid, "00000000-0000-0000-0000-000000000000", $sourceName . " paid you L\$" . $cash); } else { if ($transactiontype == 2) { $destName = agent_name($destid); $sourceName = agent_name($agentid); user_alert($agentid, "00000000-0000-0000-0000-000000000000", "You paid " . $destName . " L\$" . $cash); user_alert($destid, "00000000-0000-0000-0000-000000000000", $sourceName . " paid you L\$" . $cash); } } } } } } } move_money($agentid, $destid, $cash, $aggregatePermInventory, $aggregatePermNextOwner, $flags, $transactiontype, $description, $regionid, $ipAddress); $response_xml = xmlrpc_encode(array('success' => True, 'agentId' => $agentid, 'funds' => get_balance($agentid), 'funds2' => get_balance($destid), 'currencySecret' => " ")); } } else { $response_xml = xmlrpc_encode(array('success' => False, 'errorMessage' => "Unable to authenticate avatar. Money operations may be unavailable", 'errorURI' => " ")); } } else { $response_xml = xmlrpc_encode(array('success' => False, 'errorMessage' => "This region is not authorized to manage your money. Money operations may be unavailable", 'errorURI' => " ")); } header("Content-type: text/xml"); print $response_xml; $stri = update_simulator_balance($agentid); $stri = update_simulator_balance($destid); return ""; }