本文整理汇总了PHP中action_bar函数的典型用法代码示例。如果您正苦于以下问题:PHP action_bar函数的具体用法?PHP action_bar怎么用?PHP action_bar使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了action_bar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: asForm
/**
* Returns an HTML Form for editing the XML.
*
* @global string $course_code
* @global string $langSubmit
* @global string $langRequiredFields
* @param array $data - array containing data to preload the form with
* @return string
*/
public function asForm($data = null) {
global $course_code, $langSubmit, $langRequiredFields, $langBack;;
$out = action_bar(array(
array('title' => $langBack,
'url' => "index.php",
'icon' => 'fa-reply',
'level' => 'primary-label')),false);
$out .= "<div class='right smaller'>$langRequiredFields</div>";
$out .= "
<form class='form-horizontal' role='form' method='post' enctype='multipart/form-data' action='" . $_SERVER['SCRIPT_NAME'] . "?course=$course_code'>
<ul class='nav nav-tabs' role='tablist'>
<li class='active'><a href='#tabs-1' role='tab' data-toggle='tab'>" . $GLOBALS['langCMeta']['courseGroup'] . "</a></li>
<li><a href='#tabs-2' role='tab' data-toggle='tab'>" . $GLOBALS['langCMeta']['instructorGroup'] . "</a></li>
<li><a href='#tabs-3' role='tab' data-toggle='tab'>" . $GLOBALS['langCMeta']['curriculumGroup'] . "</a></li>
<li><a href='#tabs-4' role='tab' data-toggle='tab'>" . $GLOBALS['langCMeta']['unitsGroup'] . "</a></li>
</ul>
<div class='tab-content'>
<div class='tab-pane fade in active' id='tabs-1' style='padding-top:20px'>";
if ($data != null) {
$this->populate($data);
}
$out .= $this->populateForm();
$out .= "</div>
<p class='right'><input class='btn btn-primary' type='submit' name='submit' value='$langSubmit'></p>
</div>
</form>
<div class='right smaller'>$langRequiredFields</div>";
return $out;
}
示例2: statistics_tools
function statistics_tools($course_code, $self_link = "", $relative_path = "") {
global $tool_content, $langStat, $langUsersLog, $langFavourite, $langUserLogins,
$langUserDuration, $langLearningPaths, $langGroupUsage, $langOldStats,
$langAccept, $langOldStatsExpireConfirm;
return $tool_content .= action_bar(array(
array('title' => $langStat,
'url' => $relative_path . "index.php?course=$course_code",
'icon' => 'fa-bar-chart',
'show' => $self_link != "index",
'level' => 'primary-label'),
array('title' => $langUsersLog,
'url' => $relative_path . "displaylog.php?course=$course_code",
'icon' => 'fa-user',
'show' => $self_link != "displaylog",
'level' => 'primary'),
array('title' => $langFavourite,
'url' => $relative_path . "favourite.php?course=$course_code&first=",
'icon' => 'fa-gear',
'show' => $self_link != "favourite",
'level' => 'primary'),
array('title' => $langUserLogins,
'url' => $relative_path . "userlogins.php?course=$course_code&first=",
'icon' => ' fa-comments-o',
'show' => $self_link != "userlogins",
'level' => 'primary'),
array('title' => $langUserDuration,
'url' => $relative_path . "userduration.php?course=$course_code",
'icon' => 'fa-clock-o',
'show' => $self_link != "userduration",
'level' => 'primary'),
array('title' => $langLearningPaths,
'url' => $relative_path . "../learnPath/detailsAll.php?course=$course_code&from_stats=1",
'icon' => 'fa-ellipsis-h',
'show' => $self_link != "detailsAll"),
array('title' => $langGroupUsage,
'url' => $relative_path . "group.php?course=$course_code",
'icon' => 'fa-users',
'show' => $self_link != "group"),
array('title' => $langOldStats,
'url' => $relative_path . 'oldStats.php?course=' . $course_code,
'icon' => 'fa-calendar',
'confirm_title' => $langOldStats,
'confirm_button' => $langAccept,
'confirm' => $langOldStatsExpireConfirm,
'show' => $self_link != "oldStats"),
));
}
示例3: admin_statistics_tools
function admin_statistics_tools($self_link = "") {
global $tool_content, $langPlatformGenStats, $langVisitsStats, $langVisitsCourseStats,
$langBack, $langOldStats, $langAccept, $langOldStatsExpireConfirm, $langMonthlyReport;
$tool_content .= action_bar(array(
array('title' => $langBack,
'url' => "",
'icon' => 'fa-reply',
'level' => 'primary-label'),
array('title' => $langPlatformGenStats,
'url' => "stateclass.php",
'icon' => 'fa-bar-chart',
'show' => $self_link != "stateclass",
'level' => 'primary-label'),
array('title' => $langVisitsStats,
'url' => "platformStats.php?first=",
'icon' => 'fa-sign-in',
'show' => $self_link != "platformStats",
'level' => 'primary'),
array('title' => $langVisitsCourseStats,
'url' => "visitsCourseStats.php?first=",
'icon' => 'fa-user',
'show' => $self_link != "visitsCourseStats",
'level' => 'primary'),
array('title' => $langOldStats,
'url' => "oldStats.php",
'icon' => 'fa-file-text-o',
'level' => 'primary',
'confirm_title' => $langOldStats,
'confirm_button' => $langAccept,
'show' => $self_link != "oldStats",
'confirm' => $langOldStatsExpireConfirm),
array('title' => $langMonthlyReport,
'url' => "monthlyReport.php",
'icon' => 'fa-calendar',
'show' => $self_link != "monthlyReport",
'level' => 'primary'),
));
}
示例4: array
require_once 'archive_functions.php';
$toolName = $langCourseInfo;
$pageName = $langArchiveCourse;
$navigation[] = array('url' => "index.php?course=$course_code", 'name' => $langCourseInfo);
if (!isset($_GET['token']) || !validate_csrf_token($_GET['token'])) csrf_token_error();
doArchive($course_id, $course_code);
$tool_content .= "
<div class='alert alert-info'>
<ol>
<li>$langBUCourseDataOfMainBase $course_code</li>
<li>$langBackupOfDataBase $course_code</li>
</ol>
</div>
<div class='alert alert-success'>$langBackupSuccesfull</div>" .
action_bar(array(
array('title' => $langDownloadIt,
'url' => $urlAppend . "courses/archive/$course_code/$course_code-" . date('Ymd') . ".zip",
'icon' => 'fa-download',
'button-class' => 'btn-success',
'level' => 'primary-label'),
array('title' => $langBack,
'url' => "index.php?course=$course_code",
'icon' => 'fa-reply',
'level' => 'primary-label')), false);
draw($tool_content, 2);
示例5: q
$forum_name = $myrow->name;
$forum_id = $myrow->id;
if (isset($_GET['empty'])) { // if we come from newtopic.php
$tool_content .= "<div class='alert alert-warning'>$langEmptyNewTopic</div>";
}
$pageName = q($forum_name);
if ($can_post) {
$tool_content .=
action_bar(array(
array('title' => $langNewTopic,
'url' => "newtopic.php?course=$course_code&forum=$forum_id",
'icon' => 'fa-plus-circle',
'level' => 'primary-label',
'button-class' => 'btn-success'),
array('title' => $langBack,
'url' => "index.php?course=$course_code",
'icon' => 'fa-reply',
'level' => 'primary-label')
));
}
/*
* Retrieve and present data from course's forum
*/
$total_topics = Database::get()->querySingle("SELECT num_topics FROM forum
WHERE id = ?d
AND course_id = ?d", $forum_id, $course_id)->num_topics;
示例6: isset
$form_action_url .= isset($_GET['modifyCat']) ? "&modifyCat=" . intval($_GET['modifyCat']) : "&newCat=yes";
if (isset($_GET['modifyCat'])) {
$q_cat = Database::get()->querySingle("SELECT * FROM exercise_question_cats WHERE question_cat_id = ?d", $_GET['modifyCat']);
}
$questionCatName = Session::has('questionCatName') ? Session::get('questionCatName') : (isset($q_cat) ? $q_cat->question_cat_name : '');
$tool_content .= action_bar(array(array('title' => $langBack, 'level' => 'primary-label', 'icon' => 'fa-reply', 'url' => "question_categories.php?course={$course_code}")));
$tool_content .= "\n <div class='form-wrapper'>\n <form class='form-horizontal' role='form' action='{$form_action_url}' method='post'>\n <div class='form-group " . (Session::getError('questionCatName') ? "has-error" : "") . "'>\n <label for='questionCatName' class='col-sm-2 control-label'>{$langTitle}:</label>\n <div class='col-sm-10'>\n <input name='questionCatName' type='text' class='form-control' id='questionCatName' placeholder='{$langTitle}' value='{$questionCatName}'>\n <span class='help-block'>" . Session::getError('questionCatName') . "</span>\n </div>\n </div>\n <div class='form-group'>\n <div class='col-sm-10 col-sm-offset-2'>\n <input class='btn btn-primary' name='submitCat' type='submit' value='{$langSubmit}'>\n <a href='question_categories.php?course={$course_code}' class='btn btn-default'>{$langCancel}</a>\n </div>\n </div> \n </form>\n </div>";
} elseif (isset($_GET['deleteCat'])) {
$q_cat_id = $_GET['deleteCat'];
if (Database::get()->query("DELETE FROM exercise_question_cats WHERE question_cat_id = ?d AND course_id = ?d", $q_cat_id, $course_id)->affectedRows > 0) {
Database::get()->query("UPDATE exercise_question SET category = ?d WHERE category = ?d AND course_id = ?d", 0, $q_cat_id, $course_id);
Session::Messages($langDelCatSuccess, 'alert-success');
}
redirect_to_home_page("modules/exercise/question_categories.php?course={$course_code}");
} else {
$pageName = $langQuestionCats;
$navigation[] = array("url" => "index.php?course={$course_code}", "name" => $langExercices);
$tool_content .= action_bar(array(array('title' => $langNewCat, 'level' => 'primary-label', 'icon' => 'fa-plus-circle', 'url' => "question_categories.php?course={$course_code}&newCat=yes", 'button-class' => 'btn-success'), array('title' => $langBack, 'level' => 'primary', 'icon' => 'fa-reply', 'url' => "index.php?course={$course_code}")));
$q_cats = Database::get()->queryArray("SELECT * FROM exercise_question_cats WHERE course_id = ?d", $course_id);
if (count($q_cats) > 0) {
$tool_content .= "\n <div class='table-responsive'>\n <table class='table-default'>\n <tbody>\n <tr>\n <th>{$langTitle}</th>\n <th class='text-center'>" . icon('fa-gears') . "</th>\n </tr> \n ";
foreach ($q_cats as $q_cat) {
$action_button = action_button(array(array('title' => $langEdit, 'url' => "question_categories.php?course={$course_code}&modifyCat={$q_cat->question_cat_id}", 'icon' => 'fa-edit'), array('title' => $langDelete, 'url' => "question_categories.php?course={$course_code}&deleteCat={$q_cat->question_cat_id}", 'icon' => 'fa-times', 'confirm' => $langQuestionCatDelConfirrm, 'class' => 'delete')));
$tool_content .= "\n <tr>\n <td>{$q_cat->question_cat_name}</td>\n <td class='option-btn-cell'>{$action_button}</td>\n </tr>";
}
$tool_content .= " \n </tbody>\n </table>\n </div>";
} else {
$tool_content .= "<div class='alert alert-warning'>{$langNoQuestionCats}</div>";
}
}
draw($tool_content, 2, null, $head_content);
示例7: implode
Database::get()->query('DELETE FROM module_disable');
if (isset($_POST['moduleDisable'])) {
$optArray = implode(', ', array_fill(0, count($_POST['moduleDisable']), '(?d)'));
Database::get()->query('INSERT INTO module_disable (module_id) VALUES ' . $optArray,
array_keys($_POST['moduleDisable']));
}
Session::Messages($langWikiEditionSucceed, 'alert-success');
redirect_to_home_page('modules/admin/modules.php');
} else {
$disabled = array();
foreach (Database::get()->queryArray('SELECT module_id FROM module_disable') as $item) {
$disabled[] = $item->module_id;
}
$tool_content .= action_bar(array(
array('title' => $langBack,
'url' => $urlAppend . 'modules/admin/index.php',
'icon' => 'fa-reply',
'level' => 'primary-label')), false) .
"<div class='alert alert-warning'>$langDisableModulesHelp</div>
<div class='form-wrapper'>
<form class='form-horizontal' role='form' action='modules.php' method='post'>";
$alwaysEnabled = array(MODULE_ID_AGENDA, MODULE_ID_DOCS, MODULE_ID_ANNOUNCE, MODULE_ID_DROPBOX, MODULE_ID_DESCRIPTION);
foreach ($modules as $mid => $minfo) {
if (in_array($mid, $alwaysEnabled)) {
continue;
}
$checked = in_array($mid, $disabled)? ' checked': '';
$icon = $minfo['image'];
if (isset($theme_settings['icon_map'][$icon])) {
$icon = $theme_settings['icon_map'][$icon];
示例8: create_restored_course
//.........这里部分代码省略.........
$video_map, $videolink_map, $assignments_map, $exercise_map, $ebook_map,
$lp_learnPath_map),
'delete' => array('id')
), $url_prefix_map, $backupData, $restoreHelper);
// Units
$unit_map = restore_table($restoreThis, 'course_units', array('set' => array('course_id' => $new_course_id), 'return_mapping' => 'id'), $url_prefix_map, $backupData, $restoreHelper);
restore_table($restoreThis, 'unit_resources', array('delete' => array('id'),
'map' => array('unit_id' => $unit_map),
'map_function' => 'unit_map_function',
'map_function_data' => array($document_map,
$link_category_map,
$link_map,
$ebook_map,
$ebook_section_map,
$ebook_subsection_map,
$video_map,
$videolink_map,
$lp_learnPath_map,
$wiki_map,
$assignments_map,
$exercise_map,
$forum_map,
$forum_topic_map)
), $url_prefix_map, $backupData, $restoreHelper);
// Weekly
$weekly_map = restore_table($restoreThis, 'course_weekly_view', array(
'set' => array('course_id' => $new_course_id),
'return_mapping' => 'id'
), $url_prefix_map, $backupData, $restoreHelper);
restore_table($restoreThis, 'course_weekly_view_activities', array(
'delete' => array('id'),
'map' => array('course_weekly_view_id' => $weekly_map),
'map_function' => 'unit_map_function',
'map_function_data' => array($document_map,
$link_category_map,
$link_map,
$ebook_map,
$ebook_section_map,
$ebook_subsection_map,
$video_map,
$videolink_map,
$lp_learnPath_map,
$wiki_map,
$assignments_map,
$exercise_map,
$forum_map,
$forum_topic_map)
), $url_prefix_map, $backupData, $restoreHelper);
restore_table($restoreThis, 'course_description', array(
'set' => array('course_id' => $new_course_id),
'delete' => array('id')
), $url_prefix_map, $backupData, $restoreHelper);
removeDir($restoreThis);
// index course after restoring
require_once 'modules/search/indexer.class.php';
Indexer::queueAsync(Indexer::REQUEST_REMOVEALLBYCOURSE, Indexer::RESOURCE_IDX, $new_course_id);
Indexer::queueAsync(Indexer::REQUEST_STOREALLBYCOURSE, Indexer::RESOURCE_IDX, $new_course_id);
});
// check/cleanup video files after restore transaction
if ($new_course_code != null && $new_course_id != null) {
$videodir = $webDir . "/video/" . $new_course_code;
$videos = scandir($videodir);
foreach ($videos as $videofile) {
if (is_dir($videofile)) {
continue;
}
$vlike = '/' . $videofile;
if (!isWhitelistAllowed($videofile)) {
unlink($videodir . "/" . $videofile);
Database::get()->query("DELETE FROM `video` WHERE course_id = ?d AND path LIKE ?s", $new_course_id, $vlike);
continue;
}
$vcnt = Database::get()->querySingle("SELECT count(id) AS count FROM `video` WHERE course_id = ?d AND path LIKE ?s", $new_course_id, $vlike)->count;
if ($vcnt <= 0) {
unlink($videodir . "/" . $videofile);
}
}
$backUrl = $urlAppend . (isset($currentCourseCode)? "courses/$currentCourseCode/": 'modules/admin/');
$tool_content .= action_bar(array(
array('title' => $langEnter,
'url' => $urlAppend . "courses/$new_course_code/",
'icon' => 'fa-arrow-right',
'level' => 'primary-label',
'button-class' => 'btn-success'),
array('title' => $langBack,
'url' => $backUrl,
'icon' => 'fa-reply',
'level' => 'primary-label')), false);
}
}
示例9: action_bar
* End of prof only
* ------------------------------------------- */
// display action bar
if (!isset($_GET['addEvent']) && !isset($_GET['edit'])) {
$tool_content .= action_bar(array(
array('title' => $langAddEvent,
'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&addEvent=1",
'icon' => 'fa-plus-circle',
'level' => 'primary-label',
'button-class' => 'btn-success',
'show' => $is_editor),
array('title' => $langListCalendar,
'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code",
'icon' => 'fa-list',
'level' => 'primary-label',
'button-class' => 'btn-default',
'show' => (($view == EVENT_LIST_VIEW) and (!isset($id)))),
array('title' => $langListAll,
'url' => "$_SERVER[SCRIPT_NAME]?course=$course_code&v=1",
'icon' => 'fa-list',
'level' => 'primary-label',
'button-class' => 'btn-default',
'show' => ($view == EVENT_CALENDAR_VIEW or isset($id))),
array('title' => $langiCalExport,
'url' => "icalendar.php?c=$course_id",
'icon' => 'fa-calendar',
'level' => 'primary')
));
if (isset($_GET['id'])) {
$cal_content_list = event_list_view($id);
} else {
$cal_content_list = event_list_view();
示例10: showquota
/**
* @brief A page that shows a table with statistic data and a gauge bar
* @global type $langQuotaUsed
* @global type $langQuotaPercentage
* @global type $langQuotaTotal
* @global type $langBack
* @global type $langQuotaBar
* @global type $course_code
* @global type $subsystem
* @global type $group_id
* @global type $ebook_id
* @param type $quota
* @param type $used
* @return string
*/
function showquota($quota, $used)
{
global $langQuotaUsed, $langQuotaPercentage, $langQuotaTotal, $langBack, $langQuotaBar, $course_code, $subsystem, $group_id, $ebook_id, $pageName;
$retstring = '';
// pososto xrhsimopoioumenou xorou se %
$diskUsedPercentage = round($used / $quota * 100) . "%";
// morfopoihsh tou synolikou diathesimou megethous tou quota
$quota = format_bytesize($quota / 1024);
// morfopoihsh tou synolikou megethous pou xrhsimopoieitai
$used = format_bytesize($used / 1024);
// telos diamorfwshs ths grafikh mparas kai twn arithmitikwn statistikwn stoixeiwn
// ektypwsh pinaka me arithmitika stoixeia + thn grafikh bara
if ($subsystem == GROUP) {
$link = "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&group_id={$group_id}";
} elseif ($subsystem == EBOOK) {
$link = "{$_SERVER['SCRIPT_NAME']}?course={$course_code}&ebook_id={$ebook_id}";
} else {
$link = "{$_SERVER['SCRIPT_NAME']}?course={$course_code}";
}
$pageName = $langQuotaBar;
$retstring .= action_bar(array(array('title' => $langBack, 'url' => $link, 'icon' => 'fa-reply', 'level' => 'primary-label')));
$retstring .= "\n <div class='row'><div class='col-sm-12'>\n <div class='form-wrapper'>\n <form class='form-horizontal' role='form'>\n <div class='form-group'>\n <label class='col-sm-2'>{$langQuotaUsed}:</label>\n <div class='col-sm-10'>\n <p class='form-control-static'>{$used}</p>\n </div>\n </div>\n <div class='form-group'>\n <label class='col-sm-2'>{$langQuotaPercentage}:</label>\n <div class='col-sm-10'>\n <div class='progress'>\n <p class='progress-bar progress-bar-striped active from-control-static' role='progressbar' aria-valuenow='" . str_replace('%', '', $diskUsedPercentage) . "' aria-valuemin='0' aria-valuemax='100' style='width: {$diskUsedPercentage};'>\n {$diskUsedPercentage}\n </p>\n </div>\n </div>\n </div>\n <div class='form-group'>\n <label class='col-sm-2'>{$langQuotaTotal}:</label>\n <div class='col-sm-10'>\n <p class='form-control-static'>{$quota}</p>\n </div>\n </div> \n </form>\n </div></div></div>";
$tmp_cwd = getcwd();
return $retstring;
}
示例11: array
'level' => 'primary-label'),
array('title' => $langEmailUnsubscribe,
'url' => "emailunsubscribe.php",
'icon' => 'fa-envelope',
'level' => 'primary'),
array('title' => $langUnregUser,
'url' => "../unreguser.php",
'icon' => 'fa-times',
'level' => 'primary')
));
} else {
if (get_config('dropbox_allow_personal_messages')) {
$tool_content .=
action_bar(array(
array('title' => $langProfileSendMail,
'url' => "../../modules/dropbox/index.php?upload=1&id=$id",
'icon' => 'fa-envelope',
'level' => 'primary-label')
));
}
}
// hybridauth providers information. available only for the current user.
$providers = '';
if ($id == $uid) {
$providers_text = '';
$extAuthList = Database::get()->queryArray("SELECT auth.auth_id, auth_name FROM auth, user_ext_uid
WHERE auth.auth_id = user_ext_uid.auth_id AND user_ext_uid.user_id = ?d", $id);
foreach ($extAuthList as $item) {
$fullName = q($authFullName[$item->auth_id]);
$providers_text .= " <span class='tag-value'><img src='$themeimg/{$item->auth_name}.png' alt=''> $fullName</span>";
}
示例12: CONVERT
WHERE ebook_id = ?d
ORDER BY CONVERT(public_id, UNSIGNED), public_id", $info->id);
$sections = array('' => '---');
foreach ($q as $section) {
$sid = $section->id;
$qsid = q($section->public_id);
$qstitle = q($section->title);
$sections[$sid] = $qsid . '. ' . ellipsize($section->title, 25);
}
$pageName = $langEBookPages;
$tool_content .= action_bar(array(
array('title' => $langNewEBookPage,
'url' => "new.php?course=$course_code&ebook_id=$ebook_id&from=ebookEdit",
'icon' => 'fa-plus-circle',
'button-class' => 'btn-success',
'level' => 'primary-label'),
array('title' => $langFileAdmin,
'url' => "document.php?course=$course_code&ebook_id=$ebook_id",
'icon' => 'fa-hdd-o',
'level' => 'primary-label')
));
// Form #3 - edit subsection file assignment
$q = Database::get()->queryArray("SELECT ebook_section.id AS sid,
ebook_section.id AS psid,
ebook_section.title AS section_title,
ebook_subsection.id AS ssid,
ebook_subsection.public_id AS pssid,
ebook_subsection.title AS subsection_title,
ebook_subsection.file_id as file_id
FROM ebook_section, ebook_subsection
WHERE ebook_section.ebook_id = $info->id AND
示例13: unset
// adds the exercise ID into the list of exercises for the current question
$objQuestionTmp->addToList($fromExercise);
}
// destruction of the Question object
unset($objQuestionTmp);
// adds the question ID into the list of questions for the current exercise
$objExercise->addToList($recup);
Session::Messages($langQuestionReused, 'alert-success');
redirect_to_home_page("modules/exercise/question_pool.php?course={$course_code}" . (isset($fromExercise) ? "&fromExercise={$fromExercise}" : "") . "&exerciseId={$exerciseId}");
}
if (isset($fromExercise)) {
$action_bar_options[] = array('title' => $langGoBackToEx, 'url' => "admin.php?course={$course_code}&exerciseId={$fromExercise}", 'icon' => 'fa-reply', 'level' => 'primary-label');
} else {
$action_bar_options = array(array('title' => $langNewQu, 'url' => "admin.php?course={$course_code}&newQuestion=yes", 'icon' => 'fa-plus-circle', 'level' => 'primary-label', 'button-class' => 'btn-success'), array('title' => $langImportQTI, 'url' => "admin.php?course={$course_code}&importIMSQTI=yes", 'icon' => 'fa-download', 'level' => 'primary-label', 'button-class' => 'btn-success'), array('title' => $langExportQTI, 'url' => "question_pool.php?" . $_SERVER['QUERY_STRING'] . "&exportIMSQTI=yes", 'icon' => 'fa-upload', 'level' => 'primary-label', 'button-class' => 'btn-success'));
}
$tool_content .= action_bar($action_bar_options);
if (isset($fromExercise)) {
$result = Database::get()->queryArray("SELECT id, title FROM `exercise` WHERE course_id = ?d AND id <> ?d ORDER BY id", $course_id, $fromExercise);
} else {
$result = Database::get()->queryArray("SELECT id, title FROM `exercise` WHERE course_id = ?d ORDER BY id", $course_id);
}
$exercise_options = "<option value = '0'>-- {$langAllExercises} --</option>\n\n <option value = '-1' " . (isset($exerciseId) && $exerciseId == -1 ? "selected='selected'" : "") . ">-- {$langOrphanQuestions} --</option>\n";
foreach ($result as $row) {
$exercise_options .= "\n <option value='" . $row->id . "' " . (isset($exerciseId) && $exerciseId == $row->id ? "selected='selected'" : "") . ">{$row->title}</option>\n";
}
//Create exercise category options
$q_cats = Database::get()->queryArray("SELECT * FROM exercise_question_cats WHERE course_id = ?d", $course_id);
$q_cat_options = "<option value='-1' " . (isset($categoryId) && $categoryId == -1 ? "selected" : "") . ">-- {$langQuestionAllCats} --</option>\\m\n <option value='0' " . (isset($categoryId) && $categoryId == 0 ? "selected" : "") . ">-- {$langQuestionWithoutCat} --</option>\n";
foreach ($q_cats as $q_cat) {
$q_cat_options .= "<option value='" . $q_cat->question_cat_id . "' " . (isset($categoryId) && $categoryId == $q_cat->question_cat_id ? "selected" : "") . ">{$q_cat->question_cat_name}</option>\n";
}
示例14: action_bar
$base = $_SERVER['SCRIPT_NAME'] . '?course=' . $course_code . '&' . $module . 'group_id=' . $group_id . '';
if (isset($_POST['user_date_start']) or isset($_POST['user_date_end'])) {
$append_url_link = "&u_date_start=$_POST[user_date_start]&u_date_end=$_POST[user_date_end]";
} else {
$append_url_link = '';
}
$tool_content .= action_bar(array(
array('title' => $langLearningPaths,
'url' => "$base&type=lp",
'icon' => 'fa-bar-chart',
'show' => $type == "duration",
'level' => 'primary'),
array('title' => $langUsage,
'url' => "$base&type=duration",
'icon' => 'fa-bar-chart',
'show' => $type == "lp",
'level' => 'primary'),
array('title' => "$langDumpUserDurationToFile ($langCodeUTF)",
'url' => "dumpgroupduration.php?course=$course_code&group_id=$group_id$append_url_link",
'icon' => 'fa-file-archive-o',
'level' => 'primary'),
array('title' => "$langDumpUserDurationToFile ($langCodeWin)",
'url' => "dumpgroupduration.php?course=$course_code&group_id=$group_id$append_url_link",
'icon' => 'fa-file-archive-o',
'level' => 'primary')));
if ($type == 'duration') {
$label = $langDuration;
$min_date = Database::get()->querySingle("SELECT MIN(day) AS minday FROM actions_daily WHERE course_id = ?d", $course_id)->minday;
示例15: the_enclosure
the_enclosure();
?>
</span>
<?php
}
?>
<div class="excerpt">
<?php
the_content();
?>
</div>
<?php
do_action('river_entry');
?>
<?php
action_bar('before=&after= | ');
?>
</div><?php
$num++;
}
} elseif (!has_feeds()) {
?>
<div style="border:1px solid #e7dc2b;background: #fff888;margin:15px;padding:10px;"><?php
printf(_r('You haven\'t added any feeds yet. Add them from <a href="%s">your admin panel</a>'), 'admin/');
?>
</div>
<?php
} else {
?>
<div style="border:1px solid #e7dc2b;background: #fff888;margin:15px;padding:10px;">No items available in the last <?php
echo get_offset(true);