本文整理汇总了PHP中editLink函数的典型用法代码示例。如果您正苦于以下问题:PHP editLink函数的具体用法?PHP editLink怎么用?PHP editLink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了editLink函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
echo "No roles assigned";
} else {
while ($role = $roles->next()) {
echo "{$role['role']} - {$role['description']}<br>";
}
}
?>
</td></tr>
<tr><td>Team:</td><?php
if ($row['teamid']) {
echo "<td class=\"teamid\"><a href=\"team.php?id=" . urlencode($row['teamid']) . "\">" . htmlspecialchars($row['teamname'] . " (t" . $row['teamid'] . ")") . "</a></td>";
} else {
echo "<td>-</td>";
}
?>
</tr>
<tr><td>Last login:</td><td><?php
echo printtime($row['last_login'], '%a %d %b %Y %T %Z');
?>
</td></tr>
<tr><td>Last IP: </td><td><?php
echo @$row['ip_address'] ? printhost($row['ip_address'], TRUE) : '';
?>
</td></tr>
</table></div>
<?php
if (IS_ADMIN) {
echo "<p class=\"nomorecol\">" . editLink('user', $id) . "\n" . delLink('user', 'userid', $id) . "</p>\n\n";
}
require LIBWWWDIR . '/footer.php';
示例2: editRSS
case "editRSS":
editRSS();
break;
case "addRSS":
$newRSS = getRequestVar('newRSS');
addRSS($newRSS);
break;
case "deleteRSS":
$rid = getRequestVar('rid');
deleteRSS($rid);
break;
case "editLink":
$lid = getRequestVar('lid');
$editLink = getRequestVar('editLink');
$editSite = getRequestVar('editSite');
editLink($lid, $editLink, $editSite);
break;
case "editLinks":
editLinks();
break;
case "addLink":
$newLink = getRequestVar('newLink');
$newSite = getRequestVar('newSite');
addLink($newLink, $newSite);
break;
case "moveLink":
$lid = getRequestVar('lid');
$direction = getRequestVar('direction');
moveLink($lid, $direction);
break;
case "deleteLink":
示例3: sprintf
} else {
if ($reltime < dbconfig_get('judgehost_critical', 120)) {
echo "judgehost-warn";
} else {
echo "judgehost-crit";
}
}
echo "\" title =\"last checked in {$reltime} seconds ago\">";
}
echo $link . CIRCLE_SYM . "</a></td>";
echo "<td>" . $link . (is_null($row['name']) ? '<i>none</i>' : $row['name']) . '</a></td>';
echo "<td title=\"load during the last 2 and 10 minutes and the whole contest\">" . $link . sprintf('%.2f %.2f %.2f', @$work2min[$row['hostname']] / (2 * 60), @$work10min[$row['hostname']] / (10 * 60), @$workcontest[$row['hostname']] / $clen) . "</a></td>";
if (IS_ADMIN) {
if ($row['active']) {
$activepicto = "pause";
$activecmd = "deactivate";
} else {
$activepicto = "play";
$activecmd = "activate";
}
echo "<td><a href=\"judgehost.php?id=" . $row['hostname'] . "&cmd=" . $activecmd . "\"><img class=\"picto\" alt=\"" . $activecmd . "\" title=\"" . $activecmd . " judgehost\" " . "src=\"../images/" . $activepicto . ".png\" /></a></td>";
echo "<td>" . delLink('judgehost', 'hostname', $row['hostname']) . "</td>";
}
echo "</tr>\n";
}
echo "</tbody>\n</table>\n\n";
}
if (IS_ADMIN) {
echo addForm($pagename) . "<p>" . addSubmit('Start all judgehosts', 'cmd-activate') . addSubmit('Stop all judgehosts', 'cmd-deactivate') . "<br /><br />\n\n" . addLink('judgehosts', true) . "\n" . editLink('judgehosts', null, true) . "</p>\n" . addEndForm();
}
require LIBWWWDIR . '/footer.php';
示例4: deleteLink
if (isset($_GET['linkid'])) {
?>
<!-- EDITING LINK -->
<div class="content">
<div class="content-header">
<h4><a href="?p=admin">Main Menu</a> / <a href="?p=admin&sub=fplinks">Frontpage Links</a> / Edit</h4>
</div> <!-- .content-header -->
<div class="main-content">
<?php
if (isset($_POST['action'])) {
if ($_POST['action'] == 'edit') {
if (isset($_POST['delete'])) {
deleteLink();
} else {
editLink();
}
}
}
?>
<form method="POST" action="?p=admin&sub=fplinks&linkid=<?php
echo $_GET['linkid'];
?>
" class="form label-inline">
<input type="hidden" name="action" value="edit">
<?php
$edit_info = $DB->selectRow("SELECT * FROM `mw_menu_items` WHERE `id`='" . $_GET['linkid'] . "'");
?>
<!-- Link Title -->
<div class="field">
示例5: specialchars
if (!empty($row['country'])) {
echo '<tr><td>Country:</td><td>';
if (is_readable($countryflag)) {
echo '<img src="' . $countryflag . '" alt="' . specialchars($row['country']) . '" /> ';
}
echo specialchars($row['country']) . "</td></tr>\n";
}
if (!empty($row['members'])) {
echo '<tr><td>Members: </td><td>' . nl2br(specialchars($row['members'])) . "</td></tr>\n";
}
if (!empty($row['comments'])) {
echo '<tr><td>Comments:</td><td>' . nl2br(specialchars($row['comments'])) . "</td></tr>\n";
}
echo "</table></div>\n";
if (IS_ADMIN) {
echo "<p class=\"nomorecol\">" . editLink('team', $id) . "\n" . delLink('team', 'teamid', $id) . "</p>\n\n";
}
echo rejudgeForm('team', $id) . "\n\n";
if ($cid) {
echo "<h3>Score</h3>\n\n";
putTeamRow($cdata, array($id));
}
echo '<h3>Submissions';
if (isset($key)) {
$keystr = "";
switch ($key) {
case 'probid':
$keystr = "problem";
break;
case 'langid':
$keystr = "language";
示例6: while
echo "<table class=\"list sortable\">\n<thead>\n" . "<tr><th scope=\"col\">ID</th><th scope=\"col\">name</th>" . "<th scope=\"col\" class=\"sorttable_numeric\"># contests</th>" . "<th scope=\"col\">time<br />limit</th>" . "<th scope=\"col\">memory<br />limit</th>" . "<th scope=\"col\">output<br />limit</th>" . "<th scope=\"col\">test<br />cases</th>" . "<th scope=\"col\"></th>" . (IS_ADMIN ? "<th scope=\"col\"></th><th scope=\"col\"></th>" : '') . "</tr></thead>\n<tbody>\n";
$lastcid = -1;
while ($row = $res->next()) {
$classes = array();
if (!isset($activecontests[$row['probid']])) {
$classes[] = 'disabled';
}
$link = '<a href="problem.php?id=' . urlencode($row['probid']) . '">';
echo "<tr class=\"" . implode(' ', $classes) . "\"><td>" . $link . "p" . specialchars($row['probid']) . "</a>" . "</td><td>" . $link . specialchars($row['name']) . "</a>" . "</td><td>" . $link . specialchars(isset($activecontests[$row['probid']]) ? $activecontests[$row['probid']] : 0) . "</a>" . "</td><td>" . $link . (int) $row['timelimit'] . "</a>" . "</td><td>" . $link . (isset($row['memlimit']) ? (int) $row['memlimit'] : 'default') . "</a>" . "</td><td>" . $link . (isset($row['outputlimit']) ? (int) $row['outputlimit'] : 'default') . "</a>" . "</td><td><a href=\"testcase.php?probid=" . $row['probid'] . "\">" . $row['testcases'] . "</a></td>";
if (!empty($row['problemtext_type'])) {
echo '<td title="view problem description">' . '<a href="problem.php?id=' . urlencode($row['probid']) . '&cmd=viewtext"><img src="../images/' . urlencode($row['problemtext_type']) . '.png" alt="problem text" /></a></td>';
} else {
echo '<td></td>';
}
if (IS_ADMIN) {
echo '<td title="export problem as zip-file">' . exportLink($row['probid']) . '</td>' . "<td class=\"editdel\">" . editLink('problem', $row['probid']) . " " . delLink('problem', 'probid', $row['probid']) . "</td>";
}
echo "</tr>\n";
}
echo "</tbody>\n</table>\n\n";
}
if (IS_ADMIN) {
echo "<p>" . addLink('problem') . "</p>\n\n";
if (class_exists("ZipArchive")) {
$selected_cid = $cid === null ? -1 : $cid;
$contests = $DB->q("KEYVALUETABLE SELECT cid,\n\t\t CONCAT('c', cid, ': ', shortname, ' - ', name) FROM contest");
$values = array(-1 => 'Do not link to a contest');
foreach ($contests as $cid => $contest) {
$values[$cid] = $contest;
}
echo "\n" . addForm('problem.php', 'post', null, 'multipart/form-data') . 'Contest: ' . addSelect('contest', $values, $selected_cid, true) . 'Problem archive(s): ' . addFileField('problem_archive[]', null, ' required multiple accept="application/zip"') . addSubmit('Upload', 'upload') . addEndForm() . "\n";
示例7: while
require LIBWWWDIR . '/header.php';
echo "<h1>Users</h1>\n\n";
if ($users->count() == 0) {
echo "<p class=\"nodata\">No users defined</p>\n\n";
} else {
echo "<table class=\"list sortable\">\n<thead>\n" . "<tr><th scope=\"col\">username</th><th scope=\"col\">name</th>" . "<th scope=\"col\">email</th><th scope=\"col\">roles</th>" . "<th scope=\"col\">team</th>" . "<th class=\"thleft\" scope=\"col\">status</th><th></th>" . "</tr>\n</thead>\n<tbody>\n";
while ($row = $users->next()) {
$status = 0;
if (isset($row['last_login'])) {
$status = 1;
}
$link = '<a href="user.php?id=' . urlencode($row['userid']) . '">';
echo "<tr class=\"" . ($row['enabled'] == 1 ? '' : 'sub_ignore') . "\">" . "<td class=\"username\">" . $link . specialchars($row['username']) . "</a></td>" . "<td>" . $link . specialchars($row['name']) . "</a></td>" . "<td>" . $link . (isset($row['email']) ? specialchars($row['email']) : ' ') . "</a></td>" . "<td>" . $link . specialchars($row['roles']) . "</a></td>" . "<td>" . $link . (isset($row['teamid']) ? "t" . specialchars($row['teamid']) : ' ') . "</a></td>";
echo "<td sorttable_customkey=\"" . $status . "\" class=\"";
if ($status == 1) {
echo 'team-ok" title="logged in: ' . printtime($row['last_login']) . '"';
} else {
echo 'team-nocon" title="no connections made"';
}
echo ">{$link}" . CIRCLE_SYM . "</a></td>";
if (IS_ADMIN) {
echo "<td class=\"editdel\">" . editLink('user', $row['userid']) . " " . delLink('user', 'userid', $row['userid'], $row['name']) . "</td>";
}
echo "</tr>\n";
}
echo "</tbody>\n</table>\n\n";
}
if (IS_ADMIN) {
echo "<p>" . addLink('user') . "</p>\n";
}
require LIBWWWDIR . '/footer.php';
示例8: while
<?php
/**
* View the languages
*
* Part of the DOMjudge Programming Contest Jury System and licenced
* under the GNU GPL. See README and COPYING for details.
*/
require 'init.php';
$title = 'Languages';
require LIBWWWDIR . '/header.php';
echo "<h1>Languages</h1>\n\n";
$res = $DB->q('SELECT * FROM language ORDER BY name');
if ($res->count() == 0) {
echo "<p class=\"nodata\">No languages defined</p>\n\n";
} else {
echo "<table class=\"list sortable\">\n<thead>\n" . "<tr><th scope=\"col\">ID/ext</th><th scope=\"col\">name</th>" . "<th scope=\"col\">allow<br />submit</th>" . "<th scope=\"col\">allow<br />judge</th><th scope=\"col\">timefactor</th>" . "<th scope=\"col\">extensions</th><th scope=\"col\"></th>" . "</tr>\n</thead>\n<tbody>\n";
while ($row = $res->next()) {
$link = '<a href="language.php?id=' . urlencode($row['langid']) . '">';
echo "<tr" . ($row['allow_submit'] ? '' : ' class="disabled"') . "><td>" . $link . specialchars($row['langid']) . "</a>" . "</td><td>" . $link . specialchars($row['name']) . "</a>" . "</td><td>" . $link . printyn($row['allow_submit']) . "</a>" . "</td><td>" . $link . printyn($row['allow_judge']) . "</a>" . "</td><td>" . $link . specialchars($row['time_factor']) . "</a>" . "</td><td>" . $link . specialchars(implode(', ', json_decode($row['extensions']))) . "</a>";
if (IS_ADMIN) {
echo "</td><td class=\"editdel\">" . editLink('language', $row['langid']) . " " . delLink('language', 'langid', $row['langid']);
}
echo "</td></tr>\n";
}
echo "</tbody>\n</table>\n\n";
}
if (IS_ADMIN) {
echo "<p>" . addLink('language') . "</p>\n\n";
}
require LIBWWWDIR . '/footer.php';
示例9: htmlspecialchars
echo "\">" . $link . "-";
}
echo "</a></td><td>" . $link . ($row['room'] ? htmlspecialchars($row['room']) : ' ') . "</a></td>";
echo "<td class=\"";
switch ($status) {
case 0:
echo 'team-nocon" title="no connections made"';
break;
case 1:
echo 'team-nosub" title="teampage viewed, no submissions"';
break;
case 2:
echo 'team-nocor" title="submitted, none correct"';
break;
case 3:
echo 'team-ok" title="correct submission(s)"';
break;
}
echo ">{$link}" . CIRCLE_SYM . "</a></td>";
echo "<td class=\"teamstat\" title=\"{$numcor} correct / {$numsub} submitted\">{$link}{$numcor} / {$numsub}</a></td>";
if (IS_ADMIN) {
echo "<td class=\"editdel\">" . editLink('team', $row['teamid']) . " " . delLink('team', 'teamid', $row['teamid']) . "</td>";
}
echo "</tr>\n";
}
echo "</tbody>\n</table>\n\n";
}
if (IS_ADMIN) {
echo "<p>" . addLink('team') . "</p>\n";
}
require LIBWWWDIR . '/footer.php';
示例10: specialchars
?>
</td></tr>
<tr><td>Time factor: </td><td><?php
echo specialchars($data['time_factor']);
?>
×</td></tr>
<tr><td>Compile script:</td><td class="filename">
<?php
if (empty($data['compile_script'])) {
echo '<span class="nodata">none specified</span>';
} else {
echo '<a href="executable.php?id=' . urlencode($data['compile_script']) . '">' . specialchars($data['compile_script']) . '</a>';
}
?>
</td></tr>
<tr><td>Extensions: </td><td><?php
echo specialchars(implode(', ', json_decode($data['extensions'])));
?>
</td></tr>
</table>
<?php
echo addEndForm();
if (IS_ADMIN) {
echo "<p>" . editLink('language', $data['langid']) . "\n" . delLink('language', 'langid', $data['langid']) . "</p>\n\n";
}
echo rejudgeForm('language', $data['langid']) . "<br />\n\n";
echo "<h2>Submissions in " . specialchars($data['name']) . "</h2>\n\n";
$restrictions = array('langid' => $id);
putSubmissions($cdatas, $restrictions);
require LIBWWWDIR . '/footer.php';
示例11: specialchars
echo "\">" . $link . "-";
}
echo "</a></td><td>" . $link . ($row['room'] ? specialchars($row['room']) : ' ') . "</a></td>";
echo "<td class=\"";
switch ($status) {
case 0:
echo 'team-nocon" title="no connections made"';
break;
case 1:
echo 'team-nosub" title="teampage viewed, no submissions"';
break;
case 2:
echo 'team-nocor" title="submitted, none correct"';
break;
case 3:
echo 'team-ok" title="correct submission(s)"';
break;
}
echo ">{$link}" . CIRCLE_SYM . "</a></td>";
echo "<td class=\"teamstat\" title=\"{$numcor} correct / {$numsub} submitted\">{$link}{$numcor} / {$numsub}</a></td>";
if (IS_ADMIN) {
echo "<td class=\"editdel\">" . editLink('team', $row['teamid']) . " " . delLink('team', 'teamid', $row['teamid'], $row['name']) . "</td>";
}
echo "</tr>\n";
}
echo "</tbody>\n</table>\n\n";
}
if (IS_ADMIN) {
echo "<p>" . addLink('team') . "</p>\n";
}
require LIBWWWDIR . '/footer.php';
示例12: while
require LIBWWWDIR . '/header.php';
echo "<h1>Users</h1>\n\n";
if ($users->count() == 0) {
echo "<p class=\"nodata\">No users defined</p>\n\n";
} else {
echo "<table class=\"list sortable\">\n<thead>\n" . "<tr><th scope=\"col\">username</th><th scope=\"col\">name</th>" . "<th scope=\"col\">email</th><th scope=\"col\">roles</th>" . "<th scope=\"col\">team</th>" . "<th class=\"thleft\" scope=\"col\">status</th><th></th>" . "</tr>\n</thead>\n<tbody>\n";
while ($row = $users->next()) {
$status = 0;
if (isset($row['last_login'])) {
$status = 1;
}
$link = '<a href="user.php?id=' . urlencode($row['userid']) . '">';
echo "<tr class=\"" . ($row['enabled'] == 1 ? '' : 'sub_ignore') . "\">" . "<td class=\"username\">" . $link . htmlspecialchars($row['username']) . "</a></td>" . "<td>" . $link . htmlspecialchars($row['name']) . "</a></td>" . "<td>" . $link . htmlspecialchars($row['email']) . "</a></td>" . "<td>" . $link . htmlspecialchars($row['roles']) . "</a></td>" . "<td>" . (isset($row['teamid']) ? $link . "t" . htmlspecialchars($row['teamid']) . "</a>" : '') . "</td>";
echo "<td sorttable_customkey=\"" . $status . "\" class=\"";
if ($status == 1) {
echo 'team-ok" title="logged in: ' . printtime($row['last_login']) . '"';
} else {
echo 'team-nocon" title="no connections made"';
}
echo ">{$link}" . CIRCLE_SYM . "</a></td>";
if (IS_ADMIN) {
echo "<td class=\"editdel\">" . editLink('user', $row['userid']) . " " . delLink('user', 'userid', $row['userid']) . "</td>";
}
echo "</tr>\n";
}
echo "</tbody>\n</table>\n\n";
}
if (IS_ADMIN) {
echo "<p>" . addLink('user') . "</p>\n";
}
require LIBWWWDIR . '/footer.php';
示例13: deleteCategory
deleteCategory($id);
break;
case $lang["add_group"]:
addGroup();
break;
case $lang["edit_group"]:
editGroup($id);
break;
case $lang["delete_group"]:
deleteGroup($id);
break;
case $lang["add_link"]:
addLink();
break;
case $lang["edit_link"]:
editLink($id);
break;
case $lang["delete_link"]:
deleteLink($id);
break;
case $lang["delete_user"]:
deleteUser($id);
break;
case $lang["delete_event"]:
deleteEvent($id);
break;
case $lang["add_profile"]:
addProfile();
break;
case $lang["update modules"]:
updateModules();
示例14: COUNT
* View all team affiliations
*
* Part of the DOMjudge Programming Contest Jury System and licenced
* under the GNU GPL. See README and COPYING for details.
*/
require 'init.php';
$title = 'Affiliations';
require LIBWWWDIR . '/header.php';
echo "<h1>Affiliations</h1>\n\n";
$res = $DB->q('SELECT a.*, COUNT(teamid) AS cnt FROM team_affiliation a
LEFT JOIN team USING (affilid)
GROUP BY affilid ORDER BY name');
if ($res->count() == 0) {
echo "<p class=\"nodata\">No affiliations defined</p>\n\n";
} else {
echo "<table class=\"list sortable\">\n<thead>\n" . "<tr><th>ID</th>" . "<th>shortname</th>" . "<th>name</th>" . "<th>country</th>" . "<th>#teams</th>" . "<th></th></tr>\n</thead>\n<tbody>\n";
while ($row = $res->next()) {
$countryflag = "../images/countries/" . urlencode($row['country']) . ".png";
$link = '<a href="team_affiliation.php?id=' . urlencode($row['affilid']) . '">';
echo '<tr><td>' . $link . htmlspecialchars($row['affilid']) . '</a></td><td>' . $link . htmlspecialchars($row['shortname']) . '</a></td><td>' . $link . htmlspecialchars($row['name']) . '</a></td><td class="tdcenter">' . $link . htmlspecialchars($row['country']) . (is_readable($countryflag) ? ' <img src="' . $countryflag . '" alt="' . htmlspecialchars($row['country']) . '" />' : ' ') . '</a></td><td class="tdright">' . $link . (int) $row['cnt'] . '</a></td>';
if (IS_ADMIN) {
echo "<td class=\"editdel\">" . editLink('team_affiliation', $row['affilid']) . " " . delLink('team_affiliation', 'affilid', $row['affilid']) . "</td>";
}
echo "</tr>\n";
}
echo "</tbody>\n</table>\n\n";
}
if (IS_ADMIN) {
echo "<p>" . addLink('team_affiliation') . "</p>\n\n";
}
require LIBWWWDIR . '/footer.php';
示例15: rejudgeForm
echo '</td></tr>';
echo '<tr><td></td><td>';
}
echo '<a href="team.php?id=' . $team['teamid'] . '&cid=' . $id . '">';
echo $team['name'] . ' (t' . $team['teamid'] . ')';
echo '</a>';
}
}
}
echo '</td></tr>';
echo "</table>\n\n";
if (IS_ADMIN) {
if (in_array($data['cid'], $cids)) {
echo "<p>" . rejudgeForm('contest', $data['cid']) . "</p>\n\n";
}
echo "<p>" . editLink('contest', $data['cid']) . "\n" . delLink('contest', 'cid', $data['cid']) . "</p>\n\n";
}
echo "<h3>Problems</h3>\n\n";
$res = $DB->q('TABLE SELECT *
FROM problem
INNER JOIN contestproblem USING (probid)
WHERE cid = %i
ORDER BY shortname', $id);
if (count($res) == 0) {
echo "<p class=\"nodata\">No problems added yet</p>\n\n";
} else {
echo "<table class=\"list sortable\">\n<thead>\n" . "<tr><th scope=\"col\" class=\"sorttable_numeric\">probid</th>";
echo "<th scope=\"col\">name</th>";
echo "<th scope=\"col\">shortname</th>";
echo "<th scope=\"col\">points</th>";
echo "<th scope=\"col\">allow<br />submit</th>";