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

PHP htmlent_utf8函数代码示例

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

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



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

示例1: gradeShowInfo

function gradeShowInfo($row)
{
    echo '<p><a href="grades.php">Back to All Grades</a>' . "</p><p>\n";
    echo "User Name: " . htmlent_utf8($row['displayname']) . "<br/>\n";
    echo "User Email: " . htmlent_utf8($row['email']) . "<br/>\n";
    echo "Last Submision: " . htmlent_utf8($row['updated_at']) . "<br/>\n";
    echo "Score: " . htmlent_utf8($row['grade']) . "<br/>\n";
    echo "</p>\n";
}
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:9,代码来源:lib.php


示例2: var_dump_pre

function var_dump_pre($variable, $print = true)
{
    ob_start();
    var_dump($variable);
    $result = ob_get_clean();
    if ($print) {
        print htmlent_utf8($result);
    }
    return $result;
}
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:10,代码来源:util.php


示例3: htmlentities

<form method="post">
Service URL: <input type="text" name="content_item_return_url" size="120" value="<?php 
echo htmlentities($result_url);
?>
"/></br>
OAuth Consumer Key: <input type="text" name="oauth_consumer_key" size="80" value="<?php 
echo htmlentities($oauth_consumer_key);
?>
"/></br>
OAuth Consumer Secret: <input type="text" name="secret" size="80" value="<?php 
echo htmlentities($oauth_consumer_secret);
?>
"/></br>
<br/>
Content URL to send: </br>
<input type="text" name="content_url" 
size="80" value="<?php 
echo htmlent_utf8($content_url);
?>
"/>
</p><p>
Opaque Data: </br>
<textarea name="data" rows=5 cols=80>
<?php 
echo htmlent_utf8($data);
?>
</textarea>
</p><p>
<input type='submit' name='send' value="Send Content Response">
</form>
开发者ID:amoskarugaba,项目名称:sakai,代码行数:30,代码来源:fileitem_json.php


示例4: success_out

function success_out($output)
{
    echo '<span style="color:green"><strong>' . htmlent_utf8($output) . "</strong></span><br/>\n";
    flush();
}
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:5,代码来源:lms_lib.php


示例5: line_out

<?php

require_once "webauto.php";
use Goutte\Client;
line_out("Grading PHP-Intro Assignment 2");
$url = getUrl('http://csevumich.byethost18.com/howdy.php');
if ($url === false) {
    return;
}
$grade = 0;
error_log("ASSN02 " . $url);
line_out("Retrieving " . htmlent_utf8($url) . "...");
flush();
// http://symfony.com/doc/current/components/dom_crawler.html
$client = new Client();
$crawler = $client->request('GET', $url);
$html = $crawler->html();
$OUTPUT->togglePre("Show retrieved page", $html);
line_out("Searching for h1 tag...");
$passed = 0;
$titlefound = false;
try {
    $h1 = $crawler->filter('h1')->text();
    line_out("Found h1 tag...");
} catch (Exception $ex) {
    error_out("Did not find h1 tag");
    $h1 = "";
}
if (stripos($h1, 'Hello') !== false) {
    success_out("Found 'Hello' in the h1 tag");
    $passed += 1;
开发者ID:ixtel,项目名称:tsugi,代码行数:31,代码来源:a02.php


示例6: updateForm

 /**
  *  Generate the HTML for an update form.
  *
  * Here is a sample call:
  *
  *     $from_location = "keys.php";
  *     $fields = array("key_key", "key_sha256", "secret", "created_at", "updated_at");
  *     $current = getCurrentFileUrl(__FILE__);
  *     $retval = CrudForm::updateForm($row, $fields, $current, $from_location, true, true);
  *
  * @param $row The existing data for the fields.
  * @param $fields An array of fields to be shown.
  * @param $current The URL of the current HTML page.
  * @param $from_location A URL to jump to when the user presses 'Cancel'.
  * @param $allow_edit True/false as to whether to show an Edit button
  * @param $allow_delete True/false as to whether to show a Delete button
  * @param $extra_buttons An array of additional buttons to show
  */
 public static function updateForm($row, $fields, $current, $from_location, $allow_edit = false, $allow_delete = false, $extra_buttons = false)
 {
     $key = $fields['0'];
     if (!isset($_REQUEST[$key])) {
         return "Required {$key}= parameter";
     }
     $key_value = $_REQUEST[$key] + 0;
     $do_edit = isset($_REQUEST['edit']) && $_REQUEST['edit'] == 'yes';
     echo '<form method="post">' . "\n";
     echo '<a href="' . $from_location . '" class="btn btn-default">' . _m('Exit') . '</a>' . "\n";
     if ($allow_edit) {
         if ($do_edit) {
             echo '<input type="submit" name="doUpdate" class="btn btn-normal" value="' . _m("Update") . '">' . "\n";
             echo '<a href="' . $current . '?' . $key . '=' . $key_value . '" class="btn btn-success">' . _m("Cancel Edit") . '</a>' . "\n";
         } else {
             echo '<a href="' . $current . '?' . $key . '=' . $key_value . '&edit=yes" class="btn btn-warning">' . _m("Edit") . '</a>' . "\n";
         }
     }
     if (is_array($extra_buttons)) {
         foreach ($extra_buttons as $button_text => $button_url) {
             echo '<a href="' . $button_url . '" class="btn btn-success">' . _m($button_text) . '</a>' . "\n";
         }
     }
     if ($allow_delete) {
         echo '<input type="hidden" name="' . $key . '" value="' . $key_value . '">' . "\n";
         echo '<input type="submit" name="doDelete" class="btn btn-danger" value="' . _m("Delete") . '"';
         echo " onclick=\"return confirm('Are you sure you want to delete this record?');\">\n";
     }
     echo "<p>\n";
     for ($i = 0; $i < count($fields); $i++) {
         $field = $fields[$i];
         $value = $row[$field];
         if (!$do_edit) {
             echo '<p><strong>' . self::fieldToTitle($field) . "</strong></p>\n";
             if (strpos($field, "secret") !== false) {
                 echo "<p onclick=\"\$('#stars_{$i}').toggle();\$('#text_{$i}').toggle();\">\n";
                 echo "<span id=\"stars_{$i}\">***********</span>\n";
                 echo "<span style=\"display: none;\" id=\"text_{$i}\">" . htmlent_utf8($value) . '</span>';
                 echo "\n</p>\n";
             } else {
                 echo "<p>" . htmlent_utf8($value) . "</p>\n";
             }
             continue;
         }
         if ($i == 0 && strpos($field, "_id") !== false) {
             echo '<input type="hidden" name="' . $field . '" value="' . htmlent_utf8($value) . '">' . "\n";
             continue;
         }
         // Don't allow explicit updating of these fields
         if (strpos($field, "_at") > 0) {
             continue;
         }
         echo '<div class="form-group">' . "\n";
         echo '<label for="' . $field . '">' . self::fieldToTitle($field) . "<br/>\n";
         if (isset($_POST[$field])) {
             $value = $_POST[$field];
         }
         if (strpos($field, "secret") !== false) {
             echo '<input id="' . $field . '" type="password" size="80" name="' . $field . '" value="' . htmlent_utf8($value) . '"';
             echo "onclick=\"if ( \$(this).attr('type') == 'text' ) \$(this).attr('type','password'); else \$(this).attr('type','text'); return false;\">\n";
         } else {
             if (strlen($value) > 60) {
                 echo '<textarea rows="10" cols="70" id="' . $field . '" name="' . $field . '">' . htmlent_utf8($value) . '</textarea>' . "\n";
             } else {
                 echo '<input type="text" size="80" id="' . $field . '" name="' . $field . '" value="' . htmlent_utf8($value) . '">' . "\n";
             }
         }
         echo "</label>\n</div>";
     }
     echo '</form>' . "\n";
     return true;
 }
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:90,代码来源:CrudForm.php


示例7: array

require_once $CFG->dirroot . "/pdo.php";
require_once $CFG->dirroot . "/lib/lms_lib.php";
use Tsugi\Core\LTIX;
// Sanity checks
$LTI = LTIX::requireData();
$p = $CFG->dbprefix;
// The reset operation is a normal POST - not AJAX
if ($USER->instructor && isset($_POST['reset'])) {
    $PDOX->queryDie("DELETE FROM {$p}rps WHERE link_id = :LI", array(':LI' => $LINK->id));
    header('Location: ' . addSession('index.php'));
    return;
}
?>
<html><head><title><?php 
_e("Playing Rock Paper Scissors in");
echo htmlent_utf8($CONTEXT->title);
?>
</title>
<script type="text/javascript"
src="<?php 
echo $CFG->staticroot;
?>
/static/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  window.console && console.log('Hello JQuery..');
  $("#rock").click( function() { play(0); } ) ;
  $("#paper").click( function() { play(1); } ) ;
  $("#scissors").click( function() { play(2); } ) ;
});
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:30,代码来源:index.php


示例8: htmlent_utf8

</p>
  <div class="control-group pull-right hidden-phone">
      <button type="submit" style="margin-top: 40px" class="btn btn-primary">Save Profile Data</button>
  </div>

  <div id="map_canvas" style="margin: 10px; width:400px; max-width: 100%; height:400px"></div>

  <div id="latlong" style="display:none" class="control-group">
    <p>Latitude: <input size="30" type="text" id="latbox" name="lat" class="disabled"
    <?php 
    echo ' value="' . htmlent_utf8($lat) . '" ';
    ?>
    ></p>
    <p>Longitude: <input size="30" type="text" id="lngbox" name="lng" class="disabled"
    <?php 
    echo ' value="' . htmlent_utf8($lng) . '" ';
    ?>
    ></p>
  </div>

<p>
If you don't even want to reveal your country, put yourself
in Greenland in the middle of a glacier. One person put their location
in the middle of a bar.  :)
</p>
<?php 
}
?>
</form>
<?php 
// After jquery gets loaded at the *very* end...
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:31,代码来源:profile.php


示例9: getFolderName

// View
$OUTPUT->header();
$OUTPUT->bodyStart();
$OUTPUT->flashMessages();
$OUTPUT->welcomeUserCourse();
$foldername = getFolderName();
if (!file_exists($foldername)) {
    mkdir($foldername);
}
$stmt = $PDOX->prepare("SELECT file_id, file_name FROM {$p}sample_blob\n        WHERE context_id = :CI");
$stmt->execute(array(":CI" => $CONTEXT->id));
$count = 0;
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
    $id = $row['file_id'];
    $fn = $row['file_name'];
    echo '<li><a href="blob_serve.php?id=' . $id . '" target="_new">' . htmlent_utf8($fn) . '</a>';
    if ($USER->instructor) {
        echo ' (<a href="blob_delete.php?id=' . $id . '">Delete</a>)';
    }
    echo '</li>';
    $count++;
}
if ($count == 0) {
    echo "<p>No Files Found</p>\n";
}
echo "</ul>\n";
if ($USER->instructor) {
    ?>
<h4>Upload file (max <?php 
    echo maxUpload();
    ?>
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:31,代码来源:index.php


示例10: name

        <form id="prefs_form">
            <?php 
    if ($firstname === false) {
        ?>
                <input type="checkbox" name="allow_first" style="display:hidden">
            <?php 
    } else {
        ?>
                <input type="checkbox" name="allow_first" <?php 
        if ($row['first'] == 1) {
            echo "checked";
        }
        ?>
            >
            Share your first name (<?php 
        echo htmlent_utf8($firstname);
        ?>
) on the map<br/>
            <?php 
    }
    ?>
            <input type="checkbox" name="allow_name" <?php 
    if (!isset($USER->displayname)) {
        echo ' style="display:hidden"';
    } else {
        if ($row['name'] == 1) {
            echo "checked";
        }
    }
    ?>
            >
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:31,代码来源:index.php


示例11: foreach

            echo "<th>Action</th>";
        }
        echo "</tr>\n";
        $max_points = false;
        foreach ($our_grades as $grade) {
            if ($assn_json->peerpoints > 0) {
                if ($max_points === false) {
                    $max_points = $grade['points'];
                }
                $show = $grade['points'];
                if ($show < $max_points) {
                    $show = '';
                }
                echo "<tr><td>" . $show . "</td>";
            }
            echo "<td>" . htmlent_utf8($grade['note']) . "</td>\n";
            if ($assn_json->flag) {
                echo '<td><form><input type="submit" name="showFlag" value="Flag"' . 'onclick="$(\'#flag_grade_id\').val(\'' . $grade['grade_id'] . '\'); $(\'#flagform\').toggle(); return false;" class="btn btn-danger">' . '</form></td>';
            }
            echo "</tr>\n";
        }
        echo "</table>\n";
        if ($max_points !== false) {
            echo "<p>Your overall score from your peers: {$max_points} </p>\n";
        }
    }
}
$OUTPUT->exitButton();
?>
<form method="post" id="flagform" style="display:none">
<p>&nbsp;</p>
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:31,代码来源:index.php


示例12: session_start

<?php

require_once "../../config.php";
require_once $CFG->dirroot . "/pdo.php";
require_once $CFG->dirroot . "/lib/lms_lib.php";
require_once $CFG->dirroot . "/core/gradebook/lib.php";
session_start();
// Get the user's grade data also checks session
$row = gradeLoad($_REQUEST['user_id']);
// View
$OUTPUT->header();
$OUTPUT->bodyStart();
$OUTPUT->flashMessages();
// Show the basic info for this user
gradeShowInfo($row);
// Unique detail
echo "<p>Submission:</p>\n";
$json = json_decode($row['json']);
if (is_object($json) && isset($json->code)) {
    echo "<pre>\n";
    echo htmlent_utf8($json->code);
    echo "\n";
    echo "</pre>\n";
}
$OUTPUT->footer();
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:25,代码来源:grade-detail.php


示例13: get_body_sent_debug

                    $debugin = get_body_sent_debug();
                    $debugout = get_body_received_debug();
                } else {
                    if (isset($_REQUEST['set_proxy'])) {
                        $postBody = true;
                        $response = sendOAuthBody("PUT", $proxy_url, $oauth_consumer_key, $oauth_consumer_secret, $content_type, $settings);
                        $debugin = get_body_sent_debug();
                        $debugout = get_body_received_debug();
                    } else {
                        exit;
                    }
                }
            }
        }
    }
}
global $LastOAuthBodyBaseString;
$lbs = $LastOAuthBodyBaseString;
ltiUtilTogglePre("Sent Headers", $debugin);
if ($postBody !== false) {
    ltiUtilTogglePre("Our Body Data", indent($settings));
}
ltiUtilTogglePre("Our Base String", $lbs);
ltiUtilTogglePre("Results and Headers", $debugout);
if (strlen($response) < 1) {
    echo "<p>HTTP Response Body empty.</p>\n";
} else {
    echo "<br/><b>Returned data:</b>\n<pre>\n";
    echo htmlent_utf8(indent($response));
    echo "\n</pre>\n";
}
开发者ID:amoskarugaba,项目名称:sakai,代码行数:31,代码来源:settings_json.php


示例14: urlencode

        if ($data) {
            $parms['data'] = $data;
        }
        $parms = LTIX::signParameters($parms, $result_url, "POST", "Install Tool");
        $endform = '<a href="index.php" class="btn btn-warning">Back to Store</a>';
        $content = LTI::postLaunchHTML($parms, $result_url, true, false, $endform);
        echo $content;
    } else {
        echo '<div style="border: 2px, solid, red;" class="card">';
        if ($fa_icon) {
            echo '<a href="index.php?install=' . urlencode($tool) . '">';
            echo '<i class="fa ' . $fa_icon . ' fa-2x" style="color: #1894C7; float:right; margin: 2px"></i>';
            echo '</a>';
        }
        echo '<p><strong>' . htmlent_utf8($title) . "</strong></p>";
        echo '<p>' . htmlent_utf8($text) . "</p>\n";
        echo '<center><a href="index.php?install=' . urlencode($tool) . '" class="btn btn-default" role="button">Details</a></center>';
        echo "</div>\n";
    }
    $toolcount++;
}
echo "</div>\n";
if ($toolcount < 1) {
    lmsDie("No tools to register..");
}
$OUTPUT->footerStart();
// https://github.com/LinZap/jquery.waterfall
if (!$install) {
    ?>
<script type="text/javascript" src="static/waterfall-light.js"></script>
<script>
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:31,代码来源:index.php


示例15: htmlentities

?>
</head>
<body style="font-family:sans-serif; background-color:#add8e6">
<p><b>Calling IMS LTI Content Item Service</b></p>
<?php 
?>
<p>
<form method="post">
Service URL: <input type="text" name="url" size="120" value="<?php 
echo htmlentities($result_url);
?>
"/></br>
OAuth Consumer Key: <input type="text" name="key" size="80" value="<?php 
echo htmlentities($oauth_consumer_key);
?>
"/></br>
OAuth Consumer Secret: <input type="text" name="secret" size="80" value="<?php 
echo htmlentities($oauth_consumer_secret);
?>
"/></br>
</p><p>
Content URL to send: </br>
<input type="text" name="content_url" 
size="80" value="<?php 
echo htmlent_utf8($content_url);
?>
"/>
</p><p>
<input type='submit' name='send' value="Send Content Response">
</form>
开发者ID:philsawa,项目名称:sakai,代码行数:30,代码来源:content_json.php


示例16: welcomeUserCourse

 /**
  * Welcome the user to the course
  */
 function welcomeUserCourse()
 {
     global $USER, $CONTEXT;
     if (isset($USER->displayname)) {
         if (isset($CONTEXT->title)) {
             printf(_m("<p>Welcome %s from %s"), htmlent_utf8($USER->displayname), htmlent_utf8($CONTEXT->title));
         } else {
             printf(_m("<p>Welcome %s"), htmlent_utf8($USER->displayname));
         }
     } else {
         if (isset($CONTEXT->title)) {
             printf(_m("<p>Welcome from %s"), htmlent_utf8($CONTEXT->title));
         } else {
             printf(_m("<p>Welcome "));
         }
     }
     if ($USER->instructor) {
         echo " " . _m("(Instructor)");
     }
     echo "</p>\n";
 }
开发者ID:JANQLIANGTSAI,项目名称:tsugi,代码行数:24,代码来源:Output.php


示例17: Name

<a href="http://www.imsglobal.org/question/" target="_blank">QTI 1.2.1</a>.
</p><p>
This is still a <a href="https://github.com/csev/gift2qti" target="_blank">work in progress</a>
and currently only supports single-answer multiple-choice, true/false, and essay questions.
The sample text below has some GIFT formats that this tool does not yet support so some of the questions
below will not be converted.  Feel free to send me a Pull request on gitHub :).
</p>
<form method="post" action="process.php" target="working" style="margin:20px;">
<p style="float:right">
<input type="submit" name="submit" class="btn btn-primary" value="Convert GIFT to QTI"
onclick="$('#myModal').modal('show');"></p>
<p>Quiz Title: <input type="text" name="title" size="60" value="Converted using GIFT2QTI"/></p>
<p>Quiz File Name (no suffix): <input type="text" name="name" size="30"/> (optional)</p>
<textarea rows="30" style="width: 98%" name="text">
<?php 
echo htmlent_utf8($text);
?>
</textarea>
<p><input type="checkbox" name="bypass" value="bypass">
Do not validate the XML</p>
</form>
<p>If you want to add this tool to the <b>Settings -&gt; Import Content</b>
in the Canvas LMS use this URL:
<a href="<?php 
echo $config_url;
?>
" target="_blank"><?php 
echo $config_url;
?>
</a>
</p>
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:31,代码来源:convert.php


示例18: togglePre

togglePre("Registration Response", htmlent_utf8(json_indent($response)));
$tc_half_shared_secret = false;
if ($last_http_response == 201 || $last_http_response == 200) {
    if ($oauth_splitsecret && $tp_half_shared_secret) {
        $responseObject = json_decode($response);
        if (isset($responseObject->tc_half_shared_secret)) {
            $tc_half_shared_secret = $responseObject->tc_half_shared_secret;
            echo "<p>tc_half_shared_secret: " . $tc_half_shared_secret . "</p>\n";
            if (strlen($tc_half_shared_secret) != 128) {
                echo '<p style="color: red">Warning secret length of ' . strlen($tc_half_shared_secret) . " should be 128</p>\n";
            }
            $split_secret = $tc_half_shared_secret . $tp_half_shared_secret;
            $_SESSION['split_secret'] = $split_secret;
            echo "<p>Split Secret: " . $split_secret . "</p>\n";
        } else {
            echo "<p>Error: Tool Consumer did not provide oauth_splitsecret</p>\n";
        }
    }
    echo '<p><a href="' . $launch_presentation_return_url . '">Continue to launch_presentation_url</a></p>' . "\n";
    exit;
}
echo "Registration failed, http code=" . $last_http_response . "\n";
// Check to see if they slid us the base string...
$responseObject = json_decode($response);
if ($responseObject != null) {
    $base_string = $responseObject->base_string;
    if (strlen($base_string) > 0 && strlen($LastOAuthBodyBaseString) > 0 && $base_string != $LastOAuthBodyBaseString) {
        $compare = compare_base_strings($LastOAuthBodyBaseString, $base_string);
        togglePre("Compare Base Strings (ours first)", htmlent_utf8($compare));
    }
}
开发者ID:kingmook,项目名称:sakai,代码行数:31,代码来源:tp.php


示例19: rand

    }
    // High guess
    $u = $url . "?guess=" . rand(45, 2000);
    line_out("Retrieving " . htmlent_utf8($u));
    $crawler = $client->request('GET', $u);
    $html = $crawler->html();
    $OUTPUT->togglePre("Show retrieved page", $html);
    line_out("Looking for 'Your guess is too high'");
    if (stripos($html, 'Your guess is too high') > 0) {
        $passed++;
    } else {
        error_out("Not found");
    }
    // Good guess
    $u = $url . "?guess=42";
    line_out("Retrieving " . htmlent_utf8($u));
    $crawler = $client->request('GET', $u);
    $html = $crawler->html();
    $OUTPUT->togglePre("Show retrieved page", $html);
    line_out("Looking for 'Congratulations - You are right'");
    if (stripos($html, 'congratulations') > 0) {
        $passed++;
    } else {
        error_out("Not found");
    }
} catch (Exception $ex) {
    error_out("The autograder did not find something it was looking for in your HTML - test ended.");
    error_log($ex->getMessage());
    error_log($ex->getTraceAsString());
    $detail = "This indicates the source code line where the test stopped.\n" . "It may not make any sense without looking at the source code for the test.\n" . 'Caught exception: ' . $ex->getMessage() . "\n" . $ex->getTraceAsString() . "\n";
    $OUTPUT->togglePre("Internal error detail.", $detail);
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:31,代码来源:a03.php


示例20: showSubmission

function showSubmission($LTI, $assn_json, $submit_json)
{
    echo '<div style="padding:5px">';
    $blob_ids = $submit_json->blob_ids;
    $urls = isset($submit_json->urls) ? $submit_json->urls : array();
    $blobno = 0;
    $urlno = 0;
    foreach ($assn_json->parts as $part) {
        if ($part->type == "image") {
            // This test triggeres when an assignment is reconfigured
            // and old submissions have too few blobs
            if ($blobno >= count($blob_ids)) {
                continue;
            }
            $blob_id = $blob_ids[$blobno++];
            if (is_array($blob_id)) {
                $blob_id = $blob_id[0];
            }
            $url = getAccessUrlForBlob($blob_id);
            $title = 'Student image';
            if (isset($part->title) && strlen($part->title) > 0) {
                $title = $part->title;
            }
            echo ' <a href="#" onclick="$(\'#myModal_' . $blobno . '\').modal();"';
            echo 'alt="' . htmlent_utf8($title) . '" title="' . htmlent_utf8($title) . '">';
            echo '<img src="' . addSession($url) . '" width="240"></a>' . "\n";
            ?>
<div class="modal fade" id="myModal_<?php 
            echo $blobno;
            ?>
">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title"><?php 
            echo htmlent_utf8($title);
            ?>
</h4>
      </div>
      <div class="modal-body">
        <img src="<?php 
            echo addSession($url);
            ?>
" style="width:100%">
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php 
        } else {
            if ($part->type == "url") {
                $url = $urls[$urlno++];
                echo '<p><a href="' . safe_href($url) . '" target="_blank">';
                echo htmlentities(safe_href($url)) . '</a> (Will launch in new window)</p>' . "\n";
            }
        }
    }
    echo "<br/>&nbsp;<br/>\n";
    if ($blobno > 0) {
        echo "<p>Click on each image to see a larger view of the image.</p>\n";
    }
    if (strlen($submit_json->notes) > 1) {
        echo "<p>Notes: " . htmlent_utf8($submit_json->notes) . "</p>\n";
    }
    echo '<div style="padding:3px">';
}
开发者ID:ixtel,项目名称:tsugi,代码行数:67,代码来源:peer_util.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP htmlentities函数代码示例发布时间:2022-05-15
下一篇:
PHP htmlent函数代码示例发布时间: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