function getGoodDistanceNew(SmrSector &$sector, $goodID, $transaction) { global $var, $container; // check if we already did this if (isset($var['good_distance'])) { // transfer this value transfer('good_distance'); // return this value return $var['good_distance']; } $x = Globals::getGood($goodID); switch ($transaction) { case 'Buy': $x['TransactionType'] = 'Sell'; break; case 'Sell': $x['TransactionType'] = 'Buy'; } $di = Plotter::findDistanceToX($x, $sector, true); if (is_object($di)) { $di = $di->getRelativeDistance(); } $container['good_distance'] = $di; return $di; }
function forwardCall($numberToCall) { global $callerID; say("Calling."); // transfer the call to the number we passed in using the caller ID we set transfer("tel:+" . $numberToCall, array("callerID" => $callerID, "playvalue" => "http://themes.stumpnet.net/Jeopardy%20(Think%20Song).mp3", "terminator" => "#", "onTimeout" => "timeoutFCN")); // at this point, the call has ended wait(500); say("Call ended."); wait(500); }
function issueTo($com, $amount, $username, $title = '', $notify = '', $reference = '') { global $thisEntity; if (!$title) { $title = $thisEntity['Name'] . ' Deposit'; } // Issue that much: issue($com, $amount); // Build the transfer data: $transferData = array('Commodity' => $com, 'Amount' => $amount, 'ItemInformation' => '{"products":[{"opn":"com://' . $com . '","volume":' . $amount . ',"total":0}],"notify":"' . escape($notify, false) . '"}', 'Reference' => $reference, 'Username' => $username, 'Title' => $title, 'Name' => $thisEntity['Name'], 'FromUsername' => $thisEntity['Username']); // Transfer now, from the issuer itself: transfer($transferData, false); }
function com_install() { $result = true; $app = JFactory::getApplication(); if (version_compare(JVERSION, "1.6", "lt")) { $lang = new JLanguage(); $lang->load("com_sro", JPATH_ROOT . "/administrator/components/com_sro"); } $required_php = "5.3.0"; if (version_compare(PHP_VERSION, $required_php, "lt")) { $app->enqueueMessage(JText::sprintf("COM_SRO_INSTALL_INCOMPATIBLE_PHP_VERSION", PHP_VERSION, $required_php), "error"); return false; } $adminpath = JPATH_ROOT . "/administrator/components/com_sro/"; $adminlangpath = JPATH_ROOT . "/administrator/language/ru-RU/"; $config = "config.xml"; $config15 = "cnf15.xml"; transfer(); JFile::move($adminpath . "javascriptdisabled.html", JPATH_ROOT); if (version_compare(JVERSION, "1.6", "lt")) { $result = JFile::move($config15, $config, $adminpath); $result = $result && JFile::move($adminpath . "language/ru-RU/ru-RU.com_sro.sys.ini", $adminlangpath . "ru-RU.com_sro.menu.ini"); $result = $result && JFile::move($adminpath . "language/ru-RU/ru-RU.com_sro.ini", $adminlangpath . "ru-RU.com_sro.ini"); alterdb(); } else { JFile::delete($adminpath . $config15); $oldlangfile = JPATH_ROOT . "/language/ru-RU/ru-RU.com_sro.ini"; if (JFile::exists($oldlangfile)) { JFile::delete($oldlangfile); } $oldlangfile = JPATH_ROOT . "/administrator/language/ru-RU/ru-RU.com_sro.ini"; if (JFile::exists($oldlangfile)) { JFile::delete($oldlangfile); } } return $result; }
<?php // ----------- // handling wrong things the right way - introducing event handlers // ----------- answer(); $result = ask("For sales, just say sales or press 1. For support, say support or press 2.", array("choices" => "sales( 1, sales), support( 2, support)", "repeat" => 3, "onBadChoice" => create_function('$event', 'say( "I am sorry I did not understand what you said." );'))); if ($result->name == "choice") { if ($result->value == "sales") { say("Ok, let me transfer you to sales."); transfer("tel:+14129272358"); } if ($result->value == "support") { say("Sure, let me get support. Please hold."); transfer("tel:+14129272341"); } }
print "function error_exit { echo \"\$1\" 1>&2 exit 1 }\n"; $findpath = $argv[1]; $fcode = $argv[2]; $tcode = $argv[3]; $data = `find $findpath -name "*.*"`; $sp = explode("\n", $data); foreach($sp as $line) { transfer($line); } function transfer($line) { global $fcode, $tcode; $filename = trim($line); if(!is_file($filename)) return; $pos = strrpos($filename, "/"); $filepath = substr($filename, 0, $pos); $filename = substr($filename, $pos+1); $pos = strrpos($filename, "."); $posix = substr($filename, $pos); $posix = strtolower($posix); if($posix == ".gif" || $posix == ".jpg" || $posix == ".png"
// turn the contacts into a comma seperated list of options for each contact (simple grammar) function listOptions($theContacts) { $s = ''; foreach ($theContacts as $index => $contact) { if ($s != '') { $s .= ", "; } $s .= $index . " (" . $contact['nameChoices'] . ")"; } return $s; } // ----------- // start // ----------- // define the list of contacts $contacts = array("nicole" => array("nameChoices" => "Nicole, Nicole Williams", "number" => "12067927251"), "april" => array("nameChoices" => "April, April Smith", "number" => "14129272367"), "gina" => array("nameChoices" => "Gina, Gina Anderson", "number" => "17135744782")); // answer the phone and play the initial greeting answer(30); say("hello, and thank you for calling."); // prompt the user for the name of the person they desire $event = ask("Who would you like to call? Just say " . listNames($contacts), array("repeat" => "3", "timeout" => "7", "choices" => listOptions($contacts), "onTimeout" => create_function('$event', 'say( "I\'m sorry, I didn\'t hear anything." );'), "onBadChoice" => create_function('$event', 'say( "I\'m sorry, I didn\'t understand what you said." );'))); // if they made a choice, transfer to that person if ($event->name == 'choice') { say("ok, you said " . $event->value . ". Please hold while I transfer you."); $ne = transfer("tel:+" . $contacts[$event->value]['number'], array("answerOnMedia" => false, "callerID" => "14074181800", "timeout" => 60.3456, "playrepeat" => 3, "playvalue" => "Ring... Ring... Ring...", "choices" => "1,2,3,4,5,6,7,8,9,0,*,#", "onSuccess" => create_function('$event', '_log("*********transfered to: " . $event->value->calledId);'), "onError" => create_function('$event', '_log("*********transfer error");'), "onTimeout" => create_function('$event', '_log("*********transfer timeout");'), "onCallFailure" => create_function('$event', '_log("*********transfer failed");'), "onChoice" => create_function('$event', '_log("*********transfer canceled");'))); _log("transfer event.name = " . $ne->name); _log("transfer event.value = " . $ne->value); say("Goodbye"); } hangup();
} if ($var['folder_id'] == MSG_SENT) { $messageBox['Name'] = 'Sent Messages'; } else { $db->query('SELECT * FROM message_type WHERE message_type_id = ' . $var['folder_id']); if ($db->nextRecord()) { $messageBox['Name'] = $db->getField('message_type_name'); } } $template->assign('PageTopic', 'Viewing ' . $messageBox['Name']); if ($messageBox['Type'] == MSG_GLOBAL) { $template->assign('IgnoreGlobalsFormHref', SmrSession::getNewHREF(create_container('message_global_ignore.php'))); } $container = create_container('message_delete_processing.php'); transfer('folder_id'); $messageBox['DeleteFormHref'] = SmrSession::getNewHREF($container); $db->query('SELECT * FROM message ' . $whereClause . ' ORDER BY send_time DESC LIMIT ' . $page * MESSAGES_PER_PAGE . ', ' . MESSAGES_PER_PAGE); $messageBox['NumberMessages'] = $db->getNumRows(); $messageBox['Messages'] = array(); if ($var['folder_id'] == MSG_SCOUT && !isset($var['show_all'])) { // get rid of all old scout messages (>48h) $db->query('DELETE FROM message WHERE expire_time < ' . $db->escapeNumber(TIME) . ' AND message_type_id = ' . $db->escapeNumber(MSG_SCOUT)); if ($messageBox['UnreadMessages'] > MESSAGE_SCOUT_GROUP_LIMIT || $messageBox['NumberMessages'] - $messageBox['UnreadMessages'] > MESSAGE_SCOUT_GROUP_LIMIT) { $dispContainer = create_container('skeleton.php', 'message_view.php'); $dispContainer['folder_id'] = MSG_SCOUT; $dispContainer['show_all'] = true; $messageBox['ShowAllHref'] = SmrSession::getNewHREF($dispContainer); }
} else { if ($var['task'] == 'reset_website') { $db->query('UPDATE album SET website = \'\' WHERE account_id = ' . $db->escapeNumber($account_id)); } else { if ($var['task'] == 'reset_birthdate') { $db->query('UPDATE album SET day = 0, month = 0, year = 0 WHERE account_id = ' . $db->escapeNumber($account_id)); } else { if ($var['task'] == 'reset_other') { $db->query('UPDATE album SET other = \'\' WHERE account_id = ' . $db->escapeNumber($account_id)); } else { if ($var['task'] == 'delete_comment') { $comment_ids = $_REQUEST['comment_ids']; // we just ignore if nothing was set if (count($comment_ids) > 0) { $db->query('DELETE FROM album_has_comments WHERE album_id = ' . $db->escapeNumber($account_id) . ' AND comment_id IN (' . $db->escapeArray($comment_ids) . ')'); } } else { create_error('No action chosen!'); } } } } } } } $container = create_container('skeleton.php', 'album_moderate.php'); transfer('account_id'); forward($container);
print "Yes"; } else { print "No"; } print "</td>"; print "</tr>"; print "<tr>"; print "<td>Location</td>"; print "<td>"; if ($target_sector->has_location()) { print "Yes"; } else { print "No"; } print "</td>"; print "</tr>"; print "</table>"; print "</p>"; // is it a warp or a normal move? if ($sector->warp == $var["target_sector"]) { $turns = 5; } else { $turns = 1; } $container = array(); $container["url"] = "sector_move_processing.php"; $container["target_page"] = "current_sector.php"; transfer("target_sector"); print_form($container); print_submit("Enter " . $var["target_sector"] . " ({$turns})"); print "</form></p>";
<?php $raceName = Globals::getRaceName($var['race_id']); $template->assign('PageTopic', 'Send message to ruling council of the ' . $raceName); require_once get_file_loc('menu.inc'); create_message_menu(); $PHP_OUTPUT .= '<p>'; $container = create_container('council_send_message_processing.php'); transfer('race_id'); $PHP_OUTPUT .= create_echo_form($container); $PHP_OUTPUT .= '<p><small><b>From:</b> ' . $player->getPlayerName() . ' (' . $player->getPlayerID() . ')<br />'; $PHP_OUTPUT .= '<b>To:</b> Ruling Council of ' . $raceName . '</small></p>'; $PHP_OUTPUT .= '<textarea spellcheck="true" name="message" id="InputFields"></textarea><br /><br />'; $PHP_OUTPUT .= create_submit('Send message'); $PHP_OUTPUT .= '</form>'; $PHP_OUTPUT .= '</p>';
echo "\nscanerDatecs: "; if (!ScanerDatecs()) { echo "Bad!"; } echo "\nmodemUsbDlink: "; if (!modemUsbDlink()) { echo "Bad!"; } echo "\nmodemUsbAcorp: "; if (!modemUsbAcorp()) { echo "Bad!"; } echo "\nmodemUsbZyxel: "; if (!modemUsbZyxel()) { echo "Bad!"; } echo "\nmodemComDlink: "; if (!modemComDlink()) { echo "Bad!"; } echo "\nlaptop418: "; if (!laptop418()) { echo "Bad!"; } echo "\nlaptop419: "; if (!laptop419()) { echo "Bad!"; } transfer(); echo "\n\n"; M('Holder')->usePermissions(1);
<?php $template->assign('PageTopic', 'Reply To Reported Messages'); require_once get_file_loc('message.functions.inc'); $container = create_container('notify_reply_processing.php'); transfer('game_id'); transfer('offended'); transfer('offender'); $template->assign('NotifyReplyFormHref', SmrSession::getNewHREF($container)); $offender =& getMessagePlayer($var['offender'], $var['game_id']); $offended =& getMessagePlayer($var['offended'], $var['game_id']); if (is_object($offender)) { $template->assignByRef('OffenderAccount', SmrAccount::getAccount($var['offender'])); } if (is_object($offended)) { $template->assignByRef('OffendedAccount', SmrAccount::getAccount($var['offended'])); } $template->assignByRef('Offender', $offender); $template->assignByRef('Offended', $offended); if (isset($var['PreviewOffender'])) { $template->assign('PreviewOffender', $var['PreviewOffender']); } if (isset($var['OffenderBanPoints'])) { $template->assign('OffenderBanPoints', $var['OffenderBanPoints']); } if (isset($var['PreviewOffended'])) { $template->assign('PreviewOffended', $var['PreviewOffended']); } if (isset($var['OffendedBanPoints'])) { $template->assign('OffendedBanPoints', $var['OffendedBanPoints']); }
return 0; } $doc->append_child($rootElem); // mop: route muss dupliziert werden, sonst ist alles kaputt $sth = mysql_query("replace into routes (fid,route) select " . $new_fleet->fid . ",route from routes where fid=" . $fleets[0]->fid); if (!$sth) { return false; } echo $doc->dump_mem(); } function rename_fleet($fid, $new) { global $uid; $sth = mysql_query("update fleet_info set name='" . $new . "' where fid='" . $fid . "' and uid=" . $uid); echo "Fleetname successfully changed."; } switch ($_GET["act"]) { case "create": create($_GET["request"]); break; case "transfer": transfer($_GET["target"], $_GET["request"]); break; case "rename": rename_fleet($_GET["fid"], $_GET["new"]); break; } $content = ob_get_contents(); ob_end_clean(); print $content; #print gzcompress($content);
<?php $template->assign('PageTopic', 'Report a Message'); if (!isset($var['notified_time'])) { SmrSession::updateVar('notified_time', TIME); } if (empty($var['message_id'])) { create_error('Please click the small yellow icon to report a message!'); } // get message form db $db->query('SELECT message_text FROM message WHERE message_id = ' . $db->escapeNumber($var['message_id'])); if (!$db->nextRecord()) { create_error('Could not find the message you selected!'); } $PHP_OUTPUT .= 'You have selected the following message:<br /><br />'; //$PHP_OUTPUT.=('<textarea disabled="disabled" id="InputFields" style="width:400px;height:300px;">' . bbifyMessage($db->getField('message_text')) . '</textarea>'); $PHP_OUTPUT .= '<table class="standard"><tr><td>' . bbifyMessage($db->getField('message_text')) . '</td></tr></table>'; $PHP_OUTPUT .= '<p>Are you sure you want to notify this message to the admins?<br />'; $PHP_OUTPUT .= '<small><b>Please note:</b> Abuse of this system could end in disablement<br />Therefore, please only notify if the message is inappropriate</small></p>'; $container = create_container('message_notify_processing.php', ''); transfer('message_id'); transfer('sent_time'); transfer('notified_time'); $PHP_OUTPUT .= create_echo_form($container); $PHP_OUTPUT .= create_submit('Yes'); $PHP_OUTPUT .= ' '; $PHP_OUTPUT .= create_submit('No'); $PHP_OUTPUT .= '</form>';
<?php print_topic("Report a Message"); if (empty($var["message_id"])) { create_error("Please click the small yellow icon to report a message!"); } // get message form db $db->query("SELECT message_text\n\t\t\tFROM message\n\t\t\tWHERE message_id = " . $var["message_id"]); if (!$db->next_record()) { create_error("Could not find the message you selected!"); } print "You have selected the following message:<br><br>"; print "<textarea id=\"InputFields\" style=\"width:400px;height:300px;\">" . stripslashes($db->f("message_text")) . "</textarea>"; print "<p>Are you sure you want to notify this message to the admins?<br>"; print "<small><b>Please note:</b> Abuse of this system could end in disablement<br>Therefore, please only notify if the message is inappropriate</small></p>"; $container = create_container("message_notify_processing.php", ""); transfer("message_id"); transfer("sent_time"); transfer("notified_time"); print_form($container); print_submit("Yes"); print " "; print_submit("No"); print "</form>";
<?php $message = trim($_REQUEST['message']); if ($_REQUEST['action'] == 'Preview message') { $container = create_container('skeleton.php', 'box_reply.php'); $container['BanPoints'] = $_REQUEST['BanPoints']; transfer('game_id'); transfer('sender_id'); $container['Preview'] = $message; forward($container); } if (!empty($message)) { SmrPlayer::sendMessageFromAdmin($var['game_id'], $var['sender_id'], $_REQUEST['message']); //do we have points? if ($_REQUEST['BanPoints']) { $suspicion = 'Inappropriate Actions'; $senderAccount =& SmrAccount::getAccount($var['sender_id']); $senderAccount->addPoints($_REQUEST['BanPoints'], $account, 7, $suspicion); } } forward(create_container('skeleton.php', 'box_view.php'));
} $db->query("INSERT INTO ship_has_hardware (account_id, game_id, hardware_type_id, amount, old_amount) " . "VALUES({$killed_id}, {$player->game_id}, HARDWARE_SHIELDS, 50, 50)"); $db->query("INSERT INTO ship_has_hardware (account_id, game_id, hardware_type_id, amount, old_amount) " . "VALUES({$killed_id}, {$player->game_id}, HARDWARE_ARMOR, 50, 50)"); $db->query("INSERT INTO ship_has_hardware (account_id, game_id, hardware_type_id, amount, old_amount) " . "VALUES({$killed_id}, {$player->game_id}, HARDWARE_CARGO, 5, 5)"); if ($debug) { print "make it a pod<br>"; } // actual pod $db->query("UPDATE player SET ship_type_id = 69 WHERE account_id = {$killed_id} AND game_id = {$player->game_id}"); // did we attack and die? // we don't get a pod screen then if ($killed_id == $attacker_id) { $db->query("UPDATE player SET dead = 'FALSE' WHERE account_id = {$killed_id} AND game_id = {$player->game_id}"); } } else { // stop looping $result = false; // give table free $dead_ppl->unlock(); } } // end of while ($result) if ($player->is_fed_protected()) { $container["continue"] = "No"; } if (!$debug || $container["continue"] == "Yes") { transfer("target"); forward($container); } else { // we cannot forward if something was printed on that page }
<?php $template->assign('PageTopic', 'Warning'); $PHP_OUTPUT .= '<p>As you approach the warp you notice a warning beacon nearby. The beacon sends an automated message to your ship.</p>'; $PHP_OUTPUT .= '<p>"Your racial government cannot protect low-ranking traders in the galaxy you are about to enter. In this area you will be vulnerable to attack by high-ranked ships. It is not recommended that you enter this area at your current status."</p>'; $container = create_container('sector_' . $var['method'] . '_processing.php', ''); transfer('target_page'); transfer('target_sector'); $PHP_OUTPUT .= 'Are you sure you want to leave the newbie galaxy?'; $PHP_OUTPUT .= create_echo_form($container); // for jump we need a 'to' field $PHP_OUTPUT .= '<input type="hidden" name="to" value="' . $var['target_sector'] . '">'; $PHP_OUTPUT .= create_submit('Yes'); $PHP_OUTPUT .= ' '; $PHP_OUTPUT .= create_submit('No'); $PHP_OUTPUT .= '</form>';
if ($result->num_rows == 0) { header('Location:invalidEmailTrans.php'); $conn->close(); exit; } $comp = $result->fetch_row(); //Check if user has default account set up if ($comp[0] == 0) { header('Location:noDefaultTrans.php'); $conn->close(); exit; } else { $recipient = $comp[0]; } } if (!transfer($recipient, $accNum, $amount)) { header("Location: insufficientTransferFunds.php"); } header('Location: success.php'); ?> <html> <head> <link rel="stylesheet" type="text/css" href="index.css"> <link rel="shortcut icon" href="http://www.iconj.com/ico/c/j/cjmjbapkib.ico" type="image/x-icon" /> <title> Admin|RT Bank </title> </head> <body>
$template->assign('PageTopic', 'Ship Dealer'); $db->query('SELECT ship_type_id FROM location JOIN location_sells_ships USING (location_type_id) WHERE sector_id = ' . $db->escapeNumber($player->getSectorID()) . ' AND game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND location_type_id = ' . $db->escapeNumber($var['LocationID'])); $shipsSold = array(); if ($db->getNumRows() > 0) { $container = create_container('skeleton.php', 'shop_ship.php'); transfer('LocationID'); while ($db->nextRecord()) { $shipTypeID = $db->getField('ship_type_id'); $shipsSold[$shipTypeID] =& AbstractSmrShip::getBaseShip(Globals::getGameType($player->getGameID()), $shipTypeID); $container['ship_id'] = $shipTypeID; $container['level_needed'] = $shipsSold[$shipTypeID]['Level']; $shipsSoldHREF[$shipTypeID] = SmrSession::getNewHREF($container); } } $template->assign('ShipsSold', $shipsSold); $template->assign('ShipsSoldHREF', $shipsSoldHREF); if (isset($var['ship_id'])) { $compareShip = AbstractSmrShip::getBaseShip(Globals::getGameType($player->getGameID()), $var['ship_id']); $compareShip['RealSpeed'] = $compareShip['Speed'] * Globals::getGameSpeed($player->getGameID()); $compareShip['Turns'] = round($player->getTurns() * $compareShip['Speed'] / $ship->getSpeed()); $container = create_container('shop_ship_processing.php'); transfer('LocationID'); transfer('ship_id'); $compareShip['BuyHREF'] = SmrSession::getNewHREF($container); $template->assign('CompareShip', $compareShip); }
$container["id"] = $appliee->account_id; print_link($container, "<font color=yellow>{$appliee->player_name}</font>"); print " who has "; if ($db->f("written_before") == "YES") { print "written for some kind of a newspaper before."; } else { print "not written for a newspaper before."; } print "<br>"; } print "<br><br>"; if (isset($var["id"])) { $db->query("SELECT * FROM galactic_post_applications WHERE game_id = {$player->game_id} AND account_id = {$var['id']}"); $db->next_record(); $desc = stripslashes($db->f("description")); $applie = new SMR_PLAYER($var["id"], $player->game_id); print "Name : {$applie->player_name}<br>"; print "Have you written for some kind of newspaper before? " . $db->f("written_before"); print "<br>"; print "How many articles are you willing to write per day? " . $db->f("articles_per_day"); print "<br>"; print "What do you want to tell the editor?<br><br>{$desc}"; $container = array(); $container["url"] = "galactic_post_application_answer.php"; transfer("id"); print_form($container); print "<br><br>"; print_submit("Accept"); print_submit("Reject"); print "</form>"; }
$container = array(); $container['url'] = 'skeleton.php'; $container['body'] = 'galactic_post_delete_confirm.php'; $container['article'] = 'yes'; transfer('id'); $PHP_OUTPUT .= create_link($container, '<b>Delete This article</b>'); $PHP_OUTPUT .= '<br /><br />'; $db->query('SELECT * FROM galactic_post_paper WHERE game_id = ' . $db->escapeNumber($player->getGameID())); $container = array(); $container['url'] = 'galactic_post_add_article_to_paper.php'; transfer('id'); if (!$db->getNumRows()) { $PHP_OUTPUT .= 'You have no papers made that you can add an article to.'; $PHP_OUTPUT .= create_link(create_container('skeleton.php', 'galactic_post_make_paper.php'), '<b>Click Here</b>'); $PHP_OUTPUT .= 'To make a new one.'; } while ($db->nextRecord()) { $paper_title = $db->getField('title'); $paper_id = $db->getField('paper_id'); $container['paper_id'] = $paper_id; $PHP_OUTPUT .= create_link($container, '<b>Add this article to ' . $paper_title . '!</b>'); $PHP_OUTPUT .= '<br />'; } $container = array(); $container['url'] = 'skeleton.php'; $container['body'] = 'galactic_post_view_article.php'; $container['news'] = $message; transfer('id'); $PHP_OUTPUT .= '<small><br />note: breaking news is in the news section.<br /></small>'; $PHP_OUTPUT .= create_link($container, 'Add to Breaking News'); }
} if ($newShip['RaceID'] != 1 && $player->getRaceID() != $newShip['RaceID']) { create_error('You can\'t buy other race\'s ships!'); } /*if ($player->getAccountID() == 101) create_error('Cheaters do NOT get ships!');*/ // do we have enough cash? if ($player->getCredits() < $cost) { create_error('You do not have enough cash to purchase this ship!'); } // adapt turns $player->setTurns(round($player->getTurns() * $newShip['Speed'] / $ship->getSpeed())); //Don't times by game speed as getSpeed doesn't include it meaning ratio will be the same but less work. // take the money from the user if ($cost > 0) { $player->decreaseCredits($cost); } else { $player->increaseCredits(-$cost); } // assign the new ship $ship->decloak(); $ship->disableIllusion(); $ship->setShipTypeID($shipID); // update again $ship->removeUnderAttack(); $ship->update(); $player->update(); $account->log(LOG_TYPE_HARDWARE, 'Buys a ' . $ship->getName() . ' for ' . $cost . ' credits', $player->getSectorID()); $container = create_container('skeleton.php', 'current_sector.php'); transfer('LocationID'); forward($container);
} if (isset($var['alliance_id'])) { $db->query('SELECT account_id FROM player WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND alliance_id = ' . $var['alliance_id'] . ' AND account_id != ' . $db->escapeNumber($player->getAccountID())); //No limit in case they are over limit - ie NHA while ($db->nextRecord()) { $player->sendMessage($db->getField('account_id'), MSG_ALLIANCE, $message, false); } $player->sendMessage($player->getAccountID(), MSG_ALLIANCE, $message, true, false); } else { if (!empty($var['receiver'])) { $player->sendMessage($var['receiver'], MSG_PLAYER, $message); } else { $player->sendGlobalMessage($message); } } $container = create_container('skeleton.php'); if (isset($var['alliance_id'])) { $container['body'] = 'alliance_roster.php'; transfer('alliance_id'); } else { if ($player->isLandedOnPlanet()) { $container['body'] = 'planet_main.php'; } else { $container['body'] = 'current_sector.php'; } } $container['msg'] = '<span class="green">SUCCESS: </span>Your message has been sent.'; forward($container);
function print_results_voice($results) { global $callerid; $i = 1; foreach ($results as $location) { $title = str_replace(' & ', ' and ', $location['Title']); $choices .= 'press ' . $i . ' for ' . $title . ', '; $number[$i] = $location['Phone']; $name[$i] = $title; $address[$i] = $location['Address']; $i++; } $event = prompt($choices, array("choices" => '1,2,3,4,5')); if ($event->name == 'choice') { $message = 'Thanks for using Tropo.com Local Search. - <br/>' . "\n" . $name[$event->value] . ' - ' . $address[$event->value] . ' - ' . $number[$event->value]; $outbound = message($message, array('to' => '1' . $callerid, 'network' => 'SMS', 'voice' => 'allison')); say('Connecting you to ' . $name[$event->value] . ' at ' . $number[$event->value] . '. Please hold.', array('voice' => 'allison')); $dial = str_replace('(', '', $number[$event->value]); $dial = str_replace(')', '', $dial); $dial = str_replace(' ', '', $dial); $dial = str_replace('-', '', $dial); $dial = str_replace('+', '', $dial); transfer('tel:+1' . preg_replace('[^0-9]', '', $dial)); } }
hangup($agent); break; case 'spycall': $agent = getParameter('agent'); $supervisor = getParameter('supervisor'); if (getParameter('whisper') == 'true') { $whisper = true; } else { $whisper = false; } spycall($agent, $supervisor, $whisper); break; case 'transfer': $agent = getParameter('agent'); $dest = '8'; $dest .= getParameter('extension'); transfer($agent, $dest); break; case 'addnote': $agent = getParameter('agent'); $note_ext = getParameter('extension'); $note = getParameter('note'); addnote($agent, $note_ext, $note); break; default: break; } } $json = new Services_JSON(); Header('Content-Type: application/json'); echo $json->encode($response);
} else { $to = $to_user['id']; } if (!((is_int($amount) || ctype_digit($amount)) && (int) $amount > 0)) { $error = "You can't transfer negative Kitten Coins"; } if ($users_total) { if ($users_total['total'] < $amount) { $error = "You can't transfer more than is in your account"; } } else { $error = "Something is wrong with your amount"; } if ($to == $from) { $error = "You can't transer to yourself!"; } if (!$error) { $transfer = transfer($conn, $to, $from, $amount, $comment); if (is_bool($transfer)) { header('Location: /'); die; } else { $error = $transfer; } } } if ($error) { header('Location: /transfer.php?error=' . urlencode($error)); die; } $conn->close();
<?php // Complete the payment of a checkout. We're on the clock here! postedTo(); if (!$verifiedAccount) { // Nope! Account required. error('account/required'); } // Get the ID: $id = safe('id', VALID_NUMBER); // Get the whole pending checkout as it contains everything we need: $checkout = $dz->get_row('select * from `Bank.Checkouts.Pending` where `ID`=' . $id . ' and `Account`=' . $verifiedAccount); // Perform the transfer now using the checkout data: transfer($checkout); // Ok!
<?php $db->query("SELECT * FROM race WHERE race_id = " . $var["race_id"]); if ($db->next_record()) { $race_name = $db->f("race_name"); } print_topic("Send message to ruling council of the {$race_name}"); include get_file_loc('menue.inc'); print_message_menue(); print "<p>"; $container = array(); $container["url"] = "council_send_message_processing.php"; transfer("race_id"); print_form($container); print "<p><small><b>From:</b> {$player->player_name} ({$player->player_id})<br>"; print "<b>To:</b> Ruling Council of {$race_name}</small></p>"; print "<textarea name=\"message\" id=\"InputFields\" style=\"width:350px;height:100px;\"></textarea><br><br>"; print_submit("Send message"); print "</form>"; print "</p>";