• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP print_line函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: message_show_all

function message_show_all($user_id, $msgbox)
{
    assert(is_numeric($user_id));
    assert(is_string($msgbox));
    // Display all messages
    $found_messages = 0;
    $result = sql_query("SELECT * FROM m_messages WHERE deleted=0 AND type='" . $msgbox . "' AND user_id=" . $user_id . " ORDER BY DATETIME DESC");
    while ($message = sql_fetchrow($result)) {
        message_view($msgbox, $message);
        $found_messages = 1;
    }
    // If there were no messages, display something else..
    if ($found_messages == 0) {
        print_line("<center>Your messagebox is empty...</center><br>");
    }
}
开发者ID:jaytaph,项目名称:perihelion-oldcode,代码行数:16,代码来源:message.php


示例2: dump

function dump($data, $depth = 0)
{
    if (is_array($data)) {
        print_line('[', $depth);
        foreach ($data as $key => $value) {
            if (!is_int($key)) {
                print_line("{$key} =>", $depth + 1);
            }
            dump($value, $depth + 2);
        }
        print_line(']', $depth);
        return;
    }
    if (is_object($data)) {
        if (method_exists($data, '__toString')) {
            $class = get_class($data);
            print_line("[{$class}] {$data}", $depth);
            return;
        }
        $class = get_class($data);
        print_line("[{$class}] {", $depth);
        if ($data instanceof \IteratorAggregate) {
            $iterator = $data->getIterator();
        } elseif ($data instanceof \Iterator) {
            $iterator = $data;
        } else {
            $iterator = new \ArrayIterator((array) $data);
        }
        for ($iterator->rewind(); $iterator->valid(); $iterator->next()) {
            if (!is_int($iterator->key())) {
                dump($iterator->key(), $depth + 1);
            }
            dump($iterator->current(), $depth + 2);
        }
        print_line('}', $depth);
        return;
    }
    if (is_string($data)) {
        print_line('"' . $data . '"', $depth);
        return;
    }
    print_line($data, $depth);
}
开发者ID:igorw,项目名称:edn,代码行数:43,代码来源:util.php


示例3: trade_show_routes

function trade_show_routes($user_id)
{
    assert(is_numeric($user_id));
    global $_GALAXY;
    $firstrow = 1;
    $result = sql_query("SELECT * FROM a_trades");
    while ($traderoute = sql_fetchrow($result)) {
        $src_planet = anomaly_get_anomaly($traderoute['src_planet_id']);
        $dst_planet = anomaly_get_anomaly($traderoute['dst_planet_id']);
        // We don't own the source or destination planet... skip it..
        if ($src_planet['user_id'] != $user_id and $dst_planet['user_id'] != $user_id) {
            continue;
        }
        $vessel = vessel_get_vessel($traderoute['vessel_id']);
        $ore1 = "";
        $ore2 = "";
        if ($traderoute['src_ore'] == ORE_NONE) {
            $ore1 = "None, ";
        } elseif ($traderoute['src_ore'] == ORE_ALL) {
            $ore1 = "All ores, ";
        } else {
            $ores = csl($traderoute['src_ore']);
            foreach ($ores as $ore) {
                $ore1 .= ore_get_ore_name($ore) . ", ";
            }
        }
        // Chop off last comma
        $ore1 = substr_replace($ore1, "", -2);
        if ($traderoute['dst_ore'] == ORE_NONE) {
            $ore2 = "None, ";
        } elseif ($traderoute['dst_ore'] == ORE_ALL) {
            $ore2 = "All ores, ";
        } else {
            $ores = csl($traderoute['dst_ore']);
            foreach ($ores as $ore) {
                $ore2 .= ore_get_ore_name($ore) . ", ";
            }
        }
        // Chop off last comma
        $ore2 = substr_replace($ore2, "", -2);
        if ($firstrow == 1) {
            $firstrow = 0;
            print_remark("Vessel table");
            echo "<table align=center width=80% border=0>\n";
            echo "  <tr class=wb>";
            echo "<th>Vessel</th>";
            echo "<th>Source</th>";
            echo "<th>Ores</th>";
            echo "<th>Destination</th>";
            echo "<th>Ores</th>";
            echo "</tr>\n";
        }
        echo "  <tr class=bl>\n";
        echo "    <td>&nbsp;<img src=" . $_CONFIG['URL'] . $_GALAXY['image_dir'] . "/ships/trade.jpg>&nbsp;<a href=vessel.php?cmd=" . encrypt_get_vars("showvid") . "&vid=" . encrypt_get_vars($vessel['id']) . ">" . $vessel['name'] . "</a>&nbsp;</td>\n";
        echo "    <td>&nbsp;<a href=anomaly.php?cmd=" . encrypt_get_vars("show") . "&aid=" . encrypt_get_vars($src_planet['id']) . ">" . $src_planet['name'] . "</a>&nbsp;</td>\n";
        echo "    <td>&nbsp;" . $ore1 . "&nbsp;</td>\n";
        echo "    <td>&nbsp;<a href=anomaly.php?cmd=" . encrypt_get_vars("show") . "&aid=" . encrypt_get_vars($dst_planet['id']) . ">" . $dst_planet['name'] . "</a>&nbsp;</td>\n";
        echo "    <td>&nbsp;" . $ore2 . "&nbsp;</td>\n";
        echo "  </tr>\n";
    }
    if ($firstrow == 0) {
        echo "</table>\n";
        echo "<br><br>\n";
    } else {
        print_line("There are currently no traderoutes available.");
    }
}
开发者ID:jaytaph,项目名称:perihelion-oldcode,代码行数:67,代码来源:trade.php


示例4: comm_send_to_server

    $data['name'] = 0;
    $data['uid'] = 0;
    comm_send_to_server("PRESET", $data, $ok, $errors);
}
if ($cmd == "create") {
    $distance = substr($ne_distance, 0, 5);
    $angle = substr($ne_angle, 0, 6);
    if (!preg_match("/^\\d+\$/", $distance)) {
        print_line("<li><font color=red>You should enter a distance in the format ######.</font>\n");
    } elseif (!preg_match("/^\\d{1,6}\$/", $angle)) {
        print_line("<li><font color=red>You should enter an angle in the format ######.</font>\n");
    } else {
        if ($distance < $_GALAXY['galaxy_core']) {
            print_line("<li><font color=red>You cannot fly that far into the galaxy core. Try a higher distance (minimum is " . $_GALAXY['galaxy_core'] . ").</font>\n");
        } elseif ($distance > $_GALAXY['galaxy_size']) {
            print_line("<li><font color=red>You cannot fly outside of the galaxy. Try a lower distance (maximum is " . $_GALAXY['galaxy_size'] . ").</font>\n");
        } else {
            $ok = "";
            $errors['PARAMS'] = "Incorrect parameters specified..\n";
            $errors['NAME'] = "The preset name you already used.\n";
            $data['action'] = "create";
            $data['distance'] = $distance;
            $data['angle'] = $angle;
            $data['name'] = $ne_name;
            $data['uid'] = $uid;
            $data['pid'] = 0;
            comm_send_to_server("PRESET", $data, $ok, $errors);
        }
    }
}
// Show command, always executed.
开发者ID:jaytaph,项目名称:perihelion-oldcode,代码行数:31,代码来源:vesselpreset.php


示例5: dirname

 * @author Gassan Idriss <[email protected]>
*/
require_once dirname(__FILE__) . '/functions.php';
if (!isset($argv[1]) || !isset($argv[2])) {
    print_line(PHP_EOL . 'Usage:');
    print_line("\t" . 'php ' . $_SERVER['SCRIPT_NAME'] . ' /path/to/fragment.xml ClassName [/out/dir]');
    print_line("\t" . 'php ' . $_SERVER['SCRIPT_NAME'] . ' "<XML></XML>" ClassName [/out/dir]', true);
}
$sourceXml = $argv[1];
$targetClass = $argv[2];
$targetDir = isset($argv[3]) && is_dir($argv[3]) ? $argv[3] : dirname(__FILE__);
if (!is_dir($targetDir)) {
    print_line(spritnf('Dir %s Not Found', $targetDir), true);
}
if (file_exists($sourceXml)) {
    $xml = new \SimpleXMLElement(file_get_contents($sourceXml));
} else {
    $xml = new \SimpleXMLElement($sourceXml);
}
$setters = '';
$assertions = '';
foreach ($xml->children() as $child) {
    print_line($child->getName());
    $name = $child->getName();
    $camelName = $name;
    $camelName[0] = strtolower($camelName[0]);
    $setters .= generate_setter($name, $camelName);
    $assertions .= generate_assertion($name, $camelName);
}
$template = replace_template(dirname(__FILE__) . '/generate_class_from_xml_fragment_class_template.php.template', array('{name}' => $targetClass, '{setters}' => $setters, '{assertions}' => $assertions, '{expected_xml}' => $xml->saveXML(), '{xml_assertions}' => null));
file_put_contents($targetDir . '/' . $targetClass . 'Test.php', $template);
开发者ID:ghassani,项目名称:miva-provision,代码行数:31,代码来源:generate_test_from_xml_fragment.php


示例6: array_push

        if (!$chunk) {
            continue;
        }
        $tree = $tree . '/' . $chunk;
        array_push($paths, $tree);
    }
    $paths = array_reverse($paths);
    foreach ($paths as $path) {
        if (is_file($path . '/wp-config.php')) {
            define('ABSPATH', $path . '/');
            break;
        }
    }
}
if (!defined('ABSPATH')) {
    print_line("Unable to determine wordpress path. Please set it using WORDPRESS_PATH.");
    die;
}
$_SERVER = array("HTTP_HOST" => "disqus.com", "SCRIPT_NAME" => "", "PHP_SELF" => __FILE__, "SERVER_NAME" => "localhost", "REQUEST_URI" => "/", "REQUEST_METHOD" => "GET");
require_once ABSPATH . 'wp-config.php';
// swap out the object cache due to memory constraints
global $wp_object_cache;
class DummyWP_Object_Cache extends WP_Object_Cache
{
    function set($id, $data, $group = 'default', $expire = '')
    {
        return;
    }
    function delete($id, $group = 'default', $force = false)
    {
        return;
开发者ID:coreymargulis,项目名称:karenmargulis,代码行数:31,代码来源:wp-cli.php


示例7: print_item

function print_item($url, $short_name, $long_name, $logo, $level, $type)
{
    $href_start = "";
    $href_end = "";
    $img = "&nbsp;";
    $skip_space = 3;
    global $member, $contrib, $partner;
    global $organization, $individual;
    global $num_members, $num_contribs, $num_partners;
    global $num_organizations, $num_individuals;
    if (!empty($url)) {
        $href_start = "<a href=\"{$url}\">";
        $href_end = "</a>";
    }
    print "<tr>\n";
    # Organization
    $org = "{$href_start}{$short_name}{$href_end}";
    if (!empty($long_name)) {
        $org .= "<br>{$long_name}";
    }
    print "<td>{$org}</td>\n";
    print "<td width={$skip_space}>&nbsp;</td>\n";
    # Type
    print "<td align=\"center\">";
    if ($type == $organization) {
        print "Organization";
        ++$num_organizations;
    } else {
        if ($type == $individual) {
            print "Individual";
            ++$num_individuals;
        }
    }
    print "</td>\n";
    # Status
    print "<td align=\"center\">";
    if ($level == $member) {
        print "Member";
        ++$num_members;
    } else {
        if ($level == $contrib) {
            print "Contributor";
            ++$num_contribs;
        } else {
            if ($level == $partner) {
                print "Partner";
                ++$num_partners;
            }
        }
    }
    print "</td>\n<td width={$skip_space}>&nbsp;</td>\n";
    # Logo
    if (!empty($logo)) {
        $size = GetImageSize($logo);
        print "<td align=center>{$href_start}<img src=\"{$logo}\" {$size['3']} border=\"0\">{$href_end}</td>\n";
    } else {
        print "<td>&nbsp;</td>\n";
    }
    print "</tr>\n\n";
    print_line();
}
开发者ID:jsquyres,项目名称:ompi-www,代码行数:61,代码来源:index.php


示例8: print_orders

function print_orders($sourceid)
{
    /*
    name:
    print_orders($sourceid)
    returns:
    0 - no error
    1 - no orders to be printed
    2 - template parsing error
    3 - error setting orders printed
    other - mysql error number
    */
    $sourceid = $_SESSION['sourceid'];
    debug_msg(__FILE__, __LINE__, "BEGIN PRINTING");
    $query = "SELECT * FROM `orders` WHERE `sourceid`='{$sourceid}' AND `printed` IS NULL AND `suspend`='0' ORDER BY dest_id ASC, priority ASC, associated_id ASC, id ASC";
    $res = common_query($query, __FILE__, __LINE__);
    if (!$res) {
        return mysql_errno();
    }
    if (!mysql_num_rows($res)) {
        return ERR_ORDER_NOT_FOUND;
    }
    $newassociated_id = "";
    $tablenum = get_db_data(__FILE__, __LINE__, $_SESSION['common_db'], 'sources', "name", $sourceid);
    $tpl_print = new template();
    $output['orders'] = '';
    $msg = "";
    while ($arr = mysql_fetch_array($res)) {
        $oldassociated_id = $newassociated_id;
        $newassociated_id = $arr['associated_id'];
        if (isset($priority)) {
            $oldpriority = $priority;
        } else {
            $oldpriority = 0;
        }
        $priority = $arr['priority'];
        if ($oldassociated_id != "") {
            $olddestid = get_db_data(__FILE__, __LINE__, $_SESSION['common_db'], 'dishes', "destid", get_db_data(__FILE__, __LINE__, $_SESSION['common_db'], 'orders', 'dishid', $oldassociated_id));
            $olddest = get_db_data(__FILE__, __LINE__, $_SESSION['common_db'], 'dests', "dest", $olddestid);
            $olddestname = get_db_data(__FILE__, __LINE__, $_SESSION['common_db'], 'dests', "name", $olddestid);
        } else {
            $olddestid = 0;
        }
        $destid = get_db_data(__FILE__, __LINE__, $_SESSION['common_db'], 'dishes', "destid", get_db_data(__FILE__, __LINE__, $_SESSION['common_db'], 'orders', 'dishid', $newassociated_id));
        $dest = get_db_data(__FILE__, __LINE__, $_SESSION['common_db'], 'dests', "dest", $destid);
        $destname = get_db_data(__FILE__, __LINE__, $_SESSION['common_db'], 'dests', "name", $destid);
        $dest_language = get_db_data(__FILE__, __LINE__, $_SESSION['common_db'], 'dests', "language", $destid);
        if ($destid != $olddestid || $priority != $oldpriority) {
            if ($destid != $olddestid && $olddestid != "") {
                $tpl_print->assign("date", printer_print_date());
                $tpl_print->assign("gonow", printer_print_gonow($oldpriority, $dest_language));
                $tpl_print->assign("page_cut", printer_print_cut());
                // strips the last newline that has been put
                $output['orders'] = substr($output['orders'], 0, strlen($output['orders']) - 1);
                if (table_is_takeaway($sourceid)) {
                    $print_tpl_file = 'ticket_takeaway';
                } else {
                    $print_tpl_file = 'ticket';
                }
                if ($err = $tpl_print->set_print_template_file($olddestid, $print_tpl_file)) {
                    return $err;
                }
                if ($err = $tpl_print->parse()) {
                    $msg = "Error in " . __FUNCTION__ . " - ";
                    $msg .= 'error: ' . $err . "\n";
                    echo nl2br($msg) . "\n";
                    error_msg(__FILE__, __LINE__, $msg);
                    return ERR_PARSING_TEMPLATE;
                }
                $tpl_print->restore_curly();
                $msg = $tpl_print->getOutput();
                $tpl_print->reset_vars();
                $output['orders'] = '';
                $msg = str_replace("'", "", $msg);
                if ($outerr = print_line($olddestid, $msg)) {
                    return $outerr;
                }
            } elseif ($priority != $oldpriority && $oldpriority != "") {
                $tpl_print->assign("date", printer_print_date());
                $tpl_print->assign("gonow", printer_print_gonow($oldpriority, $dest_language));
                $tpl_print->assign("page_cut", printer_print_cut());
                // strips the last newline that has been put
                $output['orders'] = substr($output['orders'], 0, strlen($output['orders']) - 1);
                if (table_is_takeaway($sourceid)) {
                    $print_tpl_file = 'ticket_takeaway';
                } else {
                    $print_tpl_file = 'ticket';
                }
                if ($err = $tpl_print->set_print_template_file($destid, $print_tpl_file)) {
                    return $err;
                }
                if ($err = $tpl_print->parse()) {
                    $msg = "Error in " . __FUNCTION__ . " - ";
                    $msg .= 'error: ' . $err . "\n";
                    error_msg(__FILE__, __LINE__, $msg);
                    echo nl2br($msg) . "\n";
                    return ERR_PARSING_TEMPLATE;
                }
                $tpl_print->restore_curly();
                $msg = $tpl_print->getOutput();
//.........这里部分代码省略.........
开发者ID:jaimeivan,项目名称:smart-restaurant,代码行数:101,代码来源:printing_waiter.php


示例9: hash

/**
	print out the key value pairs from the supplied has as HTML
	@param hash $hash a hash (sic)
	@return NULL
*/
function print_hash($hash)
{
    foreach ($hash as $key => $value) {
        echo $key . ": " . $value . '<br>';
    }
}
/**
	print out line of text with a label, to be used between PRE tags
	@param string $label a descriptive label or title
	@param string $line the text to display
	@return NULL
*/
function print_line($label, $line)
{
    echo $label . ": " . $line . "\n";
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>BaseElements Plug-In HTTP Test Helper</title>
</head>
<body>
<?php 
开发者ID:coopc,项目名称:BaseElements-Plugin,代码行数:31,代码来源:test.php


示例10: session_identification

<?php

// Include Files
include "../includes.inc.php";
// Session Identification
session_identification("admin");
print_header();
print_title("Tick Scheme");
$ticks = calc_sector_ticks($_GALAXY['galaxy_size'], 0, $_GALAXY['galaxy_size'], 180, 99);
print_line("Crossing ticks at warp 9.9: {$ticks}");
$ticks = calc_sector_ticks($_GALAXY['galaxy_size'], 0, $_GALAXY['galaxy_size'], 180, 50);
print_line("Crossing ticks at warp 5.0: {$ticks}");
$ticks = calc_sector_ticks($_GALAXY['galaxy_size'], 0, $_GALAXY['galaxy_size'], 180, 10);
print_line("Crossing ticks at warp 1.0: {$ticks}");
warp_scheme(99);
warp_scheme(50);
warp_scheme(10);
print_footer();
exit;
function warp_scheme($warp)
{
    $result = sql_query("SELECT COUNT(*) AS nr FROM s_sectors");
    $tmp = sql_fetchrow($result);
    $count = $tmp['nr'];
    if ($count > 30) {
        $count = 30;
        echo "WARNING: Only the first 30 sectors are viewed now!!!<br>\n";
    }
    $result = sql_query("SELECT * FROM s_sectors");
    print "<table align=center border=1>";
    print "  <tr><th colspan=" . ($count + 1) . ">Warp Factor " . $warp . "</th></tr>";
开发者ID:jaytaph,项目名称:perihelion-oldcode,代码行数:31,代码来源:ticks.php


示例11: session_identification

<?php

// Include Files
include "includes.inc.php";
// Session Identification
session_identification();
print_header();
print_title("Vessel upgrade");
// can we build ships already?
$user = user_get_user($_USER['id']);
if ($user['impulse'] == 0) {
    print_line("You cannot build ships yet");
    print_footer();
    exit;
}
// Get a ship if we didn't select one
if (!isset($_GET['vid'])) {
    choose_vessel($_USER['id']);
    print_footer();
    exit;
}
$vid = decrypt_get_vars($_GET['vid']);
// Go to the first stage if no stage is selected
if (isset($_GET['stage'])) {
    $stage = decrypt_get_vars($_GET['stage']);
} else {
    $stage = 1;
}
// Do upgrade (depending on stage)
if ($stage == 1) {
    upgrade_speed($_USER, $vid);
开发者ID:jaytaph,项目名称:perihelion-oldcode,代码行数:31,代码来源:vesselupgrade.php


示例12: show_constructions

function show_constructions($anomaly_id)
{
    assert(is_numeric($anomaly_id));
    // Get global information stuff
    $planet = anomaly_get_anomaly($anomaly_id);
    $user = user_get_user($planet['user_id']);
    // And get the ores from the planet
    $result = sql_query("SELECT * FROM g_ores WHERE planet_id=" . $anomaly_id);
    $ores = sql_fetchrow($result);
    // Get all buildings that are currently build on the planet
    $surface = planet_get_surface($anomaly_id);
    $current_buildings = csl($surface['csl_building_id']);
    // If we've got an headquarter and it's inactive, we cannot build anything.. :(
    if (in_array(BUILDING_HEADQUARTER_INACTIVE, $current_buildings)) {
        print_line("Your headquarter is currently inactive due to insufficent resources for its upkeep. You cannot build anything on this planet until you replenish your resources.");
        $cannot_build = true;
        return;
    }
    print_subtitle("Construction on planet " . $planet['name']);
    // And get all buildings, compare wether or not we may build them...
    $result = sql_query("SELECT * FROM s_buildings ORDER BY id");
    while ($building = sql_fetchrow($result)) {
        // Default, we can build this
        $cannot_build = false;
        // Stage -1: Check planet class when we want to build a headquarter
        if ($building['id'] == BUILDING_HEADQUARTER) {
            if (!planet_is_habitable($anomaly_id)) {
                $cannot_build = true;
            }
        }
        // Stage 0: Check building_level
        if ($building['build_level'] > $user['building_level']) {
            $cannot_build = true;
        }
        // Stage 1: Building Count Check
        // Build counter check
        if ($building['max'] > 0) {
            $times_already_build = 0;
            for ($i = 0; $i != count($current_buildings); $i++) {
                if (building_active_or_inactive($current_buildings[$i]) == $building['id']) {
                    $times_already_build++;
                }
            }
            // Cannot build cause we already have MAX buildings of this kind.. :(
            // building['max'] = 0 means unlimited buildings...
            if ($times_already_build == $building['max']) {
                $cannot_build = true;
            }
        }
        // Stage 2: Dependency Check
        // Get all dependencies
        $buildings_needed = csl($building['csl_depends']);
        // Do we need them? If not, skip dependency-check.
        if (!empty($building['csl_depends'])) {
            $deps_found = count($buildings_needed);
            // Count to zero...
            while (list($key, $building_dep_id) = each($buildings_needed)) {
                if ($building_dep_id == "") {
                    $deps_found--;
                    continue;
                }
                // Get all dependencies
                if (in_array($building_dep_id, $current_buildings)) {
                    $deps_found--;
                    // Found in current_buildings?
                    // Decrease counter
                }
            }
        } else {
            // No need for deps
            $deps_found = 0;
            // Zero is good...
        }
        // Not all dependencies found, we cannot build it.. :(
        if ($deps_found > 0) {
            $cannot_build = true;
        }
        // Stage 3: Show building if we can build it..
        if ($cannot_build == false) {
            building_show_details($building['id'], $planet['id'], $user['user_id'], $ores['stock_ores']);
        }
    }
}
开发者ID:jaytaph,项目名称:perihelion-oldcode,代码行数:83,代码来源:construct.php


示例13: foreach

    if (!file_exists($testsDir . DIRECTORY_SEPARATOR . $testFileName)) {
        $missingTests[] = $testFileName;
    }
}
foreach ($testsDirFiles as $testsDirFile) {
    $filename = @end(explode('/', $testsDirFile));
    $fragFileName = str_replace('Test.php', '.php', $filename);
    if (!file_exists($srcDir . DIRECTORY_SEPARATOR . $fragFileName)) {
        $testsWithoutFragments[] = $fragFileName;
    }
}
array_walk($missingTests, function ($v, $k) {
    global $createMissingTests, $deleteTestsWithoutFragments, $srcDir, $testsDir;
    print_line('Missing Test: ' . $v);
    if (true === $createMissingTests) {
        print_line('Created Missing Test: ' . $v);
        file_put_contents($testsDir . DIRECTORY_SEPARATOR . $v, '');
    }
});
array_walk($testsWithoutFragments, function ($v, $k) {
    global $createMissingTests, $deleteTestsWithoutFragments, $srcDir, $testsDir;
    print_line('Test Missing Fragment: ' . $v);
    if (true === $deleteTestsWithoutFragments) {
        print_line('Removed Test Without Fragment: ' . $v);
        @unlink($testsDir . DIRECTORY_SEPARATOR . $v);
    }
});
/*
print_r($testsWithoutFragments);

print_r($missingTests);*/
开发者ID:ghassani,项目名称:miva-provision,代码行数:31,代码来源:find_missing_and_missplaced_tests.php


示例14: passtrough

function passtrough($url)
{
    assert(!empty($url));
    print_header("<meta http-equiv=\"refresh\" CONTENT=\"1; URL={$url}\">");
    print_subtitle("<b>Loading...</b>");
    print_line("<a href=\"{$url}\">Click here if you are not being redirected...</a>");
    print_footer();
}
开发者ID:jaytaph,项目名称:perihelion-oldcode,代码行数:8,代码来源:login.php


示例15: Time

			<table BORDER=0 BGCOLOR=white>
			<font size=-1>
			<tr bgcolor=black>
			    <th width=80><a class=tooltip href="#"><font color=white><center><b>Callsign</b></center></font><span><b>Callsign of the DD-mode user</b></span></a></th>
			    <th width=80><a class=tooltip href="#"><font color=white><center><b>IP Address</b></center></font><span><b>Dynamic IP address of the DD-Mode user</b></span></a></th>
			    <th width=130><a class=tooltip href="#"><font color=white><center><b>Start Time (UTC)</b></center></font><span><b>Start time of DHCP lease</b>(UTC)</span></a></th>
			    <th width=130><a class=tooltip href="#"><font color=white><center><b>End Time (UTC)</b></center></font><span><b>End time of DHCP Lease</b>Expire time of DHCP lease (UTC)</span></a></th>
			    <th width=130><a class=tooltip href="#"><font color=white><center><b>MAC</b></center></font><span><b>MAC address of device</b>vendor information</span></a></th>
			    <th width=80><a class=tooltip href="#"><font color=white><center><b>Lease State</b></center></font><span><b>State of DHCP Lease</b></span></a></th>
			</tr>

			<?php 
                    $ci = 0;
                    for ($line = count($dhcptable) - 1; $line >= 0; $line--) {
                        $ci++;
                        if ($ci > 1) {
                            $ci = 0;
                        }
                        print "<tr bgcolor=\"{$col[$ci]}\">";
                        print_line($dhcptable[$line]);
                        print "</tr>";
                    }
                    fclose($open_file);
                    echo "</table>";
                }
            } else {
                echo "<p class='error'>The DHCP leases file does not exist or does not have sufficient read privileges.</p>";
            }
        }
    }
}
开发者ID:F4FXL,项目名称:OpenDV,代码行数:31,代码来源:dhcpleases.php


示例16: bill_print


//.........这里部分代码省略.........
            if (in_array($clientip, $ippart)) {
                $destid = $row['id'];
                break;
            }
            $dest_language = get_db_data(__FILE__, __LINE__, $_SESSION['common_db'], 'dests', "language", $destid);
        } else {
            return ERR_PRINTER_NOT_FOUND_FOR_SELECTED_TYPE;
        }
    }
    if ($err = $tpl_print->set_print_template_file($destid, $template_type)) {
        return $err;
    }
    // reset the counter and the message to be sent to the printer
    $total = 0;
    $msg = "";
    $tablenum = get_db_data(__FILE__, __LINE__, $_SESSION['common_db'], 'sources', "name", $_SESSION['sourceid']);
    $output['table'] = ucfirst(lang_get($dest_language, 'PRINTS_TABLE')) . " {$tablenum} \n";
    $tpl_print->assign("table", $output['table']);
    // writes the table num to video
    $output_page .= ucfirst(phr('TABLE_NUMBER')) . ": {$tablenum}     ";
    $table = new table($_SESSION['sourceid']);
    $table->fetch_data(true);
    if ($cust_id = $table->data['customer']) {
        $cust = new customer($cust_id);
        $output['customer'] = ucfirst(lang_get($dest_language, 'CUSTOMER')) . ": " . $cust->data['surname'] . ' ' . $cust->data['name'];
        $tpl_print->assign("customer_name", $output['customer']);
        $output['customer'] = $cust->data['address'];
        $tpl_print->assign("customer_address", $output['customer']);
        $output['customer'] = $cust->data['zip'];
        $tpl_print->assign("customer_zip_code", $output['customer']);
        $output['customer'] = $cust->data['city'];
        $tpl_print->assign("customer_city", $output['customer']);
        $output['customer'] = ucfirst(lang_get($dest_language, 'VAT_ACCOUNT')) . ": " . $cust->data['vat_account'];
        $tpl_print->assign("customer_vat_account", $output['customer']);
    }
    if (bill_check_empty()) {
        return ERR_NO_ORDER_SELECTED;
    }
    //mizuko : swap qty with name
    $output_page .= "<table bgcolor=\"" . COLOR_TABLE_GENERAL . "\">\r\n\t<thead>\r\n\t<tr>\r\n\t<th scope=col>" . ucfirst(phr('NAME')) . "</th>\r\n\t<th scope=col>" . ucfirst(phr('QUANTITY_ABBR')) . "</th>\r\n\t<th scope=col>" . ucfirst(phr('PRICE')) . "</th>\r\n\t</tr>\r\n\t</thead>\r\n\t<tbody>";
    $class = COLOR_ORDER_PRINTED;
    ksort($_SESSION['separated']);
    // the next for prints the list and the chosen dishes
    for (reset($_SESSION['separated']); list($key, $value) = each($_SESSION['separated']);) {
        $output['orders'] .= bill_print_row($key, $value, $destid);
    }
    $tpl_print->assign("orders", $output['orders']);
    if ($_SESSION['discount']['type'] == "amount" || $_SESSION['discount']['type'] == "percent") {
        $output['discount'] = bill_print_discount($receipt_id, $destid);
        $tpl_print->assign("discount", $output['discount']);
    }
    $total = bill_calc_vat();
    $total_discounted = bill_calc_discount($total);
    // updates the receipt value, has to be before print totals!
    receipt_update_amounts($_SESSION['account'], $total_discounted, $receipt_id);
    $output['total'] = bill_print_total($receipt_id, $destid);
    $tpl_print->assign("total", $output['total']);
    if (SHOW_CHANGE == 1) {
        $output['change'] = bill_print_change($total_discounted['total']);
        $tpl_print->assign("change", $output['change']);
    }
    //mizuko
    $user = new user($_SESSION['userid']);
    $output['waiter'] = ucfirst(lang_get($dest_language, 'PRINTS_WAITER')) . ": " . $user->data['name'];
    $tpl_print->assign("waiter", $output['waiter']);
    $tpl_print->assign("date", printer_print_date());
    //end mizuko
    $output_page .= "\r\n\t</tbody>\r\n\t</table>";
    $output['receipt_id'] = bill_print_receipt_id($receipt_id, $destid);
    $tpl_print->assign("receipt_id", $output['receipt_id']);
    $output['taxes'] = bill_print_taxes($receipt_id, $destid);
    $tpl_print->assign("taxes", $output['taxes']);
    if ($err = $tpl_print->parse()) {
        $msg = "Error in " . __FUNCTION__ . " - ";
        $msg .= 'error: ' . $err . "\n";
        error_msg(__FILE__, __LINE__, $msg);
        echo nl2br($msg) . "\n";
        return ERR_PARSING_TEMPLATE;
    }
    $tpl_print->restore_curly();
    $msg = $tpl_print->getOutput();
    $msg = str_replace("'", "", $msg);
    if ($printing_enabled) {
        if ($err = print_line($arr['id'], $msg)) {
            // the process is stopped so we delete the created receipt
            receipt_delete($_SESSION['account'], $receipt_id);
            return $err;
        }
    }
    ksort($_SESSION['separated']);
    // sets the log
    for (reset($_SESSION['separated']); list($key, $value) = each($_SESSION['separated']);) {
        if ($err_logger = bill_logger($key, $receipt_id)) {
            debug_msg(__FILE__, __LINE__, __FUNCTION__ . ' - receipt_id: ' . $receipt_id . ' - logger return code: ' . $err_logger);
        } else {
            debug_msg(__FILE__, __LINE__, __FUNCTION__ . ' - receipt_id: ' . $receipt_id . ' - logged');
        }
    }
    return 0;
}
开发者ID:jaimeivan,项目名称:smart-restaurant,代码行数:101,代码来源:bills_waiter.php


示例17: perihelion_die

function perihelion_die($title, $line)
{
    global $_CONFIG;
    print_header();
    print_title($title);
    print_line($line);
    print_line("<img src=" . $_CONFIG['IMAGE_URL'] . "/backgrounds/perihelion-small.jpg>");
    print_footer();
    exit;
}
开发者ID:jaytaph,项目名称:perihelion-oldcode,代码行数:10,代码来源:general_print.inc.php


示例18: print_line

        $ne_science_ratio = $user['science_ratio'];
    }
    if ($ne_building_rate == "") {
        $ne_building_rate = $user['science_building'];
    }
    if ($ne_vessel_rate == "") {
        $ne_vessel_rate = $user['science_vessel'];
    }
    if ($ne_invention_rate == "") {
        $ne_invention_rate = $user['science_invention'];
    }
    if ($ne_explore_rate == "") {
        $ne_explore_rate = $user['science_explore'];
    }
    if ($ne_building_rate + $ne_vessel_rate + $ne_invention_rate + $ne_explore_rate != 100) {
        print_line("<font color=red><center><strong>Warning:</strong><br>Your percentage settings must be equal to 100%!<br>New rating is not set!</center></font>");
    } else {
        $ok = "";
        $errors['PARAMS'] = "Incorrect parameters specified..\n";
        $errors['100'] = "The rating must add to 100%\n";
        $data['id'] = user_ourself();
        $data['ratio'] = $ne_science_ratio;
        $data['invention'] = $ne_invention_rate;
        $data['building'] = $ne_building_rate;
        $data['vessel'] = $ne_vessel_rate;
        $data['explore'] = $ne_explore_rate;
        comm_send_to_server("SCIENCE", $data, $ok, $errors);
    }
}
// Show user info
if ($uid == "") {
开发者ID:jaytaph,项目名称:perihelion-oldcode,代码行数:31,代码来源:science.php


示例19: print_line

<?php

/**
 * Defining and calling functions with optional arguments
 */
function print_line($output, $suffix = PHP_EOL, $prefix = '')
{
    echo $prefix . $output . $suffix;
}
// Will print "Hello<br />"
print_line("Hello", "<br />");
// Will print "Hello\n"
print_line("Hello");
// Will print "<li>Hello</li>"
print_line("Hello", "</li>", "<li>");
开发者ID:nirgeier,项目名称:CodeBlue-PHP-Course,代码行数:15,代码来源:012-optional-arguments.php


示例20: convert_query


//.........这里部分代码省略.........
						catch (com_exception $err)
						{
							$result = false;
						}');
                } else {
                    $result = @$GLOBALS['ado_connection']->Execute($string);
                }
                if ($result !== false && !empty($limit) && !empty($limit[1])) {
                    $result->Move($limit[1], 1);
                }
            }
            $not_smf_dbs = true;
        } else {
            $result = $smcFunc['db_query']('', $string, array('overide_security' => true, 'db_error_skip' => true));
        }
    } else {
        $result = $smcFunc['db_query']('', $string, array('overide_security' => true, 'db_error_skip' => true));
    }
    if ($result !== false || $return_error) {
        return $result;
    }
    if (empty($not_smf_dbs)) {
        $db_error = $smcFunc['db_error']();
        $db_errno = $smcFunc['db_title'] == ' 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP print_link函数代码示例发布时间:2022-05-15
下一篇:
PHP print_layout函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap