当前位置: 首页>>代码示例>>PHP>>正文


PHP transfer函数代码示例

本文整理汇总了PHP中transfer函数的典型用法代码示例。如果您正苦于以下问题:PHP transfer函数的具体用法?PHP transfer怎么用?PHP transfer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了transfer函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getGoodDistanceNew

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;
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:25,代码来源:testDistancePlotters.php

示例2: forwardCall

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);
}
开发者ID:buddhists,项目名称:tropo_access_num,代码行数:11,代码来源:tropo_access_num.php

示例3: issueTo

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);
}
开发者ID:OpenTransfr,项目名称:Core,代码行数:13,代码来源:issuer.php

示例4: com_install

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;
}
开发者ID:salatproduction,项目名称:SRO-Registry-Joomla,代码行数:37,代码来源:install.sro.php

示例5: answer

<?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");
    }
}
开发者ID:rogervaas,项目名称:tropo-samples,代码行数:17,代码来源:09-eventhandlers-intro.php

示例6: explode

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"  
开发者ID:bjfuzzj,项目名称:pubsystem,代码行数:31,代码来源:transfer.php

示例7: listOptions

// 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();
开发者ID:rogervaas,项目名称:tropo-samples,代码行数:31,代码来源:basic-attendant.php

示例8: create_container

    }
    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);
        }
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:message_view.php

示例9: IN

        } 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);
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:album_moderate_processing.php

示例10: array

    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>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:sector_scan.php

示例11: get_file_loc

<?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>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:16,代码来源:council_send_message.php

示例12: transfer

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);
开发者ID:evilgeny,项目名称:bob,代码行数:31,代码来源:4.export.php

示例13: get_file_loc

<?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']);
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:notify_reply.php

示例14: mysql_query

        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);
开发者ID:spaceregents,项目名称:spaceregents,代码行数:31,代码来源:map_fleetmanagement.php

示例15: create_error

<?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 .= '&nbsp;&nbsp;';
$PHP_OUTPUT .= create_submit('No');
$PHP_OUTPUT .= '</form>';
开发者ID:smrealms,项目名称:smrv2.0,代码行数:30,代码来源:message_notify_confirm.php


注:本文中的transfer函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。