コード例 #1
0
ファイル: agenda.php プロジェクト: articaST/integriaims
if (!$filter_btn) {
    $show_events = 1;
    $show_wo = 1;
}

$table = new StdClass();
$table->width = '100%';
$table->class = "search-table";
$table->data = array ();
$table->colspan = array ();

$table->data[0][0] = print_checkbox ('show_events', 1, $show_events, true, __('Show entries'));
$table->data[0][1] = print_checkbox ('show_wu', 1, $show_wu, true, __('Show Workunits'));
$table->data[0][2] = print_checkbox ('show_projects', 1, $show_projects, true, __('Show projects'));
$table->data[0][3] = print_checkbox ('show_tasks', 1, $show_tasks, true, __('Show tasks'));
$table->data[0][4] = print_checkbox ('show_clients', 1, $show_clients, true, __('Show customers'));

$button = print_submit_button (__('Filter'), "filter_btn", false, 'class="sub search"', true);
         
$table->data[0][5] = $button;
    
print_table ($table);
echo '</form>'; 

echo "<div id='calendar'></div>";

echo "<table class='calendar_legend'>";
echo "<tr>";
echo "<td class='legend_color_box legend_project'></td>";
echo "<td>".__("Projects")."</td>";
echo "<td class='legend_color_box legend_task'></td>";
コード例 #2
0
ファイル: setup.php プロジェクト: articaST/integriaims
$table->data[1][1] = print_input_text("timezone", $config["timezone"], '', 15, 30, true, __('Timezone for integria'));
$table->data[2][0] = print_textarea("api_acl", 2, 1, $config["api_acl"], 'style="max-width: 280px;"', true, __('List of IP with access to API') . print_help_tip(__("List of IP (separated with commas which can access to the integria API. Use * for any address (INSECURE!)"), true), false);
$table->data[2][1] = print_input_password("api_password", $config["api_password"], '', 30, 255, true, __('API password'));
$days_of_week = get_days_of_week();
$table->data[4][0] = print_select($days_of_week, "first_day_week", $config["first_day_week"], '', '', '', true, 0, false, __('First day of the week'));
$table->data[4][1] = print_input_text("url_updatemanager", $config["url_updatemanager"], '', 35, 255, true, __('URL update manager'));
$table->data[5][0] = print_input_text("loginhash_pwd", $config["loginhash_pwd"], '', 30, 255, true, __('Loginhash password'));
$table->data[5][1] = print_checkbox("access_protocol", 1, $config["access_protocol"], true, __('Enable HTTPS access'));
$table->data[6][0] = print_input_text("access_port", $config["access_port"], '', 10, 255, true, __('Access port') . print_help_tip(__("Leave blank to use default port (80)"), true));
$table->data[6][1] = print_input_text("access_public", $config["access_public"], '', 30, 50, true, __('Public access to server') . print_help_tip(__("Public IP or name for the server, for example (23.45.67.3 or mydomain.com)"), true));
$csv_standard_encoding = !isset($config['csv_standard_encoding']) ? false : (bool) $config['csv_standard_encoding'];
$table->data[7][0] = print_label(__('CSV encoding type'), '', '', true);
$table->data[7][0] .= __('Excel') . '&nbsp;' . print_radio_button('csv_standard_encoding', 0, '', $csv_standard_encoding, true);
$table->data[7][0] .= print_help_tip(__("The Excel type may not be compatible with other applications"), true);
$table->data[7][0] .= '&nbsp;&nbsp;' . __('Other') . '&nbsp;' . print_radio_button('csv_standard_encoding', 1, '', $csv_standard_encoding, true);
$table->data[7][1] = print_checkbox("enable_update_manager", 1, $config["enable_update_manager"], true, __('Enable update manager updates'));
$table->data[8][0] = print_input_text("max_direct_download", $config["max_direct_download"], '', 10, 255, true, __('Maximum direct download size (MB)'));
$table->data[8][1] = print_input_text("max_file_size", $config["max_file_size"], '', 10, 255, true, __('Max. Upload file size'));
echo "<form name='setup' method='post'>";
print_table($table);
echo "<div class='button-form'>";
print_input_hidden('update', 1);
print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"');
echo "</div>";
echo '</form>';
?>

<script type="text/javascript" src="include/js/integria.js"></script>

<script type="text/javascript">
$(document).ready (function () {
コード例 #3
0
ファイル: lib.php プロジェクト: nadavkav/MoodleTAO
/** 
 * Called by course/reset.php and shows the formdata by coursereset.
 * it prints checkboxes for each feedback available at the given course
 * there are two checkboxes: 1) delete userdata and keep the feedback 2) delete userdata and drop the feedback
 * @param object $course
 * @return void
 */
function feedback_reset_course_form($course)
{
    echo get_string('resetting_feedbacks', 'feedback');
    echo ':<br />';
    if (!($feedbacks = get_records('feedback', 'course', $course->id, 'name'))) {
        return;
    }
    foreach ($feedbacks as $feedback) {
        echo '<p>';
        echo get_string('name', 'feedback') . ': ' . $feedback->name . '<br />';
        print_checkbox(FEEDBACK_RESETFORM_RESET . $feedback->id, 1, true, get_string('resetting_data', 'feedback'), '', '');
        echo '<br />';
        print_checkbox(FEEDBACK_RESETFORM_DROP . $feedback->id, 1, false, get_string('drop_feedback', 'feedback'), '', '');
        echo '</p>';
    }
}
コード例 #4
0
ファイル: lib.php プロジェクト: nagyistoce/moodle-Teach-Pilot
/**
* Implementation of the function for printing the form elements that control
* whether the course reset functionality affects the chat.
* @param $mform form passed by reference
*/
function voicepresentation_reset_course_form($course)
{
    $currentProduct = "voicepresentation";
    $activities = get_record("voicepresentation", "course", $course->id);
    if ($activities) {
        if ($currentProduct != "voicepodcaster") {
            print_checkbox('reset_content_voicepresentation_replies', 1, false, get_string("voicepresentation_reset_only_replies", 'voicepresentation'), '', "if (this.checked) {document.getElementsByName('reset_content_voicepresentation')[0].disabled = 'true'} else {document.getElementsByName('reset_content_voicepresentation')[0].disabled=''}");
            echo '<br />';
        }
        print_checkbox('reset_content_voicepresentation', 1, false, get_string("voicepresentation_reset_all", 'voicepresentation'), '', "if (this.checked ) {document.getElementsByName('reset_content_voicepresentation_replies')[0].disabled = 'true'} else {document.getElementsByName('reset_content_voicepresentation_replies')[0].disabled=''}");
        echo '<br />';
    } else {
        echo "There is not Voice Presentation in this course";
    }
}
コード例 #5
0
     $min_stock = $object["min_stock"];
     $show_in_list = $object["show_in_list"];
 }
 /*if ($id == -1) {
 		echo "<h3>".__('Create a new object')."</h3>";
 	} else {
 		echo "<h3>".__('Update existing object')."</h3>";
 	}*/
 $table->width = '99%';
 $table->class = 'search-table-button';
 $table->colspan = array();
 $table->colspan[3][0] = 2;
 $table->data = array();
 $table->data[0][0] = print_input_text('name', $name, '', 45, 100, true, __('Name'));
 $table->data[0][1] = '<label>' . __('Show in tree view') . print_help_tip(__('If this value is checked this object type will appear as a root inside inventory\'s tree view.'), true) . '</label>';
 $table->data[0][1] .= print_checkbox('show_in_list', 1, $show_in_list, __('Show in tree view'));
 $files = list_files('images/objects/', "png", 1, 0);
 $table->data[1][0] = print_select($files, 'icon', $icon, '', __('None'), "", true, false, false, __('Icon'));
 $table->data[1][0] .= objects_get_icon($id, true);
 $table->data[1][1] = print_input_text('min_stock', $min_stock, '', 45, 100, true, __('Min. stock'));
 $table->data[2][0] = print_textarea('description', 10, 50, $description, '', true, __('Description'));
 $table->colspan[2][0] = 2;
 if ($id == -1) {
     $button = print_submit_button(__('Create'), 'crt_btn', false, 'class="sub next"', true);
     $button .= print_input_hidden('insert_object', 1, true);
 } else {
     $button = print_submit_button(__('Update'), 'upd_btn', false, 'class="sub upd"', true);
     $button .= print_input_hidden('id', $id, true);
     $button .= print_input_hidden('update_object', 1, true);
 }
 $table->data[3][0] = $button;
コード例 #6
0
// Various checkboxes
$table->data[3][0] = print_checkbox ('have_cost', 1, $have_cost, true,
	__('Have cost'));
$table->data[3][1] = print_checkbox ('public', 1, $public, true, __('Public'));

if (! $id_workunit) {
	$table->data[4][0] = print_checkbox ('forward', 1, 
		false, true, __('Forward') . print_help_tip (__('If this checkbox is activated, propagation will be forward'), true));
	
	$table->data[4][1] = print_checkbox ('split', 1, false, true, 
		__('Backward')  . print_help_tip (__('If this checkbox is activated, propagation will be backward'),
		true));
}

$table->data[5][0] = print_checkbox ('work_home', 1, $work_home, true, __('Work from home'));

$table->data[6][0] = print_textarea ('description', 10, 30, $description,
	'', true, __('Description'));

echo '<form id="single_task_form" method="post" onsubmit="return validate_single_form()">';
print_table ($table);

$button = '';
echo '<div style="width:100%;">';
	unset($table->data);
	$table->width = '100%';
	$table->class = "button-form";
	if ($id_workunit) {
		$button = print_input_hidden ('operation', 'update', true);
		$button .= print_input_hidden ('id_workunit', $id_workunit, true);
コード例 #7
0
if ($editor) {
    $table_advanced->data[0][0] = print_label(__('Editor'), '', '', true, $editor);
} else {
    $table_advanced->data[0][0] = "&nbsp;";
}
if ($has_im && $create_incident) {
    $groups = get_user_groups($config['id_user'], "IW");
    $table_advanced->data[0][1] = print_select($groups, "id_group_creator", $id_grupo_incident, '', '', 0, true, false, false, __('Creator group'), $blocked_incident);
} elseif ($create_incident) {
    $table_advanced->data[0][1] = print_label(__('Creator group'), '', '', true, dame_nombre_grupo($id_grupo_incident));
} elseif ($id_group_creator) {
    $table_advanced->data[0][1] = print_label(__('Creator group'), '', '', true, dame_nombre_grupo($id_group_creator));
}
if ($has_im) {
    $table_advanced->data[0][2] = print_checkbox_extended('sla_disabled', 1, $sla_disabled, $blocked_incident, '', '', true, __('SLA disabled'));
    $table_advanced->data[1][0] = print_checkbox("email_notify_form", 1, $email_notify, true, __('Notify changes by email '), $blocked_incident);
} else {
    $table_advanced->data[0][2] = print_input_hidden('sla_disabled', 0, true);
    $table_advanced->data[1][0] = print_input_hidden('email_notify', 1, true);
}
$parent_name = $id_parent ? __('Ticket') . ' #' . $id_parent : __('None');
if ($has_im) {
    $table_advanced->data[3][0] = print_input_text('search_parent', $parent_name, '', 10, 100, true, __('Parent ticket'), $blocked_incident);
    $table_advanced->data[3][0] .= print_input_hidden('id_parent', $id_parent, true);
    if (!$blocked_incident) {
        $table_advanced->data[3][0] .= print_image("images/cross.png", true, array("onclick" => "clean_parent_field()", "style" => "cursor: pointer"));
    }
}
// Show link to go parent incident
if ($id_parent) {
    $table_advanced->data[3][0] .= '&nbsp;<a target="_blank" href="index.php?sec=incidents&sec2=operation/incidents/incident_dashboard_detail&id=' . $id_parent . '"><img src="images/go.png" /></a>';
コード例 #8
0
function user_search_result($filter, $ajax, $size_page, $offset, $clickin, $search_text, $disabled_user, $level, $group, $from_tickets = false)
{
    global $config;
    if ($filter != 0) {
        $offset = $filter['offset'];
        $search_text = $filter['search_text'];
        $disabled_user = $filter['disabled_user'];
        $level = $filter['level'];
        $group = $filter['group'];
    }
    $search = "WHERE 1=1 ";
    if ($search_text != "") {
        $search .= " AND (id_usuario LIKE '%{$search_text}%' OR comentarios LIKE '%{$search_text}%' OR nombre_real LIKE '%{$search_text}%' OR direccion LIKE '%{$search_text}%')";
    }
    if ($disabled_user > -1) {
        $search .= " AND disabled = {$disabled_user}";
    }
    if ($level > -10) {
        $search .= " AND nivel = {$level}";
    }
    if ($group == -1) {
        $search .= " AND tusuario.id_usuario NOT IN (select id_usuario from tusuario_perfil)";
    } else {
        if ($group > 0) {
            $search .= " AND tusuario.id_usuario = ANY (SELECT id_usuario FROM tusuario_perfil WHERE id_grupo = {$group})";
        }
    }
    $query1 = "SELECT * FROM tusuario {$search} ORDER BY id_usuario";
    if ($from_tickets) {
        $query1 = users_get_allowed_users_query($config['id_user'], $filter);
    }
    $count = get_db_sql("SELECT COUNT(id_usuario) FROM tusuario {$search} ");
    $sql1 = "{$query1} LIMIT {$offset}, " . $size_page;
    echo "<div class='divresult'>";
    pagination($count, "index.php?sec=users&sec2=godmode/usuarios/lista_usuarios&search_text=" . $search_text . "&disabled_user="******"&level=" . $level . "&group=" . $group, $offset, true);
    $resq1 = process_sql($sql1);
    if (!$resq1) {
        echo ui_print_error_message(__("No users"), '', true, 'h3', true);
    } else {
        echo '<table width="100%" class="listing">';
        if ($filter == 0) {
            echo '<th>' . print_checkbox('all_user_checkbox', 1, false, true);
            echo '<th title="' . __('Enabled/Disabled') . '">' . __('E/D');
            echo '<th title="' . __('Enabled login') . '">' . __('Enabled login');
        }
        echo '<th>' . __('User ID');
        echo '<th>' . __('Name');
        echo '<th>' . __('Company');
        echo '<th>' . __('Last contact');
        echo '<th>' . __('Profile');
        if ($filter == 0) {
            echo '<th>' . __('Delete');
        }
        // Init vars
        $nombre = "";
        $nivel = "";
        $comentarios = "";
        $fecha_registro = "";
        if ($resq1) {
            foreach ($resq1 as $rowdup) {
                $nombre = $rowdup["id_usuario"];
                $nivel = $rowdup["nivel"];
                $realname = $rowdup["nombre_real"];
                $fecha_registro = $rowdup["fecha_registro"];
                $avatar = $rowdup["avatar"];
                if ($rowdup["nivel"] == 0) {
                    $nivel = "<img src='images/group.png' title='" . __("Grouped user") . "'>";
                } elseif ($rowdup["nivel"] == 1) {
                    $nivel = "<img src='images/integria_mini_logo.png' title='" . __("Administrator") . "'>";
                } else {
                    $nivel = "<img src='images/user_gray.png' title='" . __("Standalone user") . "'>";
                }
                $disabled = $rowdup["disabled"];
                $id_company = $rowdup["id_company"];
                $enabled_login = $rowdup["enable_login"];
                echo "<tr>";
                if ($filter == 0) {
                    echo "<td>";
                    echo print_checkbox_extended("user-" . $rowdup["id_usuario"], $rowdup["id_usuario"], false, false, "", "class='user_checkbox'", true);
                    echo "<td>";
                    if ($disabled == 1) {
                        echo "<img src='images/lightbulb_off.png' title='" . __("Disabled") . "'> ";
                    }
                    echo "<td>";
                    if ($enabled_login == 1) {
                        echo "<img src='images/accept.png' title='" . __("Enabled login") . "'> ";
                    } else {
                        echo "<img src='images/fail.png' title='" . __("Disabled login") . "'> ";
                    }
                }
                echo "<td>";
                if ($filter == 0) {
                    echo "<a href='index.php?sec=users&sec2=godmode/usuarios/configurar_usuarios&update_user="******"'>" . ucfirst($nombre) . "</a>";
                } else {
                    $url = "javascript:loadContactUser(\"" . $nombre . "\",\"" . $clickin . "\");";
                    echo "<a href='" . $url . "'>" . ucfirst($nombre) . "</a>";
                }
                echo "<td style=''>" . $realname;
                $company_name = (string) get_db_value('name', 'tcompany', 'id', $id_company);
                echo "<td>" . $company_name . "</td>";
                echo "<td style=''>" . human_time_comparation($fecha_registro);
                echo "<td>";
                print_user_avatar($nombre, true);
                echo "&nbsp;";
                if ($config["enteprise"] == 1) {
                    $sql1 = 'SELECT * FROM tusuario_perfil WHERE id_usuario = "' . $nombre . '"';
                    $result = mysql_query($sql1);
                    echo "<a href='#' class='tip'>&nbsp;<span>";
                    if (mysql_num_rows($result)) {
                        while ($row = mysql_fetch_array($result)) {
                            echo dame_perfil($row["id_perfil"]) . "/ ";
                            echo dame_grupo($row["id_grupo"]) . "<br>";
                        }
                    } else {
                        echo __('This user doesn\'t have any assigned profile/group');
                    }
                    echo "</span></a>";
                }
                echo $nivel;
                if ($filter == 0) {
                    echo '<td align="center">';
                    echo '<a href="index.php?sec=users&sec2=godmode/usuarios/lista_usuarios&borrar_usuario=' . $nombre . '" onClick="if (!confirm(\'' . __('Are you sure?') . '\')) return false;"><img src="images/cross.png"></a>';
                    echo '</td>';
                }
            }
        }
        echo "</table>";
    }
    echo "</div>";
}
コード例 #9
0
ファイル: errorwus.php プロジェクト: aggroskater/boinc
}
$cache_data = get_cached_data($cache_sec, $cache_args);
if ($cache_data && !$refresh_cache) {
    $cache_data = unserialize($cache_data);
    $last_update = $cache_data['last_update'];
    $row_array = $cache_data['row_array'];
} else {
    $row_array = get_error_wus();
    $last_update = time();
    $cache_data = array('last_update' => $last_update, 'row_array' => $row_array);
    set_cached_data($cache_sec, serialize($cache_data), $cache_args);
}
echo "<br/>";
echo "<form method=\"get\" action=\"errorwus.php\">\n";
print_checkbox("Hide canceled WUs", "hide_canceled", $hide_canceled);
print_checkbox("Hide WUs with only d/l errors", "hide_dlerr", $hide_dlerr);
if ($appid) {
    echo "<input type=\"hidden\" name=\"appid\" value=\"{$appid}\"/>";
}
echo "<input type=\"hidden\" name=\"level\" value=\"{$notification_level}\"/>";
echo "<input class=\"btn btn-default\" type=\"submit\" value=\"OK\">\n";
echo "</form>\n";
echo "Page last updated " . time_str($last_update);
if (!in_rops()) {
    echo "<form action=\"cancel_workunits_action.php\" method=\"post\">\n";
    echo "<input type=\"hidden\" name=\"back\" value=\"errorwus\"/>";
}
echo "<br/><table border=\"1\">\n";
echo "<tr><th>WU ID</th><th>WU name</th><th>App ID</th><th>Quorum</th><th>Unsent</th><th>In Progress</th><th>Success</th>";
echo "<th>Download Errors</th><th>Compute Errors</th><th>Validate Errors</th><th>Error mask</th></tr>\n";
$hidden = 0;
コード例 #10
0
 $table->width = '99%';
 $table->colspan = array();
 $table->colspan[4][0] = 2;
 $table->data = array();
 if ($new_contract || $id && ($write_permission || $manage_permission)) {
     $table->class = 'search-table-button';
     $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][0] = print_company_autocomplete_input($params);
     $table->data[0][1] = print_input_text('name', $name, '', 40, 100, true, __('Contract name'));
     $table->data[1][0] = print_input_text('contract_number', $contract_number, '', 40, 100, true, __('Contract number'));
     $table->data[1][1] = print_checkbox('private', '1', $private, true, __('Private')) . print_help_tip(__("Private contracts are visible only by users of the same company"), true);
     $table->data[2][0] = print_input_text('date_begin', $date_begin, '', 15, 20, true, __('Begin date'));
     $table->data[2][1] = print_input_text('date_end', $date_end, '', 15, 20, true, __('End date'));
     if ($id_company) {
         $table->data[3][0] .= "&nbsp;&nbsp;<a href='index.php?sec=customers&sec2=operation/companies/company_detail&id={$id_company}'>";
         $table->data[3][0] .= "<img src='images/company.png'></a>";
     }
     $table->data[3][1] = print_select(get_contract_status(), 'status', $status, '', '', '', true, 0, false, __('Status'));
     $table->data[4][0] = print_textarea("description", 14, 1, $description, '', true, __('Description'));
     // Optional file update
     $html = "";
     $html .= "<div id=\"contract_files\" class=\"fileupload_form\" method=\"post\" enctype=\"multipart/form-data\">";
     $html .= "<div id=\"drop_file\" style=\"padding:0px 0px;\">";
     $html .= "<table width=\"99%\">";
     $html .= "<td width=\"45%\">";
     $html .= __('Drop the file here');
コード例 #11
0
ファイル: setup_visual.php プロジェクト: articaST/integriaims
function get_font_files()
{
    global $config;
    $base_dir = $config['homedir'] . '/include/fonts';
    $files = list_files($base_dir, ".ttf", 1, 0);
    $retval = array();
    foreach ($files as $file) {
        $retval[$config['homedir'] . 'include/fonts/' . $file] = $file;
    }
    return $retval;
}
$fontlist = get_font_files();
$flash_options = array();
$flash_options[0] = "Disabled";
$flash_options[1] = "Enabled";
$table->data[0][1] = print_checkbox('flash_charts', $flash_options, $config["flash_charts"], true, __('Enable flash charts'));
$table->data[1][1] = print_select($fontlist, 'pdffont', $config["pdffont"], '', '', '', true, 0, true, __('Font for PDF'));
$table->data[2][1] = print_select($fontlist, 'font', $config["font"], '', '', '', true, 0, true, __('Font for graphs'));
$table->data[3][1] = print_input_text("fontsize", $config["fontsize"], '', 3, 5, true, __('Graphics font size'));
$button = print_input_hidden('update', 1, true);
$button .= print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"', true);
echo "<form name='setup' method='post'>";
print_table($table);
echo "<div class='button-form'>";
echo $button;
echo "</div>";
echo '</form>';
?>

<script type="text/javascript">
$(document).ready (function () {
コード例 #12
0
 function reduce_athelete($in, $athelete)
 {
     global $COURSE, $CFG;
     // If the teacher has set grade to pass, we need to test
     // this user's final grade with it
     $user_grade = get_record('grade_grades', 'itemid', $this->courseitem->id, 'userid', $athelete->moodleid);
     $class = passing_grade($this->courseitem, $user_grade);
     $label = '<a class="' . $class . '" href="' . $CFG->wwwroot . '/grade/report/user/index.php?id=' . $COURSE->id . '&amp;userid=' . $athelete->moodleid . '">' . fullname($athelete) . ' <span class="athlete_grade">' . simple_grade_format_gradevalue($user_grade->finalgrade, $this->courseitem, true) . '</span></a>';
     $inter = empty($in) ? '' : $in;
     return $inter . '<div class="block_athelete_reporting_row">' . print_checkbox('user_' . $athelete->id, 1, false, $label, '', '', true) . '</div>';
 }
コード例 #13
0
ファイル: lib.php プロジェクト: nagyistoce/moodle-Teach-Pilot
/**
 * For version < 1.9
* Implementation of the function for printing the form elements that control
* whether the course reset functionality affects the chat.
* @param $mform form passed by reference
*/
function voiceauthoring_reset_course_form($course)
{
    $activities = get_record("voiceauthoring", "course", $course->id);
    if ($activities) {
        print_checkbox('reset_content_voiceauthoring', 1, false, "Delete all messages", '', "");
        echo '<br />';
    } else {
        echo "There is not Voice Authoring in this course";
    }
}
コード例 #14
0
ファイル: wo_workunits.php プロジェクト: dsyman2/integriaims
$table->colspan[1][0] = 6;
$table->colspan[2][0] = 6;
$table->data = array();
$table->size = array();
$table->style = array();
$table->style[0] = 'vertical-align: top; padding-top: 20px;';
$table->style[1] = 'vertical-align: top; padding-top: 20px;';
$table->style[2] = 'vertical-align: top;';
$table->style[3] = 'vertical-align: top;';
$table->style[4] = 'vertical-align: top;';
$table->style[5] = 'vertical-align: top;';
$table->data[0][0] = print_image('images/calendar_orange.png', true) . '&nbsp' . print_mysql_timestamp(0, "Y-m-d");
$table->data[0][1] = print_image('images/clock_orange.png', true) . '&nbsp' . print_mysql_timestamp(0, "H:i:s");
//$table->data[0][2] = combo_roles (1, 'id_profile', __('Profile'), true);
$table->data[0][2] = print_select($roles, 'id_profile', '', '', '', '', true, false, true, __('Profile'));
$table->data[0][3] = print_input_text("duration", $config["pwu_defaultime"], '', 7, 10, true, __('Time used'));
$table->data[0][4] = print_checkbox('have_cost', 1, false, true, __('Have cost'));
$table->data[0][5] = print_checkbox('public', 1, true, true, __('Public'));
$table->data[1][0] = print_textarea('nota', 10, 70, '', "style='resize:none;'", true, __('Description'));
$button = '<div style="width: 100%; text-align: right; padding-bottom: 20px;">';
$button .= '<span id="sending_data" style="display: none;">' . __('Sending data...') . '<img src="images/spinner.gif" /></span>';
$button .= print_submit_button(__('Add'), 'addnote', false, 'class="sub create"', true);
$button .= print_input_hidden('insert_workunit', 1, true);
$button .= print_input_hidden('id', $id_workorder, true);
$button .= '</div>';
$table->data[2][0] = $button;
echo '<form id="form-add-workunit" method="post" action="index.php?sec=projects&sec2=operation/workorders/wo&operation=view&tab=wu&id=' . $id_workorder . '&tab=wu">';
echo "<div style='width: 98%; padding-left: 7px;'>";
print_table($table);
echo "</div>";
echo "</form>";
コード例 #15
0
	$table_advanced->data[0][0] = print_label (__('Editor'), '', '', true, $editor);
} else {
	$table_advanced->data[0][0] = "&nbsp;";
}

if ($has_im && $create_incident){
    $groups = get_user_groups ($config['id_user'], "IW");
	$table_advanced->data[0][1] = print_select ($groups, "id_group_creator", $id_grupo_incident, '', '', 0, true, false, false, __('Creator group'), $blocked_incident);
} elseif ($create_incident) {
	$table_advanced->data[0][1] = print_label (__('Creator group'), '', '', true, dame_nombre_grupo ($id_grupo_incident));
} elseif ($id_group_creator) {
	$table_advanced->data[0][1] = print_label (__('Creator group'), '', '', true, dame_nombre_grupo ($id_group_creator));
}

if ($has_im || give_acl ($config['id_user'], $id_grupo, "SI")){
	$table_advanced->data[0][2] = print_checkbox ('sla_disabled', 1, $sla_disabled,	true, __('SLA disabled'), $blocked_incident);

} else {
	$table_advanced->data[0][2] = print_input_hidden ('sla_disabled', 0, true);
}

$parent_name = $id_parent ? (__('Ticket').' #'.$id_parent) : __('None');

if ($has_im || give_acl ($config['id_user'], $id_grupo, "SI")) {
	
	$table_advanced->data[3][0] = print_input_text ('search_parent', $parent_name, '', 10, 100, true, __('Parent ticket'), $blocked_incident);
	$table_advanced->data[3][0] .= print_input_hidden ('id_parent', $id_parent, true);

	if (!$blocked_incident) {
		$table_advanced->data[3][0] .= "&nbsp;&nbsp;<a href='javascript: parent_search_form(\"\", $id)'>" . print_image('images/add.png', true, array('title' => __('Add'))) . "</a>";
		$table_advanced->data[3][0] .= print_image("images/cross.png", true, array("onclick" => "clean_parent_field()", "style" => "cursor: pointer"));
コード例 #16
0
ファイル: profile.php プロジェクト: rasomu/chuza
function show_profile() {
	global $user, $admin_mode, $user_levels, $globals, $site_key, $current_user, $db;

	echo '<div class="genericform" style="margin: 0 50px">';
	echo '<form  enctype="multipart/form-data" action="'.get_auth_link().'profile.php" method="post" id="thisform" AUTOCOMPLETE="off">';
	echo '<fieldset><legend>';
	echo '<span class="sign">'._('opciones de usuario') . " <a href='".get_user_uri($user->username)."'>$user->username</a>: $user->level</span></legend>";

	echo '<img class="thumbnail" src="'.get_avatar_url($user->id, $user->avatar, 80).'" width="80" height="80" alt="'.$user->username.'" />';
	echo '<input type="hidden" name="process" value="1" />';
	echo '<input type="hidden" name="user_id" value="'.$user->id.'" />';
	echo '<input type="hidden" name="form_hash" value="'. md5($site_key.$user->id.mnminclude) .'" />';
	get_form_auth_ip();
	if ($admin_mode)
		echo '<input type="hidden" name="login" value="'.$user->username.'" />';

	echo '<p><label>'._('usuario').':</label><br/>';
	echo '<input type="text" autocomplete="off" name="username" id="username" value="'.$user->username.'" onkeyup="enablebutton(this.form.checkbutton1, null, this)" />';
	echo '&nbsp;&nbsp;<span id="checkit"><input type="button" class="button" id="checkbutton1" disabled="disabled" value="'._('verificar').'" onclick="checkfield(\'username\', this.form, this.form.username)"/></span>';
	echo '&nbsp;<span id="usernamecheckitvalue"></span>' . "\n";
	echo '</p>';

	echo '<p><label>'._('nombre real').':</label><br/>';
	echo '<input type="text" autocomplete="off" name="names" id="names" value="'.$user->names.'" />';
	echo '</p>';

	echo '<p><label>'._('correo electrónico').':</label><br/>';
	echo '<input type="text" autocomplete="off" name="email" id="email" value="'.$user->email.'" onkeyup="enablebutton(this.form.checkbutton2, null, this)"/>';
	echo '&nbsp;&nbsp;<input type="button" class="button" id="checkbutton2" disabled="disabled" value="'._('verificar').'" onclick="checkfield(\'email\', this.form, this.form.email)"/>';
	echo '&nbsp;<span id="emailcheckitvalue"></span>';
	echo '</p>';

    echo '<p style="padding-bottom:10px;"><label>'._('norma ortográfica').':</label><br/>';
    echo '<select name="standard" >';
    foreach ($globals['standards'] as &$val) {
        $selected = "";
        if ($user->standard == $val['id']) $selected = 'selected="selected"';
        echo '<option value="'.$val['id'].'" '.$selected.' >&nbsp;'.$val['name'].'&nbsp;</option>'; 
    }
    echo '</select><br/>';
	echo '</p>';

	echo '<p><label>'._('página web').':</label><br/>';
	echo '<input type="text" autocomplete="off" name="url" id="url" value="'.$user->url.'" />';
	echo '</p>';

	echo '<p><label>'._('mensajero instantáneo público, invisible para los demás').':</label><br/>';
	echo '<span class="note">' . _('necesario si te conectarás vía Jabber/Google Talk') . '</span><br/>';
	echo '<input type="text" autocomplete="off" name="public_info" id="public_info" value="'.$user->public_info.'" />';
	echo '</p>';

	if ($user->id  == $current_user->user_id) {
		echo '<p><label>'._('teléfono móvil').':</label><br/>';
		echo '<span class="note">' . _('sólo necesario si enviarás notas al nótame vía SMS') . '</span><br/>';
		echo '<span class="note">' . _('pon el número completo, con código de país: +34123456789') . '</span><br/>';
		echo '<input type="text" autocomplete="off" name="phone" id="phone" value="'.$user->phone.'" />';
		echo '</p>';
	}



	if ($globals['external_user_ads']) {
		echo '<p><label for="adcode">'._('codigo AdSense').':</label><br/>';
		echo '<span class="note">' . _('tu código de usuario de AdSense, del tipo pub-123456789') . '</span><br/>';
		echo '<input type="text" autocomplete="off" name="adcode" id="adcode" maxlength="20" value="'.$user->adcode.'" /><br />';
		echo '<span class="note">' . _('canal AdSense (opcional), del tipo 1234567890') . '</span><br/>';
		echo '<input type="text" autocomplete="off" name="adchannel" id="adchannel" maxlength="12" value="'.$user->adchannel.'" />';
		echo '</p>';
	}


	if (is_avatars_enabled()) {
		echo '<input type="hidden" name="MAX_FILE_SIZE" value="400000" />';
		echo '<p><label>'._('avatar').':</label><br/>';
		echo '<span class="note">' . _('imagen cuadrada de no más de 400 KB, sin transparencias') . '</span><br/>';
		echo '<input type="file" class="button" autocomplete="off" name="image" />';
		if ($user->avatar > 0) {
			echo '&nbsp;&nbsp;&nbsp;'._('Eliminar avatar').': <input type="checkbox" name="avatar_delete" value="1"/>';
		}
		echo '</p>';
	}

	echo '<fieldset><legend>'._('opciones de visualización') . '</legend>';
	echo '<p><label>'._('mostrar todos los comentarios').':&nbsp;';
	print_checkbox('comment_pref', $user->comment_pref & 1);
	echo '</label></p>';

	echo '</fieldset>';


	
	echo '<p>'._('introduce la nueva clave para cambiarla -no se cambiará si la dejas en blanco-:').'</p>';

	echo '<p><label for="password">' . _("clave") . ':</label><br />' . "\n";
	echo '<input type="password" autocomplete="off" id="password" name="password" size="25" onkeyup="return securePasswordCheck(this.form.password);"/></p>' . "\n";

	echo '<p><label for="verify">' . _("repite la clave") . ': </label><br />' . "\n";
	echo '<input type="password" autocomplete="off" id="verify" name="password2" size="25" onkeyup="checkEqualFields(this.form.password2, this.form.password)"/></p>' . "\n";

	if ($admin_mode) {
		echo '<p><label for="verify">' . _("estado") . ': </label><br />' . "\n";
		echo '<select name="user_level">';
		foreach ($user_levels as $level) {
			echo '<option value="'.$level.'"';
			if ($user->level == $level) echo ' selected="selected"';
			echo '>'.$level.'</option>';
		}
		echo '</select>';

		echo '<p><label for="karma">'._('karma').':</label><br/>';
		echo '<input type="text" autocomplete="off" name="karma" id="karma" value="'.$user->karma.'" />';
		echo '</p>';

	}
	
	echo '<p><input type="submit" name="save_profile" value="'._('actualizar').'" class="button" /></p>';
	echo '</fieldset>';

	// Disable the account
	if ($user->id  == $current_user->user_id) {
		echo '<br/><fieldset><legend>'._('deshabilitar cuenta') . '</legend>';
		echo '<p>'._('¡atención! la cuenta será deshabilitada.').'</p>';
		echo '<p class="note">'._('se eliminarán automáticamente los datos personales.').'<br/>';
		echo _('las notas serán eliminadas, los envíos y comentarios NO se borrarán.').'</p>';
		echo '<p><label>'._('sí, quiero deshabilitarla').': <input  name="disable" type="checkbox" value="1"/>';
		echo '</label></p>';
		echo '<p><input type="submit" name="disabledme" value="'._('deshabilitar cuenta').'" class="button" /></p>';
		echo '</fieldset>';
	}


	echo "</form></div>\n";
	
}
コード例 #17
0
function mcm_web_print_table($args)
{
    global $mcm;
    extract($args, EXTR_PREFIX_ALL, 'arg');
    /* 
     * required:
     *
     * $arg_action      - {prev,next} order
     * $arg_start       - query start offset
     * $arg_item_status - {accepted,rejected,undefined}
     * $arg_item_type   - user-defined item type
     *
     */
    $limit = 6;
    /* TODO: set this as a config option */
    $table_cols = 3;
    $start = $arg_start;
    $start = $arg_action == 'next' ? $start + $limit : $start;
    $start = $arg_action == 'prev' ? $start - $limit : $start;
    /* determine number of items available */
    $params = array('user_id' => $mcm['user_id'], 'item_status' => $arg_item_status, 'item_type' => $arg_item_type, 'order' => 'artist_name, album_name, item_quality', 'limit' => "{$start}, {$limit}");
    $items_list = mcm_action('lookup_itemlist', $params);
    $num_items = mcm_action('lookup_itemlist_count', $params);
    if ($num_items == 0) {
        mcm_web_nothing_to_review();
        return;
    }
    ?>
<form method="post" action="<?php 
    echo $mcm['self'];
    ?>
">
<table id="list-and-nav" class="center">
    <tr>
        <td id="nav-left" class="nav">
            <?php 
    print_navigation($start, $limit, $num_items, 'left');
    ?>
        </td>
        
        <td>
            <table id="list">
            <input type="hidden" name="start" value="<?php 
    echo $start;
    ?>
">
            <input type="hidden" name="item_status" value="<?php 
    echo $arg_item_status;
    ?>
">
            <input type="hidden" name="item_type" value="<?php 
    echo $arg_item_type;
    ?>
">
<?php 
    $row_number = 0;
    foreach ($items_list as $id => $row) {
        /* load current item status from db into session */
        if (!isset($_SESSION['status'][$id])) {
            $_SESSION['status'][$id] = $arg_item_status;
        }
        $row_number++;
        $album_dirname = "[{$row['artist_name']}] [{$row['album_name']}] [{$row['item_quality']}]";
        $cover_url = mcm_action('create_cover_url', $album_dirname);
        $playlist_url = create_player($album_dirname);
        echo ($row_number - 1) % $table_cols == 0 ? "       <tr>\n" : "";
        ?>
                    <td class="item" id="id<?php 
        echo $id;
        ?>
-item">
                        <div id="id<?php 
        echo $id;
        ?>
-artist" class="artist"><?php 
        echo $row['artist_name'];
        ?>
</div>
                        <div id="id<?php 
        echo $id;
        ?>
-album" class="album"><?php 
        echo $row['album_name'];
        ?>
</div>
                        <div class="cover-container" onmouseover="if (isMouseLeaveOrEnter(event, this)) showOverlay('id<?php 
        echo $id;
        ?>
')" onmouseout="if (isMouseLeaveOrEnter(event, this)) hideOverlay('id<?php 
        echo $id;
        ?>
')">
                            <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');
        ?>
>
                            <a href="#" onmousedown="clickRadio('id<?php 
        echo $id;
        ?>
', 'und'); return false;"><img id="id<?php 
        echo $id;
        ?>
-img-und" src="images/undecided<?php 
        print_button($id, 'undefined');
        ?>
.png" alt="Undecided" title="Undecided"></a>
                            <input type="radio" id="id<?php 
        echo $id;
        ?>
-und" name="id<?php 
        echo $id;
        ?>
" value="undefined"<?php 
        print_checkbox($id, 'undefined');
        ?>
>
                        </div>
                    </td>
<?php 
        echo $row_number % $table_cols == 0 ? "       </tr>\n" : "";
    }
    echo $row_number % $table_cols != 0 ? "     </tr>\n" : "";
    ?>
                </tr>
            </table>
        </td>
    
        <td id="nav-right" class="nav">
            <?php 
    print_navigation($start, $limit, $num_items, 'right');
    ?>
        </td>
    </tr>
</table>

<div id="selected-artist"></div>
<div id="selected-album"></div>

<table id="player-table" class="center">
    <tr>
        <td id="player-cover-container">
            <img id="player-cover" src="images/player-cover.png" alt="Album Cover" width="100" height="100">
        </td>
        <td rowspan="2" id="player-meta">
        <div id="player-artist"></div>
        <div id="player-album"></div>
        <div id="player-title"></div>
        <div id="player-next">
            <span id="player-next-label"></span><span id="player-next-title"></span>
        </div>
        </td>
    </tr>
    <tr>
        <td id="player-controls">
            <a href="#" onmousedown="player.sendEvent('PREV'); return false;"><img src="images/rew.png" alt="Rewind" title="Previous Track"></a>
            <a href="#" onmousedown="player.sendEvent('PLAY'); return false;"><img src="images/play-pause.png" alt="Play/Pause" title="Play/Pause"></a>
            <a href="#" onmousedown="player.sendEvent('NEXT'); return false;"><img src="images/fwd.png" alt="Forward" title="Next Track"></a>
        </td>
    </tr>
</table>

<div id="toolbar">
    <a href="#" onclick="alert('Help not implemented. Yet.'); return false;"><img src="images/help.png" title="Help" alt="Help"></a> | 
    <input type="image" src="images/save-exit.png" name="submit" value="finish" title="Save and Exit"> |
    <input type="image" src="images/exit.png" name="submit" value="exit" title="Exit Without Saving" onclick="return confirm('You will lose all current selections!\n\nAre you sure you want to exit without saving?');">
</div>
<p id="player" style="text-align: center;">Media player requires Adobe Flash Player to be installed. <a href="http://www.adobe.com/go/getflashplayer">Download now</a>.</p>

</form>
<?php 
}
コード例 #18
0
ファイル: wo.php プロジェクト: articaST/integriaims
	$table->data = array ();

	echo '<a href="javascript:;" onclick="$(\'#advanced_div\').slideToggle (); return false">';
	echo __('Advanced search &gt;&gt;');
	echo '</a>';
	echo '<div id="advanced_div" style="padding: 0px; margin: 0px; display: none;">';

	$table->data[0][0] = print_select_from_sql ('SELECT id, name FROM two_category ORDER BY name',
	'id_category', $id_category, '', __("Any"), 0, true, false, false,
	__('Category'));
	
	$table->data[0][1] = print_select_from_sql (get_projects_query($config['id_user']),
	'id_project', $id_project, '', __("Any"), 0, true, false, false,
	__('Project'));

	$table->data[0][2] =  print_checkbox ("need_validation", 1, $need_validation, true, __("Require validation"));
	print_table ($table);
	
	echo "</div>";
	echo '</form>';
	
	if ($owner == $config['id_user'] && $creator == "") {
		$order_by = "ORDER BY created_by_user, priority, last_update DESC";
	} elseif ($creator == $config['id_user'] && $owner == "") {
		$order_by = "ORDER BY assigned_user, priority, last_update DESC";
	} else {
		$order_by = "ORDER BY priority, last_update DESC";
	}
	
	$wos = get_workorders ($where_clause, $order_by);
コード例 #19
0
		<div class="content">

			<a href="#" class="fb_login"><img src="/img/fb_login_button.jpg" alt="Facebook login"></a>

			<span class="or">OR</span>

<?php 
// Email Address
$email = array('name' => 'email', 'id' => 'email', 'mandatory' => TRUE, 'label' => 'Email Address', 'tabindex' => 1);
echo print_input_text($email, $loginOldValues, $loginErrors);
// Password
$password = array('name' => 'password', 'id' => 'password', 'mandatory' => TRUE, 'label' => 'Password', 'tabindex' => 5);
echo print_input_password($password, $loginOldValues, $loginErrors);
// Remeber me
$sendOffer = array('name' => 'remember', 'id' => 'remember', 'mandatory' => FALSE, 'label' => 'Remember me next time', 'value' => 1, 'tabindex' => 10);
echo print_checkbox($sendOffer, $loginOldValues, $loginErrors);
?>

			<div class="field forgot_password">
				<a href="/forgot-password" class="forgot_password">Forgot password?</a>
			</div>

		</div>

		<div class="submit_container">
			<span class="arrow medium_green"><input type="submit" name="login" value="Sign In"></span>
		</div>

		<input type="hidden" name="redirect_after_login" id="redirect_after_login" value="">
	</form>
コード例 #20
0
ファイル: entry.php プロジェクト: dsyman2/integriaims
 }
 echo "<div id='calendar_entry'>";
 if (!empty($id) && !$permission && !$entry['public']) {
     // Doesn't have access to this page
     audit_db($config['id_user'], $config["REMOTE_ADDR"], "ACL Violation", "Trying to view an agenda entry");
     include "general/noaccess.php";
     exit;
 }
 $table->width = '100%';
 $table->class = 'search-table-button';
 $table->colspan = array();
 $table->rowspan = array();
 $table->data = array();
 $table->colspan[0][0] = 2;
 $table->data[0][0] = print_input_text('entry_title', $entry['title'], '', 40, 100, true, __('Title'));
 $table->data[0][2] = print_checkbox('entry_public', $entry['public'], $entry['public'], true, __('Public'));
 if (!$entry['duration']) {
     $entry['duration'] = 0;
 }
 $table->data[1][0] = print_input_text('entry_duration', $entry['duration'], '', 6, 6, true, __('Duration in hours'));
 $alarms = array();
 $alarms[60] = __('One hour');
 $alarms[120] = __('Two hours');
 $alarms[240] = __('Four hours');
 $alarms[1440] = __('One day');
 $table->data[1][1] = print_label(__('Alarm'), 'entry_alarm', 'select', true);
 $table->data[1][1] .= html_print_select($alarms, 'entry_alarm', $entry['alarm'], '', __('None'), 0, true, false, false);
 $table->rowspan[1][2] = 2;
 $table->data[1][2] = html_print_entry_visibility_groups($config['id_user'], $entry['groups'], true);
 if (!$entry['timestamp']) {
     if (!$date) {
コード例 #21
0
ファイル: sla_detail.php プロジェクト: articaST/integriaims
	$table->data[1][3] = print_label(__('Max. ticket inactivity (in hours)'), '', 'text', true);
	$table->data[1][3] .= "<input type='text' name='max_inactivity' id='text-max_inactivity' value='$max_inactivity' size='5' maxlenght='100' onChange='hours_to_dms(\"inactivity\")'>";
	$max_inactivity_time = incidents_hours_to_dayminseg ($max_inactivity);
	$table->data[1][3] .= print_input_text ('max_inactivity_time', $max_inactivity_time, '',
		7, 100, true, '', true);
		

	$table->data[2][0] = print_input_text ('time_from', $time_from, '',
		5, 10, true, __('Start hour to compute SLA'));
	$table->data[2][1] = print_input_text ('time_to', $time_to, '',
		5, 10, true, __('Last hour to compute SLA'));		
		
	$table->data[2][2] = print_checkbox ('five_daysonly', 1 ,$five_daysonly, true, __('Disable SLA on weekends'));

	$table->data[2][3] = print_checkbox ('no_holidays', 1 ,$no_holidays, true, __('Disable SLA on holidays'));



	$table->data[3][0] = print_textarea ("description", 8, 1, $description, '', true, __('Description'));

	
	
	echo '<form id="form-sla_detail" method="post" action="index.php?sec=incidents&sec2=operation/slas/sla_detail">';
	print_table ($table);
		echo '<div style="width:100%;">';
			unset($table->data);
			$table->width = '100%';
			$table->class = "button-form";
			if ($id) {
				$button = print_submit_button (__('Update'), "update_btn", false, 'class="sub upd"', true);
コード例 #22
0
ファイル: locallib.php プロジェクト: JackCanada/moodle-hacks
/**
 * authorize_print_order_details
 *
 * @param int $orderno
 */
function authorize_print_order_details($orderno)
{
    global $CFG, $USER;
    global $strs, $authstrs;
    $cmdcapture = optional_param(ORDER_CAPTURE, '', PARAM_ALPHA);
    $cmddelete = optional_param(ORDER_DELETE, '', PARAM_ALPHA);
    $cmdrefund = optional_param(ORDER_REFUND, '', PARAM_ALPHA);
    $cmdvoid = optional_param(ORDER_VOID, '', PARAM_ALPHA);
    $unenrol = optional_param('unenrol', 0, PARAM_BOOL);
    $confirm = optional_param('confirm', 0, PARAM_BOOL);
    $table = new stdClass();
    $table->width = '100%';
    $table->size = array('30%', '70%');
    $table->align = array('right', 'left');
    $order = get_record('enrol_authorize', 'id', $orderno);
    if (!$order) {
        notice("Order {$orderno} not found.", "index.php");
        return;
    }
    $course = get_record('course', 'id', $order->courseid);
    $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
    if ($USER->id != $order->userid) {
        // Current user viewing someone else's order
        require_capability('enrol/authorize:managepayments', $coursecontext);
    }
    echo "<form action=\"index.php\" method=\"post\">\n";
    echo "<div>";
    echo "<input type=\"hidden\" name=\"order\" value=\"{$orderno}\" />\n";
    echo "<input type=\"hidden\" name=\"sesskey\" value=\"" . sesskey() . "\" />";
    $settled = authorize_settled($order);
    $status = authorize_get_status_action($order);
    $table->data[] = array("<b>{$authstrs->paymentmethod}:</b>", $order->paymentmethod == AN_METHOD_CC ? $authstrs->methodcc : $authstrs->methodecheck);
    $table->data[] = array("<b>{$authstrs->orderid}:</b>", $orderno);
    $table->data[] = array("<b>{$authstrs->transid}:</b>", $order->transid);
    $table->data[] = array("<b>{$authstrs->amount}:</b>", "{$order->currency} {$order->amount}");
    if (empty($cmdcapture) and empty($cmdrefund) and empty($cmdvoid) and empty($cmddelete)) {
        $color = authorize_get_status_color($status->status);
        $table->data[] = array("<b>{$strs->course}:</b>", format_string($course->shortname));
        $table->data[] = array("<b>{$strs->status}:</b>", "<font style='color:{$color}'>" . $authstrs->{$status->status} . "</font>");
        if ($order->paymentmethod == AN_METHOD_CC) {
            $table->data[] = array("<b>{$authstrs->nameoncard}:</b>", $order->ccname);
        } else {
            $table->data[] = array("<b>{$authstrs->echeckfirslasttname}:</b>", $order->ccname);
        }
        $table->data[] = array("<b>{$strs->time}:</b>", userdate($order->timecreated));
        $table->data[] = array("<b>{$authstrs->settlementdate}:</b>", $settled ? userdate($order->settletime) : $authstrs->notsettled);
    }
    $table->data[] = array("&nbsp;", "<hr size='1' />\n");
    if (!empty($cmdcapture) and confirm_sesskey()) {
        // CAPTURE
        if (!in_array(ORDER_CAPTURE, $status->actions)) {
            $a = new stdClass();
            $a->action = $authstrs->capture;
            print_error('youcantdo', 'enrol_authorize', '', $a);
        }
        if (empty($confirm)) {
            $strcaptureyes = get_string('captureyes', 'enrol_authorize');
            $table->data[] = array("<b>{$strs->confirm}:</b>", "{$strcaptureyes} <br />\n            <input type='hidden' name='confirm' value='1' /><input type='submit' name='" . ORDER_CAPTURE . "' value='{$authstrs->capture}' />\n            &nbsp;&nbsp;&nbsp;<a href='index.php?order={$orderno}'>{$strs->no}</a>");
        } else {
            $message = '';
            $extra = NULL;
            if (AN_APPROVED != authorize_action($order, $message, $extra, AN_ACTION_PRIOR_AUTH_CAPTURE)) {
                $table->data[] = array("<b><font color='red'>{$strs->error}:</font></b>", $message);
            } else {
                if (empty($CFG->an_test)) {
                    $user = get_record('user', 'id', $order->userid);
                    if (enrol_into_course($course, $user, 'authorize')) {
                        if (!empty($CFG->enrol_mailstudents)) {
                            send_welcome_messages($order->id);
                        }
                        redirect("index.php?order={$orderno}");
                    } else {
                        $table->data[] = array("<b><font color='red'>{$strs->error}:</font></b>", "Error while trying to enrol " . fullname($user) . " in '" . format_string($course->shortname) . "'");
                    }
                } else {
                    $table->data[] = array(get_string('testmode', 'enrol_authorize'), get_string('testwarning', 'enrol_authorize'));
                }
            }
        }
        print_table($table);
    } elseif (!empty($cmdrefund) and confirm_sesskey()) {
        // REFUND
        if (!in_array(ORDER_REFUND, $status->actions)) {
            $a = new stdClass();
            $a->action = $authstrs->refund;
            print_error('youcantdo', 'enrol_authorize', '', $a);
        }
        $refunded = 0.0;
        $sql = "SELECT SUM(amount) AS refunded FROM {$CFG->prefix}enrol_authorize_refunds " . "WHERE (orderid = '" . $orderno . "') AND (status = '" . AN_STATUS_CREDIT . "')";
        if ($refundval = get_field_sql($sql)) {
            $refunded = floatval($refundval);
        }
        $upto = round($order->amount - $refunded, 2);
        if ($upto <= 0) {
            error("Refunded to original amount.");
        } else {
            $amount = round(optional_param('amount', $upto), 2);
            if ($amount > $upto or empty($confirm)) {
                $a = new stdClass();
                $a->upto = $upto;
                $strcanbecredit = get_string('canbecredit', 'enrol_authorize', $a);
                $strhowmuch = get_string('howmuch', 'enrol_authorize');
                $cbunenrol = print_checkbox('unenrol', '1', !empty($unenrol), '', '', '', true);
                $table->data[] = array("<b>{$authstrs->unenrolstudent}</b>", $cbunenrol);
                $table->data[] = array("<b>{$strhowmuch}</b>", "<input type='hidden' name='confirm' value='1' />\n                     <input type='text' size='5' name='amount' value='{$amount}' />\n                     {$strcanbecredit}<br /><input type='submit' name='" . ORDER_REFUND . "' value='{$authstrs->refund}' />");
            } else {
                $extra = new stdClass();
                $extra->orderid = $orderno;
                $extra->amount = $amount;
                $message = '';
                $success = authorize_action($order, $message, $extra, AN_ACTION_CREDIT);
                if (AN_APPROVED == $success || AN_REVIEW == $success) {
                    if (empty($CFG->an_test)) {
                        if (empty($extra->id)) {
                            $table->data[] = array("<b><font color='red'>{$strs->error}:</font></b>", 'insert record error');
                        } else {
                            if (!empty($unenrol)) {
                                role_unassign(0, $order->userid, 0, $coursecontext->id);
                            }
                            redirect("index.php?order={$orderno}");
                        }
                    } else {
                        $table->data[] = array(get_string('testmode', 'enrol_authorize'), get_string('testwarning', 'enrol_authorize'));
                    }
                } else {
                    $table->data[] = array("<b><font color='red'>{$strs->error}:</font></b>", $message);
                }
            }
        }
        print_table($table);
    } elseif (!empty($cmdvoid) and confirm_sesskey()) {
        // VOID
        $suborderno = optional_param('suborder', 0, PARAM_INT);
        if (empty($suborderno)) {
            // cancel original transaction.
            if (!in_array(ORDER_VOID, $status->actions)) {
                $a = new stdClass();
                $a->action = $authstrs->void;
                print_error('youcantdo', 'enrol_authorize', '', $a);
            }
            if (empty($confirm)) {
                $strvoidyes = get_string('voidyes', 'enrol_authorize');
                $table->data[] = array("<b>{$strs->confirm}:</b>", "{$strvoidyes}<br /><input type='hidden' name='" . ORDER_VOID . "' value='y' />\n                     <input type='hidden' name='confirm' value='1' />\n                     <input type='submit' value='{$authstrs->void}' />\n                     &nbsp;&nbsp;&nbsp;&nbsp;<a href='index.php?order={$orderno}'>{$strs->no}</a>");
            } else {
                $extra = NULL;
                $message = '';
                if (AN_APPROVED == authorize_action($order, $message, $extra, AN_ACTION_VOID)) {
                    if (empty($CFG->an_test)) {
                        redirect("index.php?order={$orderno}");
                    } else {
                        $table->data[] = array(get_string('testmode', 'enrol_authorize'), get_string('testwarning', 'enrol_authorize'));
                    }
                } else {
                    $table->data[] = array("<b><font color='red'>{$strs->error}:</font></b>", $message);
                }
            }
        } else {
            // cancel refunded transaction
            $sql = "SELECT r.*, e.courseid, e.paymentmethod FROM {$CFG->prefix}enrol_authorize_refunds r " . "INNER JOIN {$CFG->prefix}enrol_authorize e ON r.orderid = e.id " . "WHERE r.id = '{$suborderno}' AND r.orderid = '{$orderno}' AND r.status = '" . AN_STATUS_CREDIT . "'";
            $suborder = get_record_sql($sql);
            if (!$suborder) {
                // not found
                error("Transaction can not be voided because of already been voided.");
            } else {
                $refundedstatus = authorize_get_status_action($suborder);
                if (!in_array(ORDER_VOID, $refundedstatus->actions)) {
                    $a = new stdClass();
                    $a->action = $authstrs->void;
                    print_error('youcantdo', 'enrol_authorize', '', $a);
                }
                unset($suborder->courseid);
                if (empty($confirm)) {
                    $a = new stdClass();
                    $a->transid = $suborder->transid;
                    $a->amount = $suborder->amount;
                    $strsubvoidyes = get_string('subvoidyes', 'enrol_authorize', $a);
                    $cbunenrol = print_checkbox('unenrol', '1', !empty($unenrol), '', '', '', true);
                    $table->data[] = array("<b>{$authstrs->unenrolstudent}</b>", $cbunenrol);
                    $table->data[] = array("<b>{$strs->confirm}:</b>", "{$strsubvoidyes}<br /><input type='hidden' name='" . ORDER_VOID . "' value='y' />\n                         <input type='hidden' name='confirm' value='1' />\n                         <input type='hidden' name='suborder' value='{$suborderno}' />\n                         <input type='submit' value='{$authstrs->void}' />\n                         &nbsp;&nbsp;&nbsp;&nbsp;<a href='index.php?order={$orderno}'>{$strs->no}</a>");
                } else {
                    $message = '';
                    $extra = NULL;
                    if (AN_APPROVED == authorize_action($suborder, $message, $extra, AN_ACTION_VOID)) {
                        if (empty($CFG->an_test)) {
                            if (!empty($unenrol)) {
                                role_unassign(0, $order->userid, 0, $coursecontext->id);
                            }
                            redirect("index.php?order={$orderno}");
                        } else {
                            $table->data[] = array(get_string('testmode', 'enrol_authorize'), get_string('testwarning', 'enrol_authorize'));
                        }
                    } else {
                        $table->data[] = array("<b><font color='red'>{$strs->error}:</font></b>", $message);
                    }
                }
            }
        }
        print_table($table);
    } elseif (!empty($cmddelete) and confirm_sesskey()) {
        // DELETE
        if (!in_array(ORDER_DELETE, $status->actions)) {
            $a = new stdClass();
            $a->action = $authstrs->delete;
            print_error('youcantdo', 'enrol_authorize', '', $a);
        }
        if (empty($confirm)) {
            $cbunenrol = print_checkbox('unenrol', '1', !empty($unenrol), '', '', '', true);
            $table->data[] = array("<b>{$authstrs->unenrolstudent}</b>", $cbunenrol);
            $table->data[] = array("<b>{$strs->confirm}:</b>", "<input type='hidden' name='" . ORDER_DELETE . "' value='y' />\n                 <input type='hidden' name='confirm' value='1' />\n                 <input type='submit' value='{$authstrs->delete}' />\n                 &nbsp;&nbsp;&nbsp;&nbsp;<a href='index.php?order={$orderno}'>{$strs->no}</a>");
        } else {
            if (!empty($unenrol)) {
                role_unassign(0, $order->userid, 0, $coursecontext->id);
            }
            delete_records('enrol_authorize', 'id', $orderno);
            redirect("index.php");
        }
        print_table($table);
    } else {
        // SHOW
        $actions = '';
        if (empty($status->actions)) {
            if ($order->paymentmethod == AN_METHOD_ECHECK && has_capability('enrol/authorize:uploadcsv', get_context_instance(CONTEXT_USER, $USER->id))) {
                $actions .= '<a href="uploadcsv.php">' . get_string('uploadcsv', 'enrol_authorize') . '</a>';
            } else {
                $actions .= $strs->none;
            }
        } else {
            foreach ($status->actions as $value) {
                $actions .= "<input type='submit' name='{$value}' value='{$authstrs->{$value}}' /> ";
            }
        }
        $table->data[] = array("<b>{$strs->action}</b>", $actions);
        print_table($table);
        if ($settled) {
            // show refunds.
            $t2 = new stdClass();
            $t2->size = array('45%', '15%', '20%', '10%', '10%');
            $t2->align = array('right', 'right', 'right', 'right', 'right');
            $t2->head = array($authstrs->settlementdate, $authstrs->transid, $strs->status, $strs->action, $authstrs->amount);
            $sql = "SELECT r.*, e.courseid, e.paymentmethod FROM {$CFG->prefix}enrol_authorize_refunds r " . "INNER JOIN {$CFG->prefix}enrol_authorize e ON r.orderid = e.id " . "WHERE r.orderid = '{$orderno}'";
            $refunds = get_records_sql($sql);
            if ($refunds) {
                $sumrefund = floatval(0.0);
                foreach ($refunds as $rf) {
                    $substatus = authorize_get_status_action($rf);
                    $subactions = '&nbsp;';
                    if (empty($substatus->actions)) {
                        $subactions .= $strs->none;
                    } else {
                        foreach ($substatus->actions as $vl) {
                            $subactions .= "<a href='index.php?{$vl}=y&amp;sesskey={$USER->sesskey}&amp;order={$orderno}&amp;suborder={$rf->id}'>{$authstrs->{$vl}}</a> ";
                        }
                    }
                    $sign = '';
                    $color = authorize_get_status_color($substatus->status);
                    if ($substatus->status == 'refunded' or $substatus->status == 'settled') {
                        $sign = '-';
                        $sumrefund += floatval($rf->amount);
                    }
                    $t2->data[] = array(userdate($rf->settletime), $rf->transid, "<font style='color:{$color}'>" . $authstrs->{$substatus->status} . "</font>", $subactions, format_float($sign . $rf->amount, 2));
                }
                $t2->data[] = array('', '', get_string('total'), $order->currency, format_float('-' . $sumrefund, 2));
            } else {
                $t2->data[] = array('', '', get_string('noreturns', 'enrol_authorize'), '', '');
            }
            echo "<h4>" . get_string('returns', 'enrol_authorize') . "</h4>\n";
            print_table($t2);
        }
    }
    echo '</div>';
    echo '</form>';
}
コード例 #23
0
ファイル: config_form.php プロジェクト: veritech/pare-project
print_string("mailstudents");
?>
</td>
</tr>

<tr valign="top">
    <td align="right">enrol_mailteachers:</td>
    <td><?php 
print_checkbox('enrol_mailteachers', '1', !empty($frm->enrol_mailteachers));
?>
<br />
        <?php 
print_string("mailteachers");
?>
</td>
</tr>

<tr valign="top">
    <td align="right">enrol_mailadmins:</td>
    <td><?php 
print_checkbox('enrol_mailadmins', '1', !empty($frm->enrol_mailadmins));
?>
<br />
        <?php 
print_string("mailadmins");
?>
</td>
</tr>

</table>
コード例 #24
0
$table->data[2][1] = user_print_autocomplete_input($params_creator);
/*$table->data[2][1] = print_input_text_extended ('id_user', $id_user, 'text-id_user', '', 15, 30, false, '',
			array('style' => 'background: url(' . $src_code . ') no-repeat right;'), true, '', __('Default user'))
		. print_help_tip (__("Type at least two characters to search"), true);*/
$icons = list_files('images/groups_small/', 'png', 0, true, '');
$table->data[3][0] = print_select($icons, 'icon', $icon, '', 'None', '', true, false, false, __('Icon'));
$table->data[3][0] .= '&nbsp;&nbsp;<span id="icon_preview">';
if ($id && $icon != '') {
    $table->data[3][0] .= '<img src="images/groups_small/' . $icon . '" />';
}
$table->data[3][0] .= '</span>';
$banners = list_files('images/group_banners/', 'png', 0, true);
$table->data[3][1] = print_select($banners, "banner", $banner, '', 'None', '', true, false, false, __('Banner'));
$table->data[4][0] = print_input_text('soft_limit', $soft_limit, '', 10, 0, true, __('Tickets Soft limit')) . print_help_tip(__("If it's a standard user it shows the maximum nº of tickets for this group that one user can have opened at the same time. If it's a external user it shows the maximum nº of tickets for this group and user that one user can have opened at the same time"), true);
if ($config['enteprise'] == 1) {
    $table->data[4][1] = print_checkbox('enforce_soft_limit', 1, $enforce_soft_limit, true, __('Enforce soft limit'));
}
$table->data[5][0] = print_input_text('hard_limit', $hard_limit, '', 10, 0, true, __('Tickets Hard limit')) . print_help_tip(__("If it's a standard user it shows the nº of maximum tickets for this group, that one user could have in total (open or closed). If it's a external user it shows the nº of maximum tickets for user, for this group, that one user could have in total (open or closed). When this limit is exceeded, the user will receive a notification in the screen when he try to create a ticket, so he won't be able to create any more."), true);
$slas_aux = get_db_all_rows_sql("SELECT id, name FROM tsla ORDER BY name");
$slas = array();
$slas[0] = __("None");
foreach ($slas_aux as $s) {
    $slas[$s["id"]] = $s["name"];
}
$table->data[5][1] = print_select($slas, 'id_sla', $id_sla, '', '', 0, true, false, false, __('Ticket SLA'));
$table->data[6][0] = print_input_text('inventory_name', $inventory_name, '', 25, 0, true, __('Default Inventory object'), false);
$table->data[6][0] .= "<a href='javascript: show_inventory_search(\"\",\"\",\"\",\"\",\"\",\"\");'>" . '&nbsp;&nbsp;' . __('Search parent') . "</a>";
$table->data[6][0] .= print_input_hidden('id_inventory', $id_inventory, true);
$table->data[6][1] = print_input_text('email_from', $email_from, '', 40, 0, true, __('Email from'));
if ($config['enteprise'] == 1) {
    $table->data[7][0] = print_textarea("email_group", 5, 40, $email_group, '', true, __('Email group') . print_help_tip(__("Place each email address in a new line. You can use regular expresions"), true));
コード例 #25
0
ファイル: index.php プロジェクト: r007/PMoodle
        $test->run($reporter);
    }
    $formheader = get_string('retest', $langfile);
} else {
    $displaypath = '';
    $formheader = get_string('rununittests', $langfile);
}
// Print the form for adjusting options.
print_simple_box_start('center', '70%');
echo '<form method="get" action="index.php">';
echo '<fieldset class="invisiblefieldset">';
print_heading($formheader);
echo '<p>';
print_checkbox('showpasses', 1, $showpasses, get_string('showpasses', $langfile));
echo '</p>';
echo '<p>';
print_checkbox('showsearch', 1, $showsearch, get_string('showsearch', $langfile));
echo '</p>';
echo '<p>';
print_checkbox('thorough', 1, $thorough, get_string('thorough', $langfile));
echo '</p>';
echo '<p>';
echo '<label for="path">', get_string('onlytest', $langfile), '</label> ';
echo '<input type="text" id="path" name="path" value="', $displaypath, '" size="40" />';
echo '</p>';
echo '<input type="submit" value="' . get_string('runtests', $langfile) . '" />';
echo '</fieldset>';
echo '</form>';
print_simple_box_end();
// Footer.
admin_externalpage_print_footer();
コード例 #26
0
	$table->data[0][1] = combo_task_user_participant ($config['id_user'], true, $id_task, true, __('Task'), false, false, false, true);
}

// Various checkboxes
$have_cost = 0;
$keep_cost = 0;
$public = 0;
$keep_public = 0;

$table->data[2][0] = print_checkbox ('have_cost', 1, $have_cost, true, __('Have cost'));

$table->data[2][1] = print_checkbox ('keep_cost', 1, $keep_cost, true, __('Keep cost'));

$table->data[3][0] = print_checkbox ('public', 1, $public, true, __('Public'));

$table->data[3][1] = print_checkbox ('keep_public', 1, $keep_public, true, __('Keep public'));

$table->colspan[5][0] = 2;
$table->data[5][0] = print_submit_button (__('Update'), 'update_btn', false, 'class="sub upd"', true);
$table->data[5][0] .= print_submit_button(__('Delete'), 'delete_btn', false, 'class="sub delete"', true);

print_table ($table);	

echo '</div>';	
?>

<script type="text/javascript">
$(document).ready (function () {
	//WU Multiple delete
	$("#submit-delete_btn").click (function () {
				
コード例 #27
0
ファイル: setup_mail.php プロジェクト: dsyman2/integriaims
$table->data[9][0] = print_input_text("pop_host", $config["pop_host"], '', 25, 30, true, __('POP/IMAP Host'));
$table->data[9][0] .= print_help_tip(__("Use ssl://host.domain.com if want to use IMAP with SSL"), true);
$table->data[9][1] = print_input_text("pop_port", $config["pop_port"], '', 15, 30, true, __('POP/IMAP Port'));
$table->data[9][1] .= print_help_tip(__("POP3: Port 110, IMAP: Port 143, IMAPS: Port 993, SSL-POP: Port 995"), true);
$table->data[10][0] = print_input_text("pop_user", $config["pop_user"], '', 15, 30, true, __('POP/IMAP User'));
$table->data[10][1] = print_input_text("pop_pass", $config["pop_pass"], '', 15, 30, true, __('POP/IMAP Password'));
$table->data[11][1] = "<h4>" . __("Newsletter SMTP Parameters") . "</h4>";
$table->data[12][0] = print_input_text("news_smtp_host", $config["news_smtp_host"], '', 35, 200, true, __('SMTP Host'));
$table->data[12][1] = print_input_text("news_smtp_port", $config["news_smtp_port"], '', 5, 10, true, __('SMTP Port'));
$table->data[13][0] = print_input_text("news_smtp_user", $config["news_smtp_user"], '', 25, 200, true, __('SMTP User'));
$table->data[13][1] = print_input_text("news_smtp_pass", $config["news_smtp_pass"], '', 25, 200, true, __('SMTP Password'));
$table->data[14][0] = print_input_text("news_batch_newsletter", $config["news_batch_newsletter"], '', 4, 255, true, __('Max. emails sent per execution'));
$table->data[14][0] .= print_help_tip(__("This means, in each execution of the batch external process (integria_cron). If you set your cron to execute each hour in each execution of that process will try to send this ammount of emails. If you set the cron to run each 5 min, will try this number of mails."), true);
$table->data[14][1] = print_input_text("batch_email_validation", $config["batch_email_validation"], '', 4, 255, true, __('Newsletter email validation batch'));
$table->data[14][1] .= print_help_tip(__("This means, in each execution of the batch external process (integria_cron) will try to validate this ammount of emails."), true);
$table->data[15][0] = print_checkbox("active_validate", 1, $config["active_validate"], true, __('Activate email validation'));
$table->data[16][1] = "<h4>" . __("Mail general texts") . "</h4>";
$table->colspan[17][0] = 3;
$table->colspan[18][0] = 3;
$table->colspan[19][0] = 3;
$table->data[17][0] = print_textarea("header_email", 5, 40, $config["HEADER_EMAIL"], '', true, __('Email header'));
$table->data[18][0] = print_textarea("footer_email", 5, 40, $config["FOOTER_EMAIL"], '', true, __('Email footer'));
$table->data[19][1] = "<h4>" . __("Mail queue control");
$total_pending = get_db_sql("SELECT COUNT(*) from tpending_mail");
$table->data[19][1] .= " : " . $total_pending . " " . __("mails in queue") . "</h4>";
if ($total_pending > 0) {
    $table->colspan[20][0] = 3;
    $mail_queue = "<div style='height: 250px; overflow-y: auto;'>";
    $mail_queue .= "<table width=100% class=listing>";
    $mail_queue .= "<tr><th>" . __("Date") . "<th>" . __("Recipient") . "<th>" . __("Subject") . "<th>" . __("Attempts") . "<th>" . __("Status") . "</tr>";
    $mails = get_db_all_rows_sql("SELECT * FROM tpending_mail LIMIT 1000");
コード例 #28
0
echo "<td style='vertical-align: top;'>" . print_checkbox("email_ticket_on_creation_and_closing", 1, $config["email_ticket_on_creation_and_closing"], true, __('Send email only on creation and closing ')) . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td style='vertical-align: top;'>" . print_checkbox("ticket_owner_is_creator", 1, $config["ticket_owner_is_creator"], true, __('Ignore user defined by the group for owner')) . "</td>";
echo "<td style='vertical-align: top;'>" . print_checkbox("show_user_name", 1, $config["show_user_name"], true, __('Show user name instead of id in the ticket search')) . "</td>";
echo "<td style='vertical-align: top;'>" . print_checkbox("required_ticket_type", 1, $config["required_ticket_type"], true, __('Required ticket type')) . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td style='vertical-align: top;'>" . print_checkbox("show_creator_blank", 1, $config["show_creator_blank"], true, __('Ignore user creator by default')) . "</td>";
echo "<td style='vertical-align: top;'>" . print_checkbox("change_creator_owner", 1, $config["change_creator_owner"], true, __('Allow to change user creator and user owner')) . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td><br><h3>" . __('Workflow') . "</h3></td>";
echo "</tr>";
echo "<tr>";
echo "<td style='vertical-align: top;'>" . print_checkbox("check_closed_incidents", 1, $config["check_closed_incidents"], true, __('Check closed tickets when running workflow rules')) . "</td>";
echo "<td style='vertical-align: top;'>" . print_input_text("days_check_closed_incidents", $config["days_check_closed_incidents"], '', 5, 255, true, __('Days to check closed tickets'));
echo "</tr>";
echo "<tr>";
echo "<td><h3>" . __('Status') . "</h3></td>";
echo "<td><h3>" . __('Resolutions') . "</h3></td>";
echo "<td><h3>" . __("Non-working days") . "</h3></td>";
echo "</tr>";
echo "<tr>";
echo "<td style='vertical-align: top; width: 280px'>" . $table_status . "</td>";
echo "<td style='vertical-align: top; width: 280px'>" . $table_resolutions . "</td>";
echo "<td style='vertical-align: top;'>" . $holidays_table;
echo $table_anonym;
echo "</td>";
echo "</tr>";
echo "<tr><td colspan=3>";
コード例 #29
0
        $global_field = $field_data['global_id'];
    }
}
echo '<h1>' . __('Ticket fields management') . '</h1>';
$table->width = "99%";
$table->class = "search-table-button";
$table->data = array();
// Field name
$table->data[0][0] = print_input_text('label', $label, '', 45, 100, true, __('Field name'), $global_field);
// Type
$types = array('text' => __('Text'), 'textarea' => __('Textarea'), 'combo' => __('Combo'), 'linked' => __('Linked'), 'numeric' => __('Numeric'));
$table->data[0][1] = print_select($types, 'type', $type, '', '', '', true, 0, false, __("Type"), $global_field);
// Show in the ticket list
$table->data[0][2] = print_checkbox('show_in_list', 1, $show_in_list, true, __('Show in the tickets list'), $global_field);
// Global field
$table->data[0][3] = print_checkbox('global', 1, $global_field, true, __('Global field'), $global_field);
// Combo value
$table->data['id_combo_value'][0] = print_input_text('combo_value', $combo_value, '', 45, 0, true, __('Combo value'), $global_field);
$table->data['id_combo_value'][0] .= print_help_tip(__("Set values separated by comma"), true);
// Add values
if ($global_field) {
    $table->data['id_combo_value'][1] = print_input_text('add_combo_value', $add_combo_value, '', 45, 0, true, __('Add values')) . print_help_tip(__("Set values separated by comma"), true);
}
// Linked values
$sql = "SELECT id, label\n\t\tFROM tincident_type_field\t\n\t\tWHERE id_incident_type = {$id_incident_type}\n\t\t\tAND type = 'linked'";
$parents_result = get_db_all_rows_sql($sql);
if ($parents_result == false) {
    $parents_result = array();
}
$parents = array();
foreach ($parents_result as $result) {
コード例 #30
0
ファイル: db_form.php プロジェクト: Turante/boincweb
echo "<form method=\"get\" action=\"db_action.php\">\n";
echo "<p>\n";
echo "<input type=\"hidden\" name=\"table\" value=\"{$table}\">\n";
start_table();
switch ($table) {
    case "platform":
        break;
    case "app":
        break;
    case "app_version":
        print_detail_field();
        print_query_field();
        break;
    case "host":
        echo "\r\n\t\t\t<tr>\r\n\t\t\t<td align=\"right\">Show Aggregate Information</td>\r\n\t\t\t<td>\r\n\t\t";
        print_checkbox("", "show_aggregate", $show_aggregate);
        echo "\r\n\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t";
        print_detail_field();
        print_query_field();
        break;
    case "workunit":
        print_detail_field();
        print_query_field();
        echo "<input type=\"hidden\" name=\"sort_by\" value=\"id\">\n";
        break;
    case "result":
        echo "<tr><td align=\"right\">Server state</td><td> ";
        server_state_select();
        echo "</td></tr>\n";
        //print_text_field( "Batch number:", "batch", $batch );
        echo "<tr><td align=\"right\">Outcome</td><td>";