本文整理汇总了PHP中action_button函数的典型用法代码示例。如果您正苦于以下问题:PHP action_button函数的具体用法?PHP action_button怎么用?PHP action_button使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了action_button函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_assignments
function show_assignments()
{
global $tool_content, $m, $langEdit, $langDelete, $langNoAssign, $langNewAssign, $langCommands, $course_code, $themeimg, $course_id, $langConfirmDelete, $langDaysLeft, $m, $langWarnForSubmissions, $langDelSure;
$result = Database::get()->queryArray("SELECT *, CAST(UNIX_TIMESTAMP(deadline)-UNIX_TIMESTAMP(NOW()) AS SIGNED) AS time\n FROM assignment WHERE course_id = ?d ORDER BY CASE WHEN CAST(deadline AS UNSIGNED) = '0' THEN 1 ELSE 0 END, deadline", $course_id);
$tool_content .= action_bar(array(array('title' => $langNewAssign, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&add=1", 'button-class' => 'btn-success', 'icon' => 'fa-plus-circle', 'level' => 'primary-label')));
if (count($result) > 0) {
$tool_content .= "\n <div class='row'><div class='col-sm-12'>\n <div class='table-responsive'>\n <table class='table-default'>\n <tr>\n <th>{$m['title']}</th>\n <th class='text-center'>{$m['subm']}</th>\n <th class='text-center'>{$m['nogr']}</th>\n <th class='text-center'>{$m['deadline']}</th>\n <th class='text-center'>" . icon('fa-gears') . "</th>\n </tr>";
$index = 0;
foreach ($result as $row) {
// Check if assignement contains submissions
$num_submitted = Database::get()->querySingle("SELECT COUNT(*) AS count FROM assignment_submit WHERE assignment_id = ?d", $row->id)->count;
if (!$num_submitted) {
$num_submitted = ' ';
}
$num_ungraded = Database::get()->querySingle("SELECT COUNT(*) AS count FROM assignment_submit WHERE assignment_id = ?d AND grade IS NULL", $row->id)->count;
if (!$num_ungraded) {
$num_ungraded = ' ';
}
$tool_content .= "<tr class='" . (!$row->active ? "not_visible" : "") . "'>";
$deadline = (int) $row->deadline ? nice_format($row->deadline, true) : $m['no_deadline'];
$tool_content .= "<td>\n <a href='{$_SERVER['SCRIPT_NAME']}?course={$course_code}&id={$row->id}'>{$row->title}</a>\n </td>\n <td class='text-center'>{$num_submitted}</td>\n <td class='text-center'>{$num_ungraded}</td>\n <td class='text-center'>{$deadline}";
if ($row->time > 0) {
$tool_content .= " <br><span class='label label-warning'>{$langDaysLeft}" . format_time_duration($row->time) . "</span>";
} else {
if ((int) $row->deadline) {
$tool_content .= " <br><span class='label label-danger'>{$m['expired']}</span>";
}
}
$tool_content .= "</td>\n <td class='option-btn-cell'>" . action_button(array(array('title' => $langDelete, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&id={$row->id}&choice=do_delete", 'icon' => 'fa-times', 'class' => 'delete', 'confirm' => $langConfirmDelete), array('title' => $langEdit, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&id={$row->id}&choice=edit", 'icon' => 'fa-edit'), array('title' => $m['WorkSubsDelete'], 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&id={$row->id}&choice=do_purge", 'icon' => 'fa-eraser', 'confirm' => "{$langWarnForSubmissions} {$langDelSure}", 'show' => is_numeric($num_submitted) && $num_submitted > 0), array('title' => $row->active == 1 ? $m['deactivate'] : $m['activate'], 'url' => $row->active == 1 ? "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&choice=disable&id={$row->id}" : "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&choice=enable&id={$row->id}", 'icon' => $row->active == 1 ? 'fa-eye' : 'fa-eye-slash'))) . "</td></tr>";
$index++;
}
$tool_content .= '</table></div></div></div>';
} else {
$tool_content .= "<div class='alert alert-warning'>{$langNoAssign}</div>";
}
}
示例2: format_file_size
if ($is_dir) {
$tool_content .= "<td> </td><td class='center'>{$date}</td>";
} else {
if ($entry['format'] == ".meta") {
$size = format_file_size($entry['size']);
$tool_content .= "<td class='center'>{$size}</td><td class='center'>{$date}</td>";
} else {
$size = format_file_size($entry['size']);
$tool_content .= "<td class='center'>{$size}</td><td class='center' title='{$date_with_time}'>{$date}</td>";
}
}
if (!$is_in_tinymce) {
if ($can_upload) {
$tool_content .= "<td class='option-btn-cell'>";
$xmlCmdDirName = $entry['format'] == ".meta" && get_file_extension($cmdDirName) == "xml" ? substr($cmdDirName, 0, -4) : $cmdDirName;
$tool_content .= action_button(array(array('title' => $langGroupSubmit, 'url' => "{$urlAppend}modules/work/group_work.php?course={$course_code}&group_id={$group_id}&submit={$cmdDirName}", 'icon' => 'fa-book', 'show' => $subsystem == GROUP and isset($is_member) and $is_member), array('title' => $dload_msg, 'url' => $download_url, 'icon' => 'fa-save'), array('title' => $langVisible, 'url' => "{$base_url}" . ($entry['visible'] ? "mkInvisibl={$cmdDirName}" : "mkVisibl={$cmdDirName}"), 'icon' => $entry['visible'] ? 'fa-eye' : 'fa-eye-slash'), array('title' => $langResourceAccess, 'url' => "{$base_url}limited={$cmdDirName}", 'icon' => 'fa-unlock', 'show' => $course_id > 0 and course_status($course_id) == COURSE_OPEN and $entry['public']), array('title' => $langMove, 'url' => "{$base_url}move={$cmdDirName}", 'icon' => 'fa-arrows', 'show' => $entry['format'] != '.meta'), array('title' => $langRename, 'url' => "{$base_url}rename={$cmdDirName}", 'icon' => 'fa-repeat', 'show' => $entry['format'] != '.meta'), array('title' => $langComments, 'url' => "{$base_url}comment={$cmdDirName}", 'icon' => 'fa-comment-o', 'show' => $entry['format'] != '.meta'), array('title' => $langReplace, 'url' => "{$base_url}replace={$cmdDirName}", 'icon' => 'fa-reply', 'show' => !$is_dir && $entry['format'] != '.meta'), array('title' => $langMetadata, 'url' => "{$base_url}metadata={$xmlCmdDirName}", 'icon' => 'fa-tags', 'show' => get_config("insert_xml_metadata")), array('title' => $langResourceAccess, 'url' => "{$base_url}public={$cmdDirName}", 'icon' => 'fa-lock', 'show' => $course_id > 0 and course_status($course_id) == COURSE_OPEN and !$entry['public']), array('title' => $langDelete, 'url' => "{$base_url}filePath={$cmdDirName}&delete=1", 'icon' => 'fa-times', 'class' => 'delete', 'confirm' => "{$langConfirmDelete} {$entry['filename']}")));
$tool_content .= "</td>";
} else {
// student view
$tool_content .= "<td class='text-center'>" . icon('fa-save', $dload_msg, $download_url) . "</td>";
}
}
$tool_content .= "</tr>";
}
}
$tool_content .= "</table>\n </div>\n </div>\n </div>";
if ($can_upload && !$is_in_tinymce) {
$tool_content .= "<br><div class='text-right'>{$langMaxFileSize} " . ini_get('upload_max_filesize') . "</div>";
}
}
if (defined('SAVED_COURSE_CODE')) {
示例3: event_list
/**
* @brief display event list
* @global type $course_code
* @global type $is_editor
* @global type $langEvents
* @global type $langCalendar
* @global type $langDateNow
* @global type $dateFormatLong
* @global type $langHour
* @global type $langHours
* @global type $langDuration
* @global type $langAgendaNoTitle
* @global type $langDelete
* @global type $langConfirmDeleteEvent
* @global type $langConfirmDeleteRecursive
* @global type $langConfirmDeleteRecursiveEvents
* @global type $langModify
* @global type $langVisible
* @param type $events
* @param type $sens
* @return string
*/
function event_list($events, $sens, $type = '') {
global $course_code, $is_editor, $langDateNow, $dateFormatLong,
$langHour, $langHours, $langDuration, $langAgendaNoTitle, $langDelete,
$langConfirmDeleteEvent, $langConfirmDeleteRecursive, $langConfirmDeleteRecursiveEvents,
$langEditChange, $langViewHide, $langViewShow, $id, $is_admin;
$dateNow = date("j-n-Y / H:i", time());
$barMonth = '';
$nowBarShowed = false;
$eventlist = "<div class='table-responsive'><table class='table-default'>";
foreach ($events as $myrow) {
$content = standard_text_escape($myrow->content);
$d = strtotime($myrow->start);
if (!$nowBarShowed) {
// Following order
if ((($d > time()) and ($sens == " ASC")) or ( ($d < time()) and ( $sens == " DESC "))) {
if ($barMonth != date("m", time())) {
$barMonth = date("m", time());
$eventlist .= "<tr>";
// current month
$eventlist .= "<td colspan='2' class='monthLabel list-header'><b>" . ucfirst(claro_format_locale_date("%B %Y", time())) . "</b></td>";
$eventlist .= "</tr>";
}
$nowBarShowed = TRUE;
$eventlist .= "<tr>";
$eventlist .= "<td colspan='2' class='today'>$langDateNow $dateNow</td>";
$eventlist .= "</tr>";
}
}
if ($barMonth != date("m", $d)) {
$barMonth = date("m", $d);
// month LABEL
$eventlist .= "<tr>";
$eventlist .= "<td colspan='2' class='monthLabel list-header'>";
$eventlist .= "<div align='center'><b>" . ucfirst(claro_format_locale_date("%B %Y", $d)) . "</b></div></td>";
$eventlist .= "</tr>";
}
$classvis = '';
if ($is_editor) {
if ($myrow->visible == 0) {
$classvis = 'class = "not_visible"';
}
}
$eventlist .= "<tr $classvis>";
if ($is_editor or $type == 'personal' or ($is_admin and $type == 'admin')) {
$eventlist .= "<td style='padding:15px;'>";
} else {
$eventlist .= "<td style='padding:15px;' colspan='2'>";
}
if (($myrow->duration != '0:00') and ($myrow->duration != '')) {
if ($myrow->duration == 1) {
$message = $langHour;
} else {
$message = $langHours;
}
$msg = "($langDuration: " . q($myrow->duration) . " $message)";
} else {
$msg = '';
}
if ($myrow->title == '') {
$eventlist .= "<a href='$_SERVER[PHP_SELF]?course=$course_code&id=$myrow->id'>$langAgendaNoTitle</a>";
} else {
$eventlist .= "<strong><a href='$_SERVER[PHP_SELF]?course=$course_code&id=$myrow->id'>".q($myrow->title)."</a></strong> $msg";
}
$eventlist .= "<div><span class='day'>" . ucfirst(claro_format_locale_date($dateFormatLong, $d)) . "</span> ($langHour: " . ucfirst(date('H:i', $d)) . ")</div>";
if (isset($id)) {
$eventlist .= "<br>";
$eventlist .= "<div class='text-muted'>$content</div>";
}
$eventlist .= "</td>";
if ($type == 'admin' and $is_admin == true) {
$eventlist .= "<td class='option-btn-cell'>";
$eventlist .= action_button(array(
array('title' => $langEditChange,
'url' => "?admin=1&modify=$myrow->id",
'icon' => 'fa-edit'),
//.........这里部分代码省略.........
示例4: foreach
foreach ($scales as $scale) {
$scales_list .= "<li>$scale[scale_item_name] ($scale[scale_item_value])</li>";
}
$table_content .= "
<tr>
<td>$grading_scale->title</td>
<td>
<ul class='list-unstyled'>
$scales_list
</ul>
</td>
<td class='option-btn-cell'>
". action_button(array(
array(
'title' => $langEdit,
'url' => "grading_scales.php?course=$course_code&scale_id=$grading_scale->id",
'icon' => 'fa-edit'
)
))."
</td>
</tr>
";
}
$tool_content .= "
<div class='table-responsive'>
<table class='table-default'>
<thead>
<tr>
<th>$langTitle</th>
<th>$langGradebookMEANS</th>
<th class='text-center'>" . icon('fa-gears') . "</th>
示例5: track_result_row
function track_result_row($row)
{
$a = start_form();
$a .= "<tr>\n";
$a .= "<td class=\"cell_value\">" . track_input_text('Ttrack_number', 'Ttrack_number', $row['track_number']) . "</td>\n";
$a .= "<td class=\"cell_value\">" . track_input_text('Ttitle', 'Ttitle', $row['title']) . "</td>\n";
$a .= "<td class=\"cell_value\">" . track_input_text('Tduration', 'Tduration', $row['disp_duration']) . "</td>\n";
$a .= "<td class=\"cell_value\">" . action_button('track_update', ' Update ') . action_button('track_delete', ' Delete ') . "</td>\n";
$a .= hidden_element('a', 'track_update') . hidden_element('album_id', $row['album_id']) . hidden_element('id', $row['id']) . "\n";
$a .= "</tr>\n";
$a .= end_form();
return $a;
}
示例6: q
$definition_data = q($g->definition);
} else {
$definition_data = '-';
}
$tool_content .= "<tr>
<td width='150'><strong><a href='$base_url&id=" . getIndirectReference($g->id) . "'>" . q($g->term) . "</a></strong><br><span><small>$cat_descr</small></span></td>
<td><em>$definition_data</em>$urllink</td>";
if ($is_editor) {
$tool_content .= "<td class='option-btn-cell'>";
$tool_content .= action_button(array(
array('title' => $langEditChange,
'url' => "$edit_url&edit=" . getIndirectReference($g->id),
'icon' => 'fa-edit'),
array('title' => $langDelete,
'url' => "$edit_url&delete=" . getIndirectReference($g->id),
'icon' => 'fa-times',
'class' => 'delete',
'confirm' => $langConfirmDelete))
);
$tool_content .= "</td>";
}
$tool_content .= "</tr>";
}
$tool_content .= "</table></div>";
} else {
$tool_content .= "<br><div class='alert alert-warning'>$langNoResult</div>";
}
}
draw($tool_content, 2, null, $head_content);
示例7: foreach
foreach ($searchResult as $page) {
if ('__MainPage__' == $page->title) {
$title = $langWikiMainPage;
} else {
$title = $page->title;
}
$urltitle = rawurlencode($page->title);
$link = '<a href="' . htmlspecialchars($_SERVER['SCRIPT_NAME'] . '?wikiId=' . $wikiId . '&title=' . $urltitle . '&action=show') . '">' . $title . '</a>';
$tool_content .= '<li>' . $link . '</li>' . "\n";
}
$tool_content .= '</ul>' . "\n";
} else {
$tool_content .= $langNoResult;
}
break;
case 'rqSearch':
$tool_content .= "\n <div class='form-wrapper'>\n <form class='form-inline' role='form' method='post' action='" . htmlspecialchars($_SERVER['SCRIPT_NAME'] . '?wikiId=' . $wikiId . '&course=' . $course_code) . "'>\n <input type='hidden' name='action' value='exSearch'>\n <div class='form-group'>\n <label for='searchPattern'>{$langSearch}:</label>\n <input class='form-control' type='text' id='searchPattern' name='searchPattern' placeholder='{$langSearch}'>\n </div>\n <div class='form-group'>\n <input class='btn btn-primary' type='submit' value='" . $langSubmit . "'>\n <a class='btn btn-default' href='" . htmlspecialchars($_SERVER['SCRIPT_NAME'] . '?wikiId=' . $wikiId . '&course=' . $course_code) . "'>{$langCancel}</a>\n </div>\n </form>\n </div>";
break;
default:
trigger_error("Invalid action supplied to " . $_SERVER['SCRIPT_NAME'], E_USER_ERROR);
}
$print_button = icon('fa-print', $langWikiPagePrintable, "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&wikiId=" . $wiki->getWikiId() . "&action=show&printable=yes&versionId={$versionId}&title=" . rawurlencode($wiki_title));
if ($action == 'show' && (!isset($_GET['printable']) || $_GET['printable'] != "yes")) {
$tool_content .= "<div class='panel panel-action-btn-default'>\n <div class='panel-heading'>\n <div class='pull-right'>\n " . action_button(array(array('title' => $langWikiEditPage, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&wikiId=" . $wiki->getWikiId() . "&action=edit&title=" . rawurlencode($wiki_title) . "&versionId={$versionId}", 'icon' => 'fa-edit', 'show' => $is_allowedToEdit || $is_allowedToCreate), array('title' => $langWikiDeletePage, 'class' => 'delete', 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&wikiId=" . $wiki->getWikiId() . "&action=delete&title=" . rawurlencode($wiki_title), 'icon' => 'fa-times', 'confirm' => $langWikiDeletePageWarning, 'show' => ($is_allowedToEdit || $is_allowedToCreate) && $wiki_title != "__MainPage__" && $is_editor), array('title' => $langWikiPageHistory, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&wikiId=" . $wiki->getWikiId() . "&action=history&title=" . rawurlencode($wiki_title), 'icon' => 'fa-history'), array('title' => $langWikiPagePrintable, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&wikiId=" . $wiki->getWikiId() . "&action=show&printable=yes&versionId={$versionId}&title=" . rawurlencode($wiki_title), 'icon' => 'fa-print'))) . "</div>\n <h3 class='panel-title'>\n " . ($wiki_title != "__MainPage__" ? $wiki_title : $langWikiMainPage) . " \n </h3>\n </div>\n <div class='panel-body'>\n " . (isset($wiki_content) ? $wiki_content : "") . "\n </div>\n </div>";
}
add_units_navigation(TRUE);
if (isset($_GET['printable']) and $_GET['printable'] == "yes") {
print $printable_content;
} else {
draw($tool_content, 2, null, $head_content);
}
示例8: elseif
if ($announce->module_auto_id == 1) {
$tool_content .= $langExercise;
} elseif ($announce->module_auto_id == 2) {
$tool_content .= $langAssignment;
}
if ($announce->auto) {
$tool_content .= "<br>({$langAttendanceInsAut})";
} else {
$tool_content .= "<br>({$langAttendanceInsMan})";
}
} else {
$tool_content .= $langAttendanceActivity;
}
$tool_content .= "</td>";
$tool_content .= "<td>" . userAttendTotalActivityStats($announce->id, $participantsNumber) . "</td>";
$tool_content .= "<td class='text-center option-btn-cell'>" . action_button(array(array('title' => $langDelete, 'icon' => 'fa-times', 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&delete={$announce->id}", 'confirm' => $langConfirmDelete, 'class' => 'delete'), array('title' => $langAttendanceBook, 'icon' => 'fa-plus', 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&ins={$announce->id}"), array('title' => $langModify, 'icon' => 'fa-edit', 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&modify={$announce->id}"))) . "</td></tr>";
}
// end of while
$tool_content .= "</table></div></div></div>";
} else {
$tool_content .= "<div class='alert alert-warning'>{$langAttendanceNoActMessage1} <a href='{$_SERVER['SCRIPT_NAME']}?course={$course_code}&addActivity=1'>{$langHere}</a> {$langAttendanceNoActMessage3}</div>";
}
}
} else {
//============Student View==================
$pageName = $langAttendance;
$userID = $uid;
$result = Database::get()->queryArray("SELECT * FROM attendance_activities WHERE attendance_id = ?d ORDER BY `DATE` DESC", $attendance_id);
$announcementNumber = count($result);
if ($announcementNumber > 0) {
$tool_content .= "<div class='alert alert-info'>" . userAttendTotal($attendance_id, $userID) . " " . $langAttendanceAbsencesFrom . " " . q($attendance_limit) . " " . $langAttendanceAbsencesFrom2 . " </div>";
示例9: action_bar
chkValidator.addValidation("max_rooms_form","req","' . $langΒΒΒServerAlertMaxRooms . '");
chkValidator.addValidation("max_rooms_form","numeric","' . $langΒΒΒServerAlertMaxRooms . '");
chkValidator.addValidation("max_users_form","req","' . $langΒΒΒServerAlertMaxUsers . '");
chkValidator.addValidation("max_users_form","numeric","' . $langΒΒΒServerAlertMaxUsers . '");
chkValidator.addValidation("weight","req","' . $langΒΒΒServerAlertOrder . '");
chkValidator.addValidation("weight","numeric","' . $langΒΒΒServerAlertOrder . '");
//]]></script>';
} else {
//display available BBB servers
$tool_content .= action_bar(array(array('title' => $langAddBBBServer, 'url' => "bbbmoduleconf.php?add_server", 'icon' => 'fa-plus-circle', 'level' => 'primary-label', 'button-class' => 'btn-success')));
$q = Database::get()->queryArray("SELECT * FROM bbb_servers");
$tool_content .= "<div class='table-responsive'>";
$tool_content .= "<table class='table-default'>\r\n <thead>\r\n <tr><th class = 'text-center'>{$langHost}</th>\r\n <th class = 'text-center'>IP</th>\r\n <th class = 'text-center'>{$langBBBEnabled}</th>\r\n <th class = 'text-center'>{$langBBBConnectedUsers}</th>\r\n <th class = 'text-center'>{$langBBBServerOrderP}</th>\r\n <th class = 'text-center'>" . icon('fa-gears') . "</th></tr>\r\n </thead>";
foreach ($q as $srv) {
$enabled_bbb_server = $srv->enabled ? $langYes : $langNo;
$connected_users = get_connected_users($srv->server_key, $srv->api_url, $srv->ip) . '/' . $srv->max_rooms;
$tool_content .= "<tr>";
$tool_content .= "<td>{$srv->hostname}</td>";
$tool_content .= "<td>{$srv->ip}</td>";
$tool_content .= "<td>{$enabled_bbb_server}</td>";
$tool_content .= "<td>{$connected_users}</td>";
$tool_content .= "<td>{$srv->weight}</td>";
$tool_content .= "<td class='option-btn-cell'>" . action_button(array(array('title' => $langEdit, 'url' => "{$_SERVER['SCRIPT_NAME']}?edit_server={$srv->id}", 'icon' => 'fa-edit'), array('title' => $langDelete, 'url' => "{$_SERVER['SCRIPT_NAME']}?delete_server={$srv->id}", 'icon' => 'fa-times', 'class' => 'delete', 'confirm' => $langConfirmDelete))) . "</td>";
$tool_content .= "</tr>";
}
$tool_content .= "</table></div>";
}
}
}
}
draw($tool_content, 3, null, $head_content);
示例10: array
$tool_content .= "<div class='panel panel-action-btn-default'>
<div class='panel-heading'>
<div class='pull-right'>
".action_button(array(
array(
'title' => $langWikiEditPage,
'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&wikiId=".$wiki->getWikiId()."&action=edit&title=". rawurlencode($wiki_title). "&versionId=$versionId",
'icon' => 'fa-edit',
'show' => ($is_allowedToEdit || $is_allowedToCreate)
),
array(
'title' => $langWikiPageHistory,
'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&wikiId=". $wiki->getWikiId(). "&action=history&title=". rawurlencode($wiki_title),
'icon' => 'fa-history'
),
array(
'title' => $langWikiPagePrintable,
'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&wikiId=". $wiki->getWikiId(). "&action=show&printable=yes&versionId=$versionId&title=". rawurlencode($wiki_title),
'icon' => 'fa-print'
) ,
array(
'title' => $langWikiDeletePage,
'class' => 'delete',
'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&wikiId=".$wiki->getWikiId()."&action=delete&title=".rawurlencode($wiki_title),
'icon' => 'fa-times',
'confirm' => $langWikiDeletePageWarning,
'show' => ($is_allowedToEdit || $is_allowedToCreate) && $wiki_title != "__MainPage__" && $is_editor
)
))."</div>
<h3 class='panel-title'>
". ( $wiki_title != "__MainPage__" ? $wiki_title : $langWikiMainPage) ."
</h3>
示例11: foreach
foreach ($posts as $post) {
$sharing_content = '';
$rating_content = '';
if ($sharing_allowed) {
$sharing_content = $sharing_enabled ? print_sharing_links($urlServer . "modules/blog/index.php?course={$course_code}&action=showPost&pId=" . $post->getId(), $post->getTitle()) : '';
}
if ($ratings_enabled) {
$rating = new Rating('up_down', 'blogpost', $post->getId());
$rating_content = $rating->put($is_editor, $uid, $course_id);
}
if ($comments_enabled) {
$comm = new Commenting('blogpost', $post->getId());
$comment_content = "<a class='btn btn-primary btn-xs pull-right' href='{$_SERVER['SCRIPT_NAME']}?course={$course_code}&action=showPost&pId=" . $post->getId() . "#comments_title'>{$langComments} (" . $comm->getCommentsNum() . ")</a>";
} else {
$comment_content = "<div class=\"blog_post_empty_space\"></div>";
}
$tool_content .= "<div class='panel panel-action-btn-default'>\r\n <div class='panel-heading'>\r\n <div class='pull-right'>\r\n " . action_button(array(array('title' => $langModify, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&action=editPost&pId=" . $post->getId(), 'icon' => 'fa-edit', 'show' => $post->permEdit($is_editor, $stud_allow_create, $uid)), array('title' => $langDelete, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&action=delPost&pId=" . $post->getId(), 'icon' => 'fa-times', 'class' => 'delete', 'confirm' => $langSureToDelBlogPost, 'show' => $post->permEdit($is_editor, $stud_allow_create, $uid)))) . "\r\n </div>\r\n <h3 class='panel-title'>\r\n <a href='{$_SERVER['SCRIPT_NAME']}?course={$course_code}&action=showPost&pId=" . $post->getId() . "'>" . q($post->getTitle()) . "</a>\r\n </h3> \r\n </div>\r\n <div class='panel-body'>\r\n <div class='label label-success'>" . nice_format($post->getTime(), true) . "</div><small>" . $langBlogPostUser . display_user($post->getAuthor(), false, false) . "</small><br><br>" . standard_text_escape(ellipsize_html($post->getContent(), $num_chars_teaser_break, "<strong> ...<a href='{$_SERVER['SCRIPT_NAME']}?course={$course_code}&action=showPost&pId=" . $post->getId() . "'> <span class='smaller'>[{$langMore}]</span></a></strong>")) . "\r\n {$comment_content}\r\n </div>\r\n <div class='panel-footer'>\r\n <div class='row'>\r\n <div class='col-sm-6'>{$rating_content}</div>\r\n <div class='col-sm-6 text-right'>{$sharing_content}</div>\r\n </div> \r\n </div>\r\n </div>";
}
//display navigation links
$tool_content .= $blog->navLinksHTML($page, $posts_per_page);
$tool_content .= "</div>";
/***end of blog posts area***/
/***sidebar area***/
$tool_content .= "<div class='col-sm-3'>";
$tool_content .= $blog->popularBlogPostsHTML($num_popular);
$tool_content .= $blog->chronologicalTreeHTML(date('n', strtotime($posts[0]->getTime())), date('Y', strtotime($posts[0]->getTime())));
$tool_content .= "</div></div>";
/***end of sidebar area***/
}
}
draw($tool_content, 2, null, $head_content);
示例12: action_button
'</div>';
} else {
$cunits_content .= "<div class='item-side'>" .
action_button(array(
array('title' => $langEditChange,
'url' => $urlAppend . "modules/units/info.php?course=$course_code&edit=$cu->id",
'icon' => 'fa-edit'),
array('title' => $langDown,
'level' => 'primary',
'url' => "$_SERVER[SCRIPT_NAME]?down=". getIndirectReference($cu->id),
'icon' => 'fa-arrow-down',
'disabled' => $cu->id == $last_id),
array('title' => $langUp,
'level' => 'primary',
'url' => "$_SERVER[SCRIPT_NAME]?up=". getIndirectReference($cu->id),
'icon' => 'fa-arrow-up',
'disabled' => $count_index == 1),
array('title' => $vis == 1? $langViewHide : $langViewShow,
'url' => "$_SERVER[SCRIPT_NAME]?vis=". getIndirectReference($cu->id),
'icon' => $vis == 1? 'fa-eye-slash' : 'fa-eye'),
array('title' => $access == 1? $langResourceAccessLock : $langResourceAccessUnlock,
'url' => "$_SERVER[SCRIPT_NAME]?access=". getIndirectReference($cu->id),
'icon' => $access == 1? 'fa-lock' : 'fa-unlock',
'show' => $visible == COURSE_OPEN),
array('title' => $langDelete,
'url' => "$_SERVER[SCRIPT_NAME]?del=". getIndirectReference($cu->id),
'icon' => 'fa-times',
'class' => 'delete',
'confirm' => $langCourseUnitDeleteConfirm))) .
'</div>';
}
}
示例13: array
$tool_content .= "<td class='option-btn-cell'>".action_button(array(
array('title' => $langEditChange,
'url' => "admin.php?course=$course_code&exerciseId=$row->id",
'icon' => 'fa-edit'),
array('title' => $row->active ? $langViewHide : $langViewShow,
'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&".($row->active ? "choice=disable" : "choice=enable").(isset($page) ? "&page=$page" : "")."&exerciseId=" . $row->id,
'icon' => $row->active ? 'fa-eye-slash' : 'fa-eye' ),
array('title' => $row->public ? $langResourceAccessLock : $langResourceAccessUnlock,
'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&".($row->public ? "choice=limited" : "choice=public")."&exerciseId=$row->id",
'icon' => $row->public ? 'fa-lock' : 'fa-unlock',
'show' => course_status($course_id) == COURSE_OPEN),
array('title' => $langUsage,
'url' => "exercise_stats.php?course=$course_code&exerciseId=$row->id",
'icon' => 'fa-line-chart'),
array('title' => $langCreateDuplicate,
'icon-class' => 'warnLink',
'icon-extra' => "data-exerciseid='$row->id'",
'url' => "#",
'icon' => 'fa-copy'),
array('title' => $langPurgeExerciseResults,
'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&choice=purge&exerciseId=$row->id",
'icon' => 'fa-eraser',
'confirm' => $langConfirmPurgeExerciseResults),
array('title' => $langDelete,
'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&choice=delete&exerciseId=$row->id",
'icon' => 'fa-times',
'class' => 'delete',
'confirm' => $langConfirmPurgeExercise)
))."</td></tr>";
示例14: array
$data['aaData'] = array();
if ($is_editor) {
$iterator = 1;
foreach ($result as $myrow) {
//checking visible status
if ($myrow->visible == '0') {
$visible = 1;
$vis_icon = 'fa-eye-slash';
$vis_class = 'not_visible';
} else {
$visible = 0;
$vis_icon = 'fa-eye';
$vis_class = 'visible';
}
//setting datables column data
$data['aaData'][] = array('DT_RowId' => $myrow->id, 'DT_RowClass' => $vis_class, '0' => '<a href="' . $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code . '&an_id=' . $myrow->id . '">' . $myrow->title . '</a>', '1' => date('d-m-Y', strtotime($myrow->date)), '2' => action_button(array(array('title' => $langModify, 'icon' => 'fa-edit', 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&modify={$myrow->id}"), array('title' => $langVisible, 'icon' => $vis_icon, 'icon-class' => 'vis_btn', 'icon-extra' => "data-vis='{$visible}' data-id='{$myrow->id}'"), array('title' => $langDelete, 'class' => 'delete', 'icon' => 'fa-times', 'icon-class' => 'delete_btn', 'icon-extra' => "data-id='{$myrow->id}'"), array('title' => $langMove, 'level' => 'primary', 'icon' => 'fa-arrow-up', 'disabled' => !($iterator != 1 || $offset > 0), 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&up={$myrow->id}"), array('title' => $langMove, 'level' => 'primary', 'disabled' => $offset + $iterator >= $all_announc->total, 'icon' => 'fa-arrow-down', 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&down={$myrow->id}"))));
$iterator++;
}
} else {
foreach ($result as $myrow) {
$data['aaData'][] = array('0' => date('d-m-Y', strtotime($myrow->date)), '1' => '<a href="' . $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code . '&an_id=' . $myrow->id . '">' . q($myrow->title) . '</a>');
}
}
echo json_encode($data);
exit;
}
load_js('tools.js');
//check if Datables code is needed
if (!isset($_GET['addAnnounce']) && !isset($_GET['modify']) && !isset($_GET['an_id'])) {
load_js('datatables');
load_js('datatables_filtering_delay');
示例15: elseif
} elseif ($row->type == 3) {
$answerType = $langFillBlanks;
} elseif ($row->type == 4) {
$answerType = $langMatching;
} elseif ($row->type == 5) {
$answerType = $langTrueFalse;
} elseif ($row->type == 6) {
$answerType = $langFreeText;
}
$tool_content .= "<tr>";
if (!isset($fromExercise)) {
$tool_content .= "<td><a " . (count($exercise_ids) > 0 ? "class='warnLink' data-toggle='modal' data-target='#modalWarning' data-remote='false'" : "") . "href=\"admin.php?course={$course_code}&editQuestion=" . $row->id . "&fromExercise=\">" . q($row->question) . "</a><br/>" . $answerType . "</td>";
} else {
$tool_content .= "<td><a href=\"admin.php?course={$course_code}&editQuestion=" . $row->id . "&fromExercise=" . $fromExercise . "\">" . q($row->question) . "</a><br/>" . $answerType . "</td>";
}
$tool_content .= "<td class='option-btn-cell'>" . action_button(array(array('title' => $langModify, 'url' => "admin.php?course={$course_code}&editQuestion=" . $row->id, 'icon-class' => 'warnLink', 'icon-extra' => count($exercise_ids) > 0 ? " data-toggle='modal' data-target='#modalWarning' data-remote='false'" : "", 'icon' => 'fa-edit', 'show' => !isset($fromExercise)), array('title' => $langDelete, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&exerciseId={$exerciseId}&delete={$row->id}", 'icon' => 'fa-times', 'class' => 'delete', 'confirm' => $langConfirmYourChoice, 'show' => !isset($fromExercise)), array('title' => $langReuse, 'url' => "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&recup={$row->id}&fromExercise=" . (isset($fromExercise) ? $fromExercise : '') . "&exerciseId={$exerciseId}", 'icon' => 'fa-plus-square', 'show' => isset($fromExercise)))) . "</td></tr>";
}
}
if (!$nbrQuestions) {
$tool_content .= "<tr>";
if (isset($fromExercise) && $fromExercise) {
$tool_content .= "<td colspan='3'>";
} else {
$tool_content .= "<td colspan='4'>";
}
$tool_content .= $langNoQuestion . "</td></tr>";
}
// questions pagination
$numpages = intval(($total_questions - 1) / QUESTIONS_PER_PAGE);
if ($numpages > 0) {
$tool_content .= "<tr>";