本文整理汇总了PHP中print_button函数的典型用法代码示例。如果您正苦于以下问题:PHP print_button函数的具体用法?PHP print_button怎么用?PHP print_button使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_button函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: foreach
foreach ($quizzes as $quiz) {
$hasRecords = count_records('quiz_course_activation', 'courseid', $course->id, 'quizid', $quiz->id);
echo "<table class='grades boxwidthwide boxaligncenter generalbox' border='0' cellpadding='5' cellspacing='5' width='1000px'>";
if ($hasRecords > 0) {
echo "<caption>{$quiz->name}</caption>";
printGradeTableHead();
// 12 columns total
echo "<tfoot>";
echo "<tr>";
if (!empty($param->edit) && $quiz->id == $param->edit) {
echo "<td colspan='6'><a href='{$CFG->wwwroot}/'><font color='black'>Return to Main</font></a> | ";
echo "<a href='{$CFG->wwwroot}/question/grades.php?courseid={$course->id}'>Cancel</a>";
echo "</td>";
echo "<td colspan='6'>";
$options = array('courseid' => $course->id, 'quizid' => $quiz->id, 'savegrades' => true);
print_button('Save Grades', $options);
echo "</td>";
} else {
if ($param->savegrades && $param->quizid == $quiz->id) {
echo "<td colspan='6'>";
echo "<a href='{$CFG->wwwroot}/'><font color='black'>Return to Main</font></a> | ";
echo "<a href='{$CFG->wwwroot}/question/grades.php?courseid={$course->id}&edit={$quiz->id}'>Edit Grades</a>";
echo "</td>";
echo "<td colspan='6'>";
if ($form = data_submitted()) {
$count = saveGradeRecords($form, $quiz->id, $course->id);
if ($count) {
echo "<font color='green'>{$count} Saved.</font>";
} else {
echo "<font color='red'>Grades could not be saved.</font>";
}
开发者ID:arshanam,项目名称:Moodle-ITScholars-LMS,代码行数:31,代码来源:grades_old.php
示例2: print_button
</td>
</tr>
<?php
}
# end for
?>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td class="center">
<?php
# You need global or project-specific permissions to remove users
# from this project
if (!$f_show_global_users) {
print_button("manage_proj_edit_page.php?project_id={$f_project_id}&show_global_users=true", lang_get('show_global_users'));
} else {
print_button("manage_proj_edit_page.php?project_id={$f_project_id}", lang_get('hide_global_users'));
}
if ($t_removable_users_exist) {
echo ' ';
print_button("manage_proj_user_remove.php?project_id={$f_project_id}", lang_get('remove_all_link'));
}
?>
</td>
</tr>
</table>
</div>
<?php
html_page_bottom();
开发者ID:kaos,项目名称:mantisbt,代码行数:31,代码来源:manage_proj_edit_page.php
示例3: array
$table->class = 'search-table';
$table->style = array();
$table->style[0] = 'font-weight: bold;';
$table->data = array();
$table->data[0][0] = print_input_text("search_text", $search_text, "", 15, 100, true, __('Search'));
$params = array();
$params['input_id'] = 'id_company';
$params['input_name'] = 'id_company';
$params['input_value'] = $id_company;
$params['title'] = __('Company');
$params['return'] = true;
$table->data[0][1] = print_company_autocomplete_input($params);
$table->data[0][2] = print_submit_button(__('Search'), "search_btn", false, 'class="sub search"', true);
// Delete new lines from the string
$where_clause = str_replace(array("\r", "\n"), '', $where_clause);
$table->data[0][3] = print_button(__('Export to CSV'), '', false, 'window.open(\'include/export_csv.php?export_csv_contacts=1&where_clause=' . str_replace("'", "\\'", $where_clause) . '\')', 'class="sub csv"', true);
echo '<form id="contact_search_form" method="post">';
print_table($table);
echo '</form>';
$contacts = crm_get_all_contacts($where_clause);
$contacts = print_array_pagination($contacts, "index.php?sec=customers&sec2=operation/contacts/contact_detail¶ms={$search_params}", $offset);
if ($contacts !== false) {
unset($table);
$table->width = "99%";
$table->class = "listing";
$table->data = array();
$table->size = array();
$table->size[3] = '40px';
$table->style = array();
// $table->style[] = 'font-weight: bold';
$table->head = array();
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:contact_detail.php
示例4: db_query
$result = db_query($query);
$user_count = db_num_rows($result);
?>
<br />
<table class="width100" cellspacing="1">
<tr>
<td class="form-title" colspan="5">
<?php
echo lang_get('manage_accounts_title');
?>
[<?php
echo $user_count;
?>
]
<?php
print_button('manage_user_create_page.php', lang_get('create_new_account_link'));
?>
</td>
<td class="center" colspan="2">
<form method="post" action="manage_user_page.php">
<input type="hidden" name="sort" value="<?php
echo $c_sort;
?>
" />
<input type="hidden" name="dir" value="<?php
echo $c_dir;
?>
" />
<input type="hidden" name="save" value="1" />
<input type="checkbox" name="hide" value="1" <?php
check_checked($c_hide, 1);
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:manage_user_page.php
示例5: print_input_hidden
//offset pagination hidden
if(!isset($params['offset'])){
$params['offset'] = '';
}
$table_search->data[3][0] .= print_input_hidden ('offset', $params['offset'], true, false, 'offset');
//mode: list, tree, pure
$table_search->data[3][0] .= print_input_hidden ('mode', $params['mode'], true, false, 'mode');
//csv querys
$filter["query"] = $sql_search;
$filter["query_pag"] = $sql_search_pagination;
serialize_in_temp($filter, $config["id_user"]);
//tree_search_submit()
$table_search->data[3][1] = print_button(__('Export to CSV'), '', false, 'tree_search_submit(); window.open(\'' . 'include/export_csv.php?export_csv_inventory=1'.'\');', 'class="sub csv"', true);
//button
$table_search->data[3][2] = print_submit_button (__('Search'), 'search', false, 'class="sub search"', true);
$search_other .= print_table($table_search, true);
$search_other .= '</div>';
print_container_div("inventory_form",__("Inventory form search"),$search_other, 'open', false, false);
echo '</form>';
}
$write_permission = enterprise_hook ('inventory_check_acl', array ($config['id_user'], $id, true));
$page = (int)get_parameter('page', 1);
switch ($mode) {
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:inventory_search.php
示例6: lang_get
<table class="width100" cellspacing="1">
<tr>
<td class="form-title" colspan="5">
<?php
echo lang_get('manage_accounts_title');
?>
[<?php
echo $total_user_count;
?>
]
<?php
print_button('manage_user_create_page.php', lang_get('create_new_account_link'));
?>
<?php
if ($f_filter === 'UNUSED') {
echo print_button('manage_user_prune.php', lang_get('prune_accounts'));
}
?>
</td>
<td class="center" colspan="3">
<form method="post" action="manage_user_page.php">
<?php
# CSRF protection not required here - form does not result in modifications
?>
<input type="hidden" name="sort" value="<?php
echo $c_sort;
?>
" />
<input type="hidden" name="dir" value="<?php
echo $c_dir;
?>
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:31,代码来源:manage_user_page+-+Copy.php
示例7: print_button
// Create record in tattachment
}
}
// Control to upload file
echo '<div class="divform">';
echo '<table class="search-table">';
echo '<tr>';
echo '<td>';
echo print_button (__('Upload a new file'), 'add_link', false, '$(\'#upload_div\').slideToggle (); return false', 'class="sub upload"');
echo '<div id="upload_div" style="display: none;" class="">';
$target_directory = 'attachment';
$action = "index.php?sec=customers&sec2=operation/leads/lead_detail&id=$id&op=files&upload=1";
$into_form = "<input type='hidden' name='directory' value='$target_directory'><b>Description</b> <input type=text name=description size=20>";
print_input_file_progress($action,$into_form,'','sub upload');
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</div>';
// List of lead attachments
$sql = "SELECT * FROM tattachment WHERE id_lead = $id ORDER BY timestamp DESC";
$files = get_db_all_rows_sql ($sql);
开发者ID:articaST,项目名称:integriaims,代码行数:29,代码来源:lead_files.php
示例8: foreach
$t_max_column_count = 2;
foreach ($t_query_arr as $t_id => $t_name) {
if ($t_column_count == 0) {
print '<tr>';
}
print '<td>';
if (OFF != $t_rss_enabled) {
# Use the "new" RSS link style.
print_rss(rss_get_issues_feed_url(null, null, $t_id), lang_get('rss'));
echo ' ';
}
$t_query_id = (int) $t_id;
print_link('view_all_set.php?type=3&source_query_id=' . $t_query_id, $t_name);
if (filter_db_can_delete_filter($t_id)) {
echo ' ';
print_button('query_delete_page.php?source_query_id=' . $t_query_id, lang_get('delete_query'));
}
print '</td>';
$t_column_count++;
if ($t_column_count == $t_max_column_count) {
print '</tr>';
$t_column_count = 0;
}
}
# Tidy up this row
if ($t_column_count > 0 && $t_column_count < $t_max_column_count) {
for ($i = $t_column_count; $i < $t_max_column_count; $i++) {
print '<td> </td>';
}
print '</tr>';
}
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:query_view_page.php
示例9: print_button
}
echo '</td><td class="right shrink">';
echo $db->f("amount");
echo '</td><td class="button">';
$container["account_num"] = $db->f("anon_id");
$container["password"] = $db->f("password");
print_button($container, 'Access Account');
echo '</td></tr>';
}
echo '</table></div><br>';
}
$container = array();
$container['url'] = 'skeleton.php';
$container['body'] = 'bank_anon.php';
$container['make'] = 'Yes';
print_button($container, 'Create an account');
}
if (isset($account_num)) {
//they didnt come from the creation screen so we need to check if the pw is correct
$db->query('SELECT *
FROM anon_bank
WHERE anon_id=' . $account_num . '
AND game_id=' . $player->game_id . ' LIMIT 1');
if ($db->next_record()) {
if ($var['allowed'] != 'yes') {
if (isset($_REQUEST['pass'])) {
$pass = $_REQUEST['pass'];
} else {
$pass = $var['password'];
}
if ($db->f('password') != $pass) {
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:bank_anon.php
示例10: addslashes
$container['body'] = 'bank_report.php';
$container['alliance_id'] = $alliance_id;
$container['text'] = $text;
if (isset($var["text"])) {
$thread_id = 0;
$bankReporterID = -1;
$textInsert = addslashes($text);
$db->query("SELECT * FROM alliance_thread_topic WHERE game_id = {$player->game_id} AND alliance_id = {$alliance_id} AND topic = 'Bank Statement' LIMIT 1");
if ($db->next_record()) {
$thread_id = $db->f("thread_id");
}
if ($thread_id == 0) {
$db->query("SELECT * FROM alliance_thread_topic WHERE game_id = {$player->game_id} AND alliance_id = {$alliance_id} ORDER BY thread_id DESC LIMIT 1");
if ($db->next_record()) {
$thread_id = $db->f("thread_id") + 1;
} else {
$thread_id = 1;
}
$db->query("INSERT INTO alliance_thread_topic (game_id, alliance_id, thread_id, topic) VALUES " . "({$player->game_id}, {$alliance_id}, {$thread_id}, 'Bank Statement')");
$db->query("INSERT INTO alliance_thread (game_id, alliance_id, thread_id, reply_id, text, sender_id, time) VALUES " . "({$player->game_id}, {$alliance_id}, {$thread_id}, 1, '{$textInsert}', {$bankReporterID}, " . time() . ")");
} else {
$db->query("UPDATE alliance_thread SET time = " . time() . ", text = '" . $textInsert . "' WHERE thread_id = {$thread_id} AND alliance_id = {$alliance_id} AND game_id = {$player->game_id} AND reply_id = 1");
$db->query("DELETE FROM player_read_thread WHERE thread_id = {$thread_id} AND game_id = {$player->game_id} AND alliance_id = {$alliance_id}");
}
print "<div align=\"center\">A statement has been sent to the alliance.</div><br />";
} else {
print "<div align=\"center\">";
print_button($container, 'Send Report to Alliance');
print "</div>";
}
print $text;
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:bank_report.php
示例11: check_login
global $config;
check_login();
$id = (int) get_parameter('id');
$incident_creator = get_db_value("id_creator", "tincidencia", "id_incidencia", $id);
if (!give_acl($config["id_user"], 0, "IW") && $config['id_user'] != $incident_creator) {
// Doesn't have access to this page
audit_db($config['id_user'], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access to ticket #" . $id);
include "general/noaccess.php";
return;
}
$title = get_db_value("titulo", "tincidencia", "id_incidencia", $id);
echo '<div id="upload_result"></div>';
echo "<div id='upload_control'>";
$table->width = '100%';
$table->data = array();
$table->data[0][0] = "<span style='font-size: 10px'>" . __("Please note that you cannot upload .php or .pl files, as well other source code formats. Please compress that files prior to upload (using zip or gz)") . "</span>";
$table->data[1][0] = print_textarea('file_description', 8, 1, '', "style='resize:none'", true, __('Description'));
if (defined('AJAX')) {
$action = 'ajax.php?page=operation/incidents/incident_detail';
} else {
$action = 'index.php?sec=incidents&sec2=operation/incidents/incident_detail';
}
$into_form = print_table($table, true);
$into_form .= '<div class="button" style="width: ' . $table->width . '">';
$into_form .= print_button(__('Upload'), 'upload', false, '', 'class="sub upload"', true);
$into_form .= '</div>';
$into_form .= print_input_hidden('id', $id, true);
$into_form .= print_input_hidden('upload_file', 1, true);
// Important: Set id 'form-add-file' to form. It's used from ajax control
print_input_file_progress($action, $into_form, 'id="form-add-file"', 'sub next', 'button-upload');
echo '</div>';
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:incident_attach_file.php
示例12: number_format
echo '+';
} else {
echo '-';
}
echo '</td><td>';
if (!empty($max_hardware[11])) {
echo '+';
} else {
echo '-';
}
echo '</td></tr>';
echo '</table><br>';
echo '<table cellspacing="0"class="nobord">';
echo '<tr><td><hr style="width:200px"></td></tr>';
echo '<tr><td class="right">+ ';
echo number_format($cost);
echo '</td></tr>';
echo '<tr><td><hr style="width:200px"></td></tr>';
echo '<tr><td class="right">- ';
echo number_format($ship->cost >> 1);
echo '</td></tr>';
echo '<tr><td><hr style="width:200px"></td></tr>';
echo '<tr><td class="right">= ';
echo number_format($cost - ($ship->cost >> 1));
echo '</td></tr>';
echo '<tr><td><hr style="width:200px"></td></tr>';
echo '<tr><td class="right">';
echo print_button($container, 'Buy');
echo '</td></tr>';
echo '</table>';
}
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:shop_ship.php
示例13: user_print_autocomplete_input
$params_assigned['input_value'] = $owner;
$params_assigned['title'] = 'Owner';
$params_assigned['return'] = true;
$table_search->data[1][0] = user_print_autocomplete_input($params_assigned);
$contracts = get_contracts();
$manufacturers = get_manufacturers();
$table_search->data[1][1] = print_select($contracts, 'id_contract', $id_contract, '', __('None'), 0, true, false, false, __('Contract'), '', 'width: 200px;');
$table_search->data[1][2] = print_select($manufacturers, 'id_manufacturer', $id_manufacturer, '', __('None'), 0, true, false, false, __('Manufacturer'), '', 'width: 200px;');
$table_search->data[1][3] = print_checkbox_extended('last_update', 1, $last_update, false, '', '', true, __('Last updated'));
$buttons = '<div style=" text-align: right;">';
$buttons .= print_input_hidden('search', 1, true);
$buttons .= print_input_hidden('mode', $mode, true);
$buttons .= print_submit_button(__('Search'), 'search', false, 'class="sub search"', true);
$filter["query"] = $sql_search;
serialize_in_temp($filter, $config["id_user"]);
$buttons .= print_button(__('Export to CSV'), '', false, 'window.open(\'' . 'include/export_csv.php?export_csv_inventory=1' . '\')', 'class="sub csv"', true);
$buttons .= print_report_button("index.php?sec=inventory&sec2=operation/inventories/inventory&search=1¶ms={$params}", __('Export to PDF') . " ");
$buttons .= '</div>';
$all_inventory_status = inventories_get_inventory_status();
array_unshift($all_inventory_status, __("All"));
$table_search->data[2][0] = print_select($all_inventory_status, 'inventory_status', $inventory_status, '', '', '', true, false, false, __('Status'));
$params_associated['input_id'] = 'text-associated_user';
$params_associated['input_name'] = 'associated_user';
$params_associated['input_value'] = $associated_user;
$params_associated['title'] = __('Associated user');
$params_associated['return'] = true;
$table_search->data[2][1] = user_print_autocomplete_input($params_associated);
$companies = get_companies();
array_unshift($companies, __("All"));
$table_search->data[2][2] = print_select($companies, 'id_company', $id_company, '', '', 0, true, false, false, __('Associated company'), '', 'width: 200px;');
$table_search->data[3][0] = " ";
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:inventory_search.php
示例14: array
$table_search->style[1] = 'font-weight: bold';
$table_search->style[2] = 'font-weight: bold';
$table_search->style[3] = 'font-weight: bold';
$table_search->data = array();
$table_search->data[0][0] = __('Search');
$table_search->data[0][0] .= print_input_text("text", $text, "", 25, 100, true);
$table_search->data[1][0] = __('Action');
$table_search->data[1][0] .= print_select($actions, 'action', $action, '', __('Any'), '', true, false, true, '', false, "width:218px;");
$table_search->data[2][0] = __('Date from');
$table_search->data[2][0] .= print_input_text('date_from', $date_from, '', 10, 20, true, '');
$table_search->data[3][0] = __('Date to');
$table_search->data[3][0] .= print_input_text('date_to', $date_to, '', 10, 20, true);
$table_search->data[4][0] = print_submit_button(__('Search'), 'search_btn', false, 'class="sub search"', true);
$where_clause = $where;
$where_clause = str_replace(array("\r", "\n"), '', $where_clause);
$table_search->data[5][0] = print_button(__('Export to CSV'), '', false, 'window.open(\'include/export_csv.php?export_csv_audit=1&where_clause=' . str_replace('"', "\\'", $where_clause) . '\')', 'class="sub"', true);
echo "<div class='divform'>";
echo "<form method=post action ='index.php?sec=godmode&sec2=godmode/setup/audit&text={$text}&action={$action}' >";
print_table($table_search);
echo "</form>";
echo "</div>";
// Pagination
$total_events = get_db_sql("SELECT COUNT(ID_sesion) FROM tsesion {$where}");
echo "<div class='divresult'>";
pagination($total_events, "index.php?sec=godmode&sec2=godmode/setup/audit&text={$text}&action={$action}", $offset);
$table = new StdClass();
$table->width = '100%';
$table->class = 'listing';
$table->head = array();
$table->head[0] = __('Accion');
$table->head[1] = __('User');
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:audit.php
示例15: html_page_top1
html_page_top1(lang_get('manage_projects_link'));
html_page_top2();
print_manage_menu('manage_proj_page.php');
# Project Menu Form BEGIN
?>
<br />
<table class="width100" cellspacing="1">
<tr>
<td class="form-title" colspan="5">
<?php
echo lang_get('projects_title');
?>
<?php
# Check the user's global access level before allowing project creation
if (access_has_global_level(config_get('create_project_threshold'))) {
print_button('manage_proj_create_page.php', lang_get('create_new_project_link'));
}
?>
</td>
</tr>
<tr class="row-category">
<td width="20%">
<?php
print_manage_project_sort_link('manage_proj_page.php', lang_get('name'), 'name', $t_direction, $f_sort);
?>
<?php
print_sort_icon($t_direction, $f_sort, 'name');
?>
</td>
<td width="10%">
<?php
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:manage_proj_page.php
示例16: mcm_web_print_table
//.........这里部分代码省略.........
?>
')">
<a href="#" onmousedown="loadPlaylist('<?php
echo $playlist_url;
?>
', '<?php
echo $cover_url;
?>
'); return false;">
<img id="id<?php
echo $id;
?>
-overlay" src="images/overlay.png" class="overlay" alt="">
<img id="id<?php
echo $id;
?>
-cover" src="<?php
echo $cover_url;
?>
" class="cover<?php
print_cover_class($id, $_SESSION['status'][$id]);
?>
" alt="album cover" width="150" height="150">
</a>
</div>
<div class="choices">
<a href="#" onmousedown="clickRadio('id<?php
echo $id;
?>
', 'add'); return false;"><img id="id<?php
echo $id;
?>
-img-add" src="images/add<?php
print_button($id, 'accepted');
?>
.png" alt="Add" title="Add"></a>
<input type="radio" id="id<?php
echo $id;
?>
-add" name="id<?php
echo $id;
?>
" value="accepted"<?php
print_checkbox($id, 'accepted');
?>
>
<a href="#" onmousedown="clickRadio('id<?php
echo $id;
?>
', 'rem'); return false;"><img id="id<?php
echo $id;
?>
-img-rem" src="images/remove<?php
print_button($id, 'rejected');
?>
.png" alt="Remove" title="Remove"></a>
<input type="radio" id="id<?php
echo $id;
?>
-rem" name="id<?php
echo $id;
?>
" value="rejected"<?php
print_checkbox($id, 'rejected');
?>
>
开发者ID:jaquer,项目名称:MusicCollectionManagement,代码行数:67,代码来源:functions.php
示例17: form_search_incident
//.........这里部分代码省略.........
$params_creator['input_name'] = 'search_id_creator';
$params_creator['input_value'] = $search_creator;
$params_creator['title'] = __('Creator');
$params_creator['return'] = true;
$table->data[1][3] = user_print_autocomplete_input($params_creator);
$table->data[2][0] = print_select(get_priorities(), 'search_priority', $priority, '', __('Any'), -1, true, false, false, __('Priority'), false);
$table->data[2][1] = print_select(get_incident_resolutions(), 'search_resolution', $resolution, '', __('Any'), -1, true, false, false, __('Resolution'), false);
$table->data[2][2] = get_last_date_control($date_from, 'search_from_date', __('Date'), $date_start, 'search_first_date', __('Created from'), $date_end, 'search_last_date', __('Created to'));
$name = $id_inventory ? get_inventory_name($id_inventory) : '';
$table->data[2][3] = print_input_text('inventory_name', $name, '', 7, 0, true, __('Inventory'), false);
$table->data[2][3] .= " <a href='javascript: show_search_inventory(\"\",\"\",\"\",\"\",\"\",\"\");'>" . print_image('images/zoom.png', true, array('title' => __('Search inventory'))) . "</a>";
$table->data[2][3] .= print_input_hidden('id_inventory', $id_inventory, true);
if (!get_external_user($config["id_user"])) {
$table->data[4][0] = print_select(get_companies(), 'search_id_company', $id_company, '', __('All'), 0, true, false, false, __('Company'));
}
$table->data[4][1] = print_select(get_incident_types(), 'search_id_incident_type', $search_id_incident_type, 'javascript:change_type_fields_table();', __('All'), 0, true, false, false, __('Ticket type'));
$table->data[4][3] = print_checkbox_extended('search_group_by_project', 1, $group_by_project, false, '', '', true, __('Group by project/task'));
$sla_states = array();
$sla_states[1] = __('SLA is fired');
$sla_states[2] = __('SLA is not fired');
$table->data[5][0] = print_select($sla_states, 'search_sla_state', $sla_state, '', __('All'), 0, true, false, false, __('SLA'));
$table->data[5][1] = combo_task_user_participant($config["id_user"], 0, $id_task, true, __("Task"), 'search_id_task');
$table->data[5][2] = print_input_text('search_left_sla', $left_sla, '', 7, 0, true, __('SLA > (%)'), false);
$table->data[5][3] = print_input_text('search_right_sla', $right_sla, '', 7, 0, true, __('SLA < (%)'), false);
$table_type_fields = new stdclass();
$table_type_fields->width = "100%";
$table_type_fields->class = "search-table";
$table_type_fields->data = array();
//Print custom field data
$column = 0;
$row = 0;
if ($type_fields) {
foreach ($type_fields as $key => $type_field) {
$data = $search_type_field[$type_field['id']];
if ($type_field['type'] == "text" || $type_field['type'] == "textarea") {
$input = print_input_text('search_type_field_' . $type_field['id'], $data, '', 30, 30, true, $type_field['label']);
} else {
if ($type_field['type'] == "combo") {
$combo_values = explode(",", $type_field['combo_value']);
$values = array();
foreach ($combo_values as $value) {
$values[$value] = $value;
}
$input = print_select($values, 'search_type_field_' . $type_field['id'], $data, '', __('Any'), '', true, false, false, $type_field['label']);
} else {
if ($type_field['type'] == "linked") {
$linked_values = explode(",", $type_field['linked_value']);
$values = array();
foreach ($linked_values as $value) {
$value_without_parent = preg_replace("/^.*\\|/", "", $value);
$values[$value_without_parent] = $value_without_parent;
$has_childs = get_db_all_rows_sql("SELECT * FROM tincident_type_field WHERE parent=" . $type_field['id']);
if ($has_childs) {
$i = 0;
foreach ($has_childs as $child) {
if ($i == 0) {
$childs = $child['id'];
} else {
$childs .= ',' . $child['id'];
}
$i++;
}
$childs = "'" . $childs . "'";
$script = 'javascript:change_linked_type_fields_table(' . $childs . ',' . $type_field['id'] . ');';
} else {
$script = '';
}
}
$input = print_select($values, 'search_type_field_' . $type_field['id'], $data, $script, __('Any'), '', true, false, false, $type_field['label']);
}
}
}
$table_type_fields->data[$row][$column] = $input;
if ($column >= 3) {
$column = 0;
$row++;
} else {
$column++;
}
}
}
if ($table_type_fields->data) {
$table_type_fields_html = print_table($table_type_fields, true);
}
$table->data[6][0] = "<div id='table_type_fields'>" . $table_type_fields_html . "</div>";
$table->data[7][0] = '<div style="width: 100%; text-align: left; height: 20px;"><a class="show_advanced_search" id="show_advanced_search" href="javascript:show_ad_search();">' . __('Advanced search') . '></a></div>';
//Store serialize filter
serialize_in_temp($filter, $config["id_user"]);
$table->data[7][2] = print_submit_button(__('Search'), 'search', false, 'class="sub search"', true);
$table->data[7][2] .= print_button(__('Export to CSV'), '', false, 'window.open(\'' . 'include/export_csv.php?export_csv_tickets=1' . '\')', 'class="sub csv"', true);
$table->colspan[7][2] = 4;
$output .= '<form id="search_incident_form" method="post" action="index.php?sec=incidents&sec2=operation/incidents/incident_search">';
$output .= print_table($table, true);
$output .= '</form>';
echo "<div class= 'dialog ui-dialog-content' id='search_inventory_window'></div>";
if ($return) {
return $output;
}
echo $output;
}
开发者ID:keunes,项目名称:integriaims,代码行数:101,代码来源:functions_form.php
示例18: unserialize
$route = unserialize($var["plotted_course"]);
$full = implode(' - ', $route);
// throw start sector away
// it's useless for the route
array_shift($route);
// now get the sector we are going to but don't remove it (sector_move_processing does it)
$next_sector = $route[0];
if ($next_sector == $sector->link_up || $next_sector == $sector->link_down || $next_sector == $sector->link_left || $next_sector == $sector->link_right || $next_sector == $sector->warp) {
// save this to db (if we still have something
if (!empty($route)) {
$db->query("REPLACE INTO player_plotted_course\n\t\t\t\t\t(account_id, game_id, distance, course)\n\t\t\t\t\tVALUES({$player->account_id}, {$player->game_id}, " . $var["distance"] . ", '" . serialize($route) . "')");
}
//print_form($container);
if ($player->land_on_planet == "FALSE") {
$container = array();
$container["url"] = "sector_move_processing.php";
$container["target_page"] = "current_sector.php";
$container["target_sector"] = $next_sector;
print_button($container, "Follow plotted course - " . $next_sector . " (" . $var["distance"] . ")");
if (!empty($ship->hardware[HARDWARE_SCANNER])) {
print " ";
$container = array();
$container["url"] = "skeleton.php";
$container["body"] = "sector_scan.php";
$container["target_sector"] = $next_sector;
print_button($container, "Scan");
}
}
}
echo '</td></tr></table><br><h2>Plotted Course</h2><br>';
echo $full;
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:course_plot_result.php
示例19: mail_get_transport
}
if (!empty($pass)) {
$transport_conf['pass'] = $pass;
}
if (!empty($proto)) {
$transport_conf['proto'] = $proto;
}
}
try {
// If the transport can connect, it will not throw an exception
mail_get_transport($transport_conf);
// Success
echo json_encode(array('result' => true, 'message' => __('Success')));
return;
} catch (Exception $e) {
// Failure
echo json_encode(array('result' => false, 'message' => $e->getMessage()));
return;
}
}
if ($change_template_alert) {
echo "<div style='float: left;'><img style='padding:10px;' src='images/icon_delete.png' alt='" . __('Delete') . "'></div>";
echo "<div style='float: left; font-size:15px; font-weight: bold; margin-top:32px;'><b>" . __('Are you sure you want to change action?') . "</b></br>";
echo "<span style='font-size:13px; font-weight: normal; line-height: 1.5em;'>" . __('Remove template contents') . "</span></div>";
echo '<form id="change_template_form" method="post">';
echo print_submit_button(__('Delete'), "delete_btn", false, 'class="sub close" width="160px;"', true);
echo print_button(__('Cancel'), 'modal_cancel', false, '', '', false);
echo '</form>';
return;
}
exit;
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:mail.php
示例20: check_login
// GNU General Public License for more details.
global $config;
check_login();
if (give_acl($config["id_user"], 0, "FM") == 0) {
audit_db($config["id_user"], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access log viewer");
require "general/noaccess.php";
exit;
}
$file_name = $config["homedir"] . "/integria.log";
$delete = get_parameter("delete", 0);
if ($delete == 1) {
if (file_exists($file_name)) {
unlink($file_name);
}
}
echo "<h1>" . __("Error log") . "</h1>";
if (!file_exists($file_name)) {
echo "<div class='under_tabs_info'>" . __("Cannot find file") . "(" . $file_name . ")</div>";
} else {
$filesize = filesize($file_name);
$offset = ceil($filesize / 4 * 3);
// read only from the 3/4 part of file
$data = file_get_contents($file_name, NULL, NULL, $offset);
echo "<div class='under_tabs_info'>{$file_name} " . __("Reading from byte") . " " . $offset . "</div><br>";
echo "<div style='width: 99%; text-align: right;'>";
print_button(__("Delete logfile"), '', false, 'window.open(\'index.php?sec=godmode&sec2=godmode/setup/logviewer&delete=1\')', 'class="sub delete"');
echo "</div>";
echo "</br><textarea style='width: 99%; height: 500px;' name='{$file_name}'>";
echo $data;
echo "</textarea><br><br>";
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:logvie |
请发表评论