Пример #1
0
			<?php 
    } else {
        ?>
				<table cellpadding="0" cellspacing="3">
					<?php 
        foreach ($mission_array['completed'] as $k3 => $v3) {
            ?>
					<form method="post" action="<?php 
            echo $webLocation;
            ?>
admin.php?page=manage&sub=missions&s=3">
					<tr>
						<td colspan="2" valign="top">
							<span class="fontNormal"><b>Title</b></span><br />
							<input type="text" class="image" name="missionTitle" value="<?php 
            echo print_input_text($v3['title']);
            ?>
" />
						</td>
						<td valign="top">
							<span class="fontNormal"><b>Start Date</b></span><br />
							<input type="text" class="date" name="missionStart" value="<?php 
            if (empty($v3['start'])) {
                echo "0000-00-00 00:00:00";
            } else {
                echo dateFormat("sql", $v3['start']);
            }
            ?>
" />
						</td>
						<td width="55%" rowspan="3" align="center" valign="top">
Пример #2
0
Participants            : %s
Description
------------------------------------------------------------------------------------------------------
%s
------------------------------------------------------------------------------------------------------
", $task["name"], $project_manager, $task["start"], $task["end"], get_priority_name($task["priority"]), $task_days, $task_cost, $task["completion"], $participants, $task["description"]);

$section_title = __("Task report details");
$section_subtitle =  $project_name . " >> " .$task["name"];
$t_menu = print_task_tabs();
print_title_with_menu ($section_title, $section_subtitle, "task_emailreport", 'projects', $t_menu, 'email');

echo "<form method=post action=''>";
echo "<table width=100% class=search-table-button>";
echo "<tr><td>";
print_input_text ('title', $title, '', 80, 175, false, __('Subject'));
echo "<tr><td>";
print_textarea ('description', 15, 50, $description, '',	false, __('Message text'));
echo "<tr><td>";
echo '</table>';

$button = '';
echo '<div style="width:100%;">';
$table = new StdClass;
$table->width = '100%';
$table->class = "button-form";
$button .= print_submit_button (__('Send'), 'create_btn', false, 'class="sub create"', true);
$button .= print_input_hidden ('operation', 'generate_email',true);
$button .= print_input_hidden ('id_project', $id_project, true);
$button .= print_input_hidden ('id_task', $id_task, true);
Пример #3
0
 $search_text = (string) get_parameter('search_text');
 $id_company = (int) get_parameter('id_company', 0);
 $where_clause = "WHERE 1=1";
 if ($search_text != "") {
     $where_clause .= " AND (fullname LIKE '%{$search_text}%' OR email LIKE '%{$search_text}%' OR phone LIKE '%{$search_text}%' OR mobile LIKE '%{$search_text}%') ";
 }
 if ($id_company) {
     $where_clause .= sprintf(' AND id_company = %d', $id_company);
 }
 $search_params = "&search_text={$search_text}&id_company={$id_company}";
 $table->width = '99%';
 $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);
Пример #4
0
$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) {
    $parents[$result['id']] = $result['label'];
}
$table->data['id_parent_value'][0] = print_select($parents, 'parent', $parent, '', __('Select parent'), '0', true, 0, true, __("Parent"), $global_field);
$table->data['id_linked_value'][0] = print_textarea('linked_value', 15, 1, $linked_value, '', true, __('Linked value') . integria_help("linked_values", true), $global_field);
if ($global_field) {
    $table->data['id_linked_value'][1] = "";
Пример #5
0
				$select_label_object .=		'</div>';
			$select_label_object .= '</td></tr></table>';
		$select_label_object .= '</div>';

		print_container_div("inventory_column",__("Column editor"),$select_label_object, 'open', false, false);
	 
		$search_other = "<div class='divresult_inventory'>";
		$table_search = new StdClass();
		$table_search->class = 'search-table-button';
		$table_search->width = '100%';
		$table_search->data = array ();
		$table_search->size[0] = "40%";
		$table_search->size[1] = "35%";
		
		//find
		$table_search->data[0][0] = print_input_text ('search_free', $params['search_free'], '', 25, 128, true, __('Search'). print_help_tip (__("Search by id, name, status, description and custom fields"), true));
		
		//associate company
		$companies = get_companies();
		$companies[0] = __("All");
		if(!isset($params['id_company'])){
			$params['id_company'] = 0;
		}
		$table_search->data[0][1] = print_select ($companies, 'id_company', $params['id_company'],'', '', 0, true, false, false, __('Associated company'), '', 'width: 218px;');

		//owner
		if(!isset($params['owner'])){
			$params['owner'] = "";
		}
		$params_assigned['input_id'] = 'text-owner';
		$params_assigned['input_name'] = 'owner';
		echo "<div id='button-bar-title'><ul>";
			echo "<li><a href='index.php?sec=projects&sec2=operation/inventories/inventory_reports'>".print_image ("images/flecha_volver.png", true, array("title" => __("Back to Report")))."</a></li>";
		echo "</ul></div>";
	echo "</h4>";
}
echo $result_msg;

$table = new stdClass;
$table->width = '100%';
$table->class = 'search-table-button';
$table->data = array ();
$table->colspan = array ();
$table->colspan[1][0] = 2;
$table->colspan[2][0] = 2;
	
$table->data[0][0] = print_input_text ('name', $name, '', 40, 255, true, __('Name'));

$groups = get_user_groups ($config['id_user'], "VR");
$groups[0] = __('None');
$table->data[0][1] = print_select ($groups, "id_group", $id_group, '', '', 0, true, false, false, __('Group'));

$table->data[1][0] = print_textarea ('sql', 10, 100, $sql, '', true, __('Report SQL sentence'));

if (dame_admin ($config['id_user'])) {
	if ($id) {
			$button = print_input_hidden ('update_report', 1, true);
			$button .= print_input_hidden ('id', $id, true);
			$button .= print_submit_button (__('Update'), 'update', false, 'class="sub upd"', true);
	} else {
		$button = print_input_hidden ('create_report', 1, true);
		$button .= print_submit_button (__('Create'), 'create', false, 'class="sub create"', true);
Пример #7
0
$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 () {
	$("textarea").TextAreaResizer ();
});
Пример #8
0
	$table->data = array ();
	$table->colspan = array ();
	$table->colspan[0][0] = 4;
	$table->colspan[1][0] = 4;
	$table->colspan[4][0] = 4;
	
	if ($new_contact || ($id && ($write_permission || $manage_permission)) ) {
		
		$table->class = "search-table-button";
		
		$table->data[0][0] = print_input_text ("fullname", $fullname, "", 60, 100, true, __('Full name'));
		
		$table->data[1][0] = print_input_text ("email", $email, "", 35, 100, true, __('Email'));
		$table->data[2][0] = print_input_text ("phone", $phone, "", 15, 60, true, __('Phone number'));
		$table->data[2][1] = print_input_text ("mobile", $mobile, "", 15, 60, true, __('Mobile number'));
		$table->data[3][0] = print_input_text ('position', $position, '', 25, 50, true, __('Position'));
		
		$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[3][1] = print_company_autocomplete_input($params);
		
		if ($id) {
			$table->data[3][1] .= "&nbsp;&nbsp;<a href='index.php?sec=customers&sec2=operation/companies/company_detail&id=$id_company'>";
			$table->data[3][1] .= "<img src='images/company.png'></a>";
		}
		
		$table->data[4][0] = print_textarea ("description", 10, 1, $description, '', true, __('Description'));
<div class="overlay_content" id="login_overlay">

	<div class="title">Log into Splash Games</div>

	<form method="POST" action="">

		<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">
Пример #10
0
 $table->data[0][0] = print_input_text("search_text", $search_text, "", 15, 100, true, __('Search'));
 $table->data[0][1] = print_select_from_sql('SELECT id, name FROM tcompany_role ORDER BY name', 'search_role', $search_role, '', __('Select'), 0, true, false, false, __('Company Role'));
 $table->data[0][2] = print_input_text("search_country", $search_country, "", 10, 100, true, __('Country'));
 $table->data[0][3] = print_input_text_extended('search_manager', $search_manager, 'text-user', '', 15, 30, false, '', array(), true, '', __('Manager')) . print_help_tip(__("Type at least two characters to search"), true);
 // $companies_name = crm_get_companies_list("", false, "ORDER BY name", true);
 // $table->data[1][0] = print_select ($companies_name, 'search_parent', $search_parent, '', __('Any'), 0, true, false, false, __('Parent'));
 $params = array();
 $params['input_id'] = 'search_parent';
 $params['input_name'] = 'search_parent';
 $params['input_value'] = $search_parent;
 $params['title'] = __('Parent');
 $params['return'] = true;
 $table->data[1][0] = print_company_autocomplete_input($params);
 $table->data[1][1] = print_input_text('search_date_begin', $search_date_begin, '', 15, 20, true, __('Date from'));
 $table->data[1][2] = print_input_text('search_date_end', $search_date_end, '', 15, 20, true, __('Date to'));
 $table->data[1][3] = print_input_text('search_min_billing', $search_min_billing, '', 15, 20, true, __('Min. billing'));
 $buttons = 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);
 $buttons .= print_button(__('Export to CSV'), '', false, 'window.open(\'' . 'include/export_csv.php?export_csv_companies=1&where_clause=' . str_replace('"', "\\'", $where_clause) . '&date=' . $date . '\')', 'class="sub csv"', true);
 $table->data[2][0] = $buttons;
 $table->colspan[2][0] = 4;
 echo '<form method="post" id="company_stats_form" action="index.php?sec=customers&sec2=operation/companies/company_detail">';
 print_table($table);
 // Input hidden for ORDER
 print_input_hidden('order_by_activity', $order_by_activity);
 print_input_hidden('order_by_company', $order_by_company);
 print_input_hidden('order_by_billing', $order_by_billing);
 echo '</form>';
 $companies = crm_get_companies_list($where_clause, $date, $order_by, false, $having);
 $companies = print_array_pagination($companies, "index.php?sec=customers&sec2=operation/companies/company_detail{$search_params}", $offset);
Пример #11
0
        $newsResult = mysql_query($news);
        while ($newsFetch = mysql_fetch_assoc($newsResult)) {
            extract($newsFetch, EXTR_OVERWRITE);
            ?>
			<form method="post" action="<?php 
            echo $webLocation;
            ?>
admin.php?page=manage&sub=news&id=<?php 
            echo $id;
            ?>
">
			<tr>
				<td>
					<b>Title</b><br />
					<input type="text" class="name" name="newsTitle" maxlength="100" value="<?php 
            echo print_input_text($newsTitle);
            ?>
" />
				</td>
				<td colspan="2">
					<b>Category</b><br />
					<select name="newsCat">
					<?php 
            $cats = "SELECT * FROM sms_news_categories ORDER BY catid ASC";
            $catsResult = mysql_query($cats);
            while ($catFetch = mysql_fetch_assoc($catsResult)) {
                extract($catFetch, EXTR_OVERWRITE);
                if ($newsCat == $catid) {
                    echo "<option value='{$newsCat}' selected>" . stripslashes($catName) . "</option>";
                } else {
                    echo "<option value='{$catid}'>" . stripslashes($catName) . "</option>";
Пример #12
0
	$table->data[1][0] = combo_user_task_profile ($id_task, 'id_profile',
		$id_profile, false, true);
}

// Show task combo if none was given.
if (! $id_task) {
	$table->data[0][1] = combo_task_user_participant ($wu_user,
		true, 0, true, __('Task'));
}
else {
	$table->data[0][1] = combo_task_user_participant ($wu_user,
	true, $id_task, true, __('Task'));
}

// Time used
$table->data[2][0] = print_input_text ('duration', $duration, '', 7, 7,
	true, __('Time used'));

if (dame_admin ($config['id_user'])) {
	$table->colspan[2][1] = 3;
	
	$params = array();
	$params['input_id'] = 'text-id_username';
	$params['input_name'] = 'id_username';
	$params['input_value'] = $wu_user;
	$params['title'] = 'Username';
	$params['return'] = true;
	$params['return_help'] = true;
	$params['attributes'] = "style='width:210px;'";
	
	$table->data[2][1] = user_print_autocomplete_input($params);
}
Пример #13
0
// FILTER
// GET FILTER PARAMETERS
$status = get_parameter('status', 0);
$search = get_parameter('search', '');
unset($table);
$table->class = 'result_table';
$table->width = '98%';
$table->data = array();
$table->header = array();
$table->style[0] = 'width:60px;text-align:right;';
$table->style[1] = 'width:150px';
$table->style[2] = 'width:60px;text-align:right;';
$table->style[3] = 'width:150px';
$table->style[4] = 'width:100px';
$table->data[0][0] = "<b>" . __('Search') . "</b>";
$table->data[0][1] = print_input_text('search', $search, '', 20, 0, true);
$table->data[0][2] = "<b>" . __('Status') . "</b>";
$table->data[0][3] = print_select($statuses, 'status', $status, '', __('Any'), 0, true);
$table->data[0][4] = print_submit_button(__('Filter'), '', false, 'class="sub search"', true);
$table->data[0][5] = '';
echo '<form method="post">';
print_table($table);
echo '</form>';
unset($table);
// INCIDENT LIST
$table->class = 'result_table listing';
$table->width = '98%';
$table->id = 'incident_search_result_table';
$table->head = array();
$table->head[0] = __('ID');
$table->head[1] = __('Ticket');
Пример #14
0
	print_table ($table);
}

//id_incident hidden
echo '<div id="id_incident_hidden" style="display:none;">';
	print_input_text('id_incident_hidden', $id);
echo '</div>';

//id_user hidden
echo '<div id="id_user_hidden" style="display:none;">';
	print_input_text('id_user_hidden', $config['id_user']);
echo '</div>';

//is_enterprise hidden
echo '<div id="is_enterprise_hidden" style="display:none;">';
	print_input_text('is_enterprise_hidden', $is_enterprise);
echo '</div>';

echo "<div class= 'dialog ui-dialog-content' title='".__("Inventory objects")."' id='inventory_search_window'></div>";

echo "<div class= 'dialog ui-dialog-content' title='".__("Tickets")."' id='parent_search_window'></div>";

echo "<div class= 'dialog ui-dialog-content' title='".__("Contacts")."' id='contact_search_window'></div>";

echo "<div class= 'dialog ui-dialog-content' title='".__("Users")."' id='users_search_window'></div>";

echo "<div class= 'dialog ui-dialog-content' title='".__("Warning")."' id='ticket_childs'></div>";

?>

<script type="text/javascript" src="include/js/jquery.metadata.js"></script>
Пример #15
0
$row[] = print_input_text("smtp_queue_retries", $config["smtp_queue_retries"], '', 5, 10, true, __('SMTP Queue retries') . print_help_tip(__("This are the number of attempts the mail queue try to send the mail. Should be high (20-30) if your internet connection have frequent downtimes and near zero if its stable"), true));
$row[] = print_input_text("max_pending_mail", $config["max_pending_mail"], '', 10, 255, true, __('Max pending mail') . print_help_tip(__("Maximum number of queued emails. When this number is exceeded, an alert is activated"), true));
$row[] = print_input_text("batch_newsletter", $config["batch_newsletter"], '', 4, 255, true, __('Max. emails sent per execution') . 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[] = $row;
$row = array();
$row[] = "<br /><h4>" . __("POP/IMAP Parameters") . "</h4>";
$table->data['pop-imap'] = $row;
$table->colspan['pop-imap'][0] = $cols;
$row = array();
$row[] = print_select($popimap, "select_pop_imap", $config["select_pop_imap"], '', '', '', true, 0, true, __('Select IMAP or POP'));
$row[] = print_input_text("pop_host", $config["pop_host"], '', 25, 30, true, __('POP/IMAP Host') . print_help_tip(__("Use ssl://host.domain.com if want to use IMAP with SSL"), true));
$row[] = print_input_text("pop_port", $config["pop_port"], '', 15, 30, true, __('POP/IMAP Port') . print_help_tip(__("POP3: Port 110, IMAP: Port 143, IMAPS: Port 993, SSL-POP: Port 995"), true));
$table->data[] = $row;
$row = array();
$row[] = print_input_text("pop_user", $config["pop_user"], '', 15, 30, true, __('POP/IMAP User'));
$row[] = print_input_text("pop_pass", $config["pop_pass"], '', 15, 30, true, __('POP/IMAP Password'));
$table->data[] = $row;
$row = array();
$row[] = "<br /><h4>" . __("Mail general texts") . "</h4>";
$table->data['mail_header_footer'] = $row;
$table->colspan['mail_header_footer'][0] = $cols;
$row = array();
$row[] = print_textarea("header_email", 9, 40, $config["HEADER_EMAIL"], '', true, __('Email header'));
$table->data['header_email'] = $row;
$table->colspan['header_email'][0] = $cols;
$row = array();
$row[] = print_textarea("footer_email", 15, 40, $config["FOOTER_EMAIL"], '', true, __('Email footer'));
$table->data['footer_email'] = $row;
$table->colspan['footer_email'][0] = $cols;
$total_pending = get_db_sql("SELECT COUNT(*) from tpending_mail");
$row = array();
Пример #16
0
function show_task_row($table, $id_project, $task, $level, $users)
{
    global $config;
    $id_task = $task['id'];
    // Second column (Task  name)
    $prefix = '';
    for ($i = 0; $i < $level; $i++) {
        $prefix .= '<img src="images/small_arrow_right_green.gif" style="position: relative; top: 5px;"> ';
    }
    echo "<td>";
    echo $prefix . print_input_text("name_" . $id_task, $task['name'], "", 40, 0, true);
    echo "</td>";
    // Thrid column (Owner)Completion
    echo "<td style='text-align:center;'>";
    $owners = get_db_value('COUNT(DISTINCT(id_user))', 'trole_people_task', 'id_task', $task['id']);
    if ($owners > 1) {
        echo combo_users_task($task['id'], 1, true);
        echo ' ';
        echo $owners;
    } else {
        $owner_id = get_db_value('id_user', 'trole_people_task', 'id_task', $task['id']);
        print_select($users, "owner_" . $id_task, $owner_id, '', '', 0, false, 0, true, false, false, 'width: 90px');
    }
    echo "</td>";
    // Fourth column (Start date)
    echo "<td style='text-align:center;'>";
    print_input_text_extended("start_" . $id_task, $task['start'], "start_" . $id_task, '', 7, 15, 0, '', 'style="font-size:9px;"');
    echo "</td>";
    // Fifth column (End date)
    echo "<td style='text-align:center;'>";
    print_input_text_extended("end_" . $id_task, $task['end'], "end_" . $id_task, '', 7, 15, 0, '', 'style="font-size:9px;"');
    echo "</td>";
    //Worked time based on workunits
    $worked_time = get_task_workunit_hours($id_task);
    echo "<td style='text-align:left;'>" . $worked_time . "</td>";
    // Sixth column (Delay)
    //If task was completed delay is 0
    if ($task['completion']) {
        $delay = 0;
    } else {
        //If was not completed check for time delay from end to now
        $end = strtotime($task['end']);
        $now = time();
        $a_day_in_sec = 3600 * 24;
        if ($now > $end) {
            $diff = $now - $end;
            $delay = $diff / $a_day_in_sec;
            $delay = round($delay, 1);
        } else {
            $delay = 0;
        }
    }
    echo "<td style='text-align:left;'>" . $delay . "</td>";
    // Seventh column (Delay)
    //Task status
    /*
     * 0%-40% = Pending
     * 41%-90% = In process
     * 91%-99% = Completed
     * 100% = Verified
     * 
     */
    //Check selected status
    $selected = 0;
    if ($task['completion'] < 40) {
        $selected = 0;
    } else {
        if ($task['completion'] < 90) {
            $selected = 45;
        } else {
            if ($task['completion'] < 100) {
                $selected = 95;
            } else {
                if ($task['completion'] == 100) {
                    $selected = 100;
                }
            }
        }
    }
    $fields = array();
    $fields[0] = __("Pending");
    $fields[45] = __("In process");
    $fields[95] = __("Completed");
    $fields[100] = __("Verified");
    echo "<td>";
    print_select($fields, "status_" . $id_task, $selected, '', '', 0, false, 0, true, false, false, "width: 100px;");
    echo "</td>";
    // Last Edit and del column. (Del) Only for PM flag
    //Create new task only if PM && TM flags or PW and project manager.
    echo "<td style='text-align:center;'>";
    echo '<a href="index.php?sec=projects&sec2=operation/projects/task_detail&id_project=' . $id_project . '&id_task=' . $task['id'] . '&operation=view">';
    echo '<img style="margin-right: 6px;" src="images/wrench.png">';
    echo '</a>';
    echo '<a href="index.php?sec=projects&sec2=operation/projects/task_planning&id_project=' . $id_project . '&delete=' . $task["id"] . '"
		onClick="if (!confirm(\'' . __('Are you sure?') . '\')) return false;"><img src="images/cross.png" /></a>';
    echo "</td>";
}
Пример #17
0
        ?>
" /> lbs.</td>
			</tr>
			<tr>
				<td class="tableCellLabel">Eye Color</td>
				<td>&nbsp;</td>
				<td><input type="text" class="image" name="eyeColor" value="<?php 
        echo print_input_text($eyeColor);
        ?>
" /></td>
			</tr>
			<tr>
				<td class="tableCellLabel">Hair Color</td>
				<td>&nbsp;</td>
				<td><input type="text" class="image" name="hairColor" value="<?php 
        echo print_input_text($hairColor);
        ?>
" /></td>
			</tr>
			<tr>
				<td class="tableCellLabel">Physical Description</td>
				<td>&nbsp;</td>
				<td><textarea name="physicalDesc" class="desc" rows="5"><?php 
        echo $physicalDesc;
        ?>
</textarea></td>
			</tr>
			<tr>
				<td colspan="3" height="15"></td>
			</tr>
			
            include "incident_tickets.php";
            break;
        default:
            break;
    }
    echo "</div>";
    echo "</div>";
}
//parameter to reload page
print_input_hidden('base_url_homedir', $config['base_url_dir'], false);
//div to show user info
echo "<div class= 'dialog ui-dialog-content' title='" . __("User info") . "' id='user_info_window'></div>";
echo "<div class= 'dialog ui-dialog-content' title='" . __("Warning") . "' id='ticket_childs'></div>";
//id_incident hidden
echo '<div id="id_incident_hidden" style="display:none;">';
print_input_text('id_incident_hidden', $id);
echo '</div>';
?>

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

<script type="text/javascript">
	
$(document).ready (function () {

	status = $('#incident_status').val();
		

	set_allowed_status();
	set_allowed_resolution();
Пример #19
0
        while ($fetch = mysql_fetch_array($getR)) {
            extract($fetch, EXTR_OVERWRITE);
            if ($fetch[0] == $rankClass) {
                $selected = "selected";
            } else {
                $selected = FALSE;
            }
            echo "<option value='" . $fetch[0] . "' style='color:#" . $fetch[2] . ";' " . $selected . ">" . $fetch[1] . "</option>";
        }
        ?>
					</select>
				</td>
				<td>
					<span class="fontNormal"><b>Rank</b></span><br />
					<input type="text" class="name" name="rankName" value="<?php 
        echo print_input_text($rankName);
        ?>
" />
				</td>
				<td rowspan="2" width="150" align="center" valign="middle">
					<img src="<?php 
        echo $webLocation . 'images/ranks/' . trim($set) . '/' . $rankImage;
        ?>
" alt="<?php 
        echo $rankName;
        ?>
" border="0" />
				</td>
				<td rowspan="2" align="center" valign="middle">
					<input type="hidden" name="rankid" value="<?php 
        echo $rankid;
Пример #20
0
function form_search_users($return = false, $filter = false)
{
    include_once "functions_user.php";
    global $config;
    $output = '';
    if (!$filter) {
        $offset = get_parameter("offset", 0);
        $search_text = get_parameter("search_text", "");
        $disabled_user = get_parameter("disabled_user", -1);
        $level = get_parameter("level", -10);
        $group = get_parameter("group", 0);
    } else {
        $offset = (int) $filter['offset'];
        $search_text = (string) $filter['search_text'];
        $disabled_user = (int) $filter['disabled_user'];
        $level = (int) $filter['level'];
        $group = (int) $filter['group'];
    }
    $table->id = "table-user_search";
    $table->width = "99%";
    $table->class = "search-table";
    $table->size = array();
    $table->style = array();
    $table->data = array();
    $table->data[0][0] = print_input_text("search_text", $search_text, '', 15, 0, true, __('Search text'));
    $user_status = array();
    $user_status[0] = __('Enabled');
    $user_status[1] = __('Disabled');
    $table->data[0][1] = print_select($user_status, 'disabled_user', $disabled_user, '', __('Any'), -1, true, 0, false, __('User status'));
    $global_profile = array();
    $global_profile[-1] = __('External');
    $global_profile[0] = __('Standard');
    $global_profile[1] = __('Administrator');
    $table->data[0][2] = print_select($global_profile, 'level', $level, '', __('Any'), -10, true, 0, false, __('Global profile'));
    $group_name = get_user_groups();
    $group_name[-1] = __('Groupless');
    $table->data[0][3] = print_select($group_name, 'group', $group, '', __('Any'), 0, true, 0, false, __('Group'));
    $table->data[0][4] = print_submit_button(__('Search'), 'search', false, 'class="sub search"', true);
    $output .= '<form name="bskd" method=post id="saved-user-form" action="index.php?sec=users&sec2=godmode/usuarios/lista_usuarios">';
    $output .= print_table($table, true);
    $output .= '</form>';
    if ($return) {
        return $output;
    }
    echo $output;
}
Пример #21
0
$table->colspan[8][0] = 3;
$table->data[8][1] = "<h4>" . __("POP/IMAP Parameters") . "</h4>";
$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>";
Пример #22
0
        echo '</form>';
    } else {
        echo '<form id="incident_status_form" method="post">';
        print_table($table);
        echo '</form>';
    }
} else {
    print_table($table);
}
//id_incident hidden
echo '<div id="id_incident_hidden" style="display:none;">';
print_input_text('id_incident_hidden', $id);
echo '</div>';
//id_user hidden
echo '<div id="id_user_hidden" style="display:none;">';
print_input_text('id_user_hidden', $config['id_user']);
echo '</div>';
echo "<div class= 'dialog ui-dialog-content' title='" . __("Inventory objects") . "' id='inventory_search_window'></div>";
echo "<div class= 'dialog ui-dialog-content' title='" . __("Tickets") . "' id='parent_search_window'></div>";
echo "<div class= 'dialog ui-dialog-content' title='" . __("Contacts") . "' id='contact_search_window'></div>";
echo "<div class= 'dialog ui-dialog-content' title='" . __("Warning") . "' id='ticket_childs'></div>";
?>

<script type="text/javascript" src="include/js/jquery.metadata.js"></script>
<script type="text/javascript" src="include/languages/date_<?php 
echo $config['language_code'];
?>
.js"></script>
<script type="text/javascript" src="include/js/integria_date.js"></script>
<script type="text/javascript" src="include/js/integria_incident_search.js"></script>
<script type="text/javascript" src="include/js/integria_inventory.js"></script>
Пример #23
0
$table->width = '98%';
$table->class = 'search-table';
$table->style = array();
$table->colspan = array();
$table->style[0] = 'font-weight: bold; text-align: right;';
$table->style[1] = 'text-align: left;';
$table->style[2] = 'font-weight: bold; text-align: right;';
$table->style[3] = 'text-align: left;';
$table->style[4] = 'font-weight: bold; text-align: right;';
$table->style[5] = 'text-align: left;';
$table->style[6] = 'text-align: right;';
$table->data = array();
$row = array();
// Name
$row[0] = __('Name') . '&nbsp;';
$row[1] = print_input_text('name', $name, '', 25, 100, true);
// Colour
$row[2] = __('Colour') . '&nbsp;';
$tag_colours = get_available_tag_colours();
$row[3] = print_select($tag_colours, 'colour', $colour, '', '', '', true, false, false);
// Preview
$row[4] = __('Preview') . '&nbsp;';
$row[5] = '<span id="tag-preview"></span>';
$row[6] = print_input_hidden('id', $id, true);
if (empty($id)) {
    $row[6] .= print_input_hidden('action', 'create', true);
} else {
    $row[6] .= print_input_hidden('action', 'update', true);
}
$row[6] .= print_submit_button(__('Add'), 'create_btn', false, 'class="sub create"', true);
$row[6] .= print_submit_button(__('Update'), 'update_btn', false, 'class="sub upd"', true);
Пример #24
0
    }
    echo '</div>';
    echo '</form>';
} else {
    $search_text = (string) get_parameter('search_text');
    $where_clause = '';
    if ($search_text != "") {
        $where_clause .= sprintf('WHERE name LIKE "%%%s%%"', $search_text);
    }
    $table->width = '400px';
    $table->class = 'search-table';
    $table->style = array();
    $table->style[0] = 'font-weight: bold;';
    $table->data = array();
    $table->data[0][0] = __('Search');
    $table->data[0][1] = print_input_text("search_text", $search_text, "", 25, 100, true);
    $table->data[0][2] = print_submit_button(__('Search'), "search_btn", false, 'class="sub search"', true);
    echo '<form method="post" action="index.php?sec=inventory&sec2=operation/types/type_detail">';
    print_table($table);
    echo '</form>';
    $sql = "SELECT * FROM tbuilding {$where_clause} ORDER BY name";
    $buildings = get_db_all_rows_sql($sql);
    if ($buildings !== false) {
        $table->width = '90%';
        $table->class = 'listing';
        $table->data = array();
        $table->size = array();
        $table->size[2] = '40px';
        $table->style = array();
        $table->style[0] = 'font-weight: bold';
        $table->head[0] = __('Name');
Пример #25
0
    $name = get_db_sql("SELECT nombre FROM tgrupo WHERE id_grupo = {$id}");
    $sql = sprintf('DELETE FROM tgrupo WHERE id_grupo = %d', $id);
    $result = process_sql($sql);
    if ($result === false) {
        echo '<h3 class="error">' . __('There was a problem deleting group') . '</h3>';
    } else {
        audit_db($config["id_user"], $config["REMOTE_ADDR"], "Group management", "Deleted group '{$name}'");
        echo '<h3 class="suc">' . __('Successfully deleted') . '</h3>';
    }
}
$offset = get_parameter("offset", 0);
$search_text = get_parameter("search_text", "");
echo "<table class='search-table' style='width: 99%;'><form name='bskd' method=post action='index.php?sec=users&sec2=godmode/grupos/lista_grupos'>";
echo "<td>";
echo "<b>" . __('Search text') . "</b>&nbsp;&nbsp;";
print_input_text("search_text", $search_text, '', 40, 0, false);
echo "</td>";
echo "<td>";
print_submit_button(__('Search'), '', false, 'class="sub next"', false, false);
echo "</td>";
echo "</table></form>";
$groups = get_db_all_rows_sql("SELECT * FROM tgrupo WHERE nombre LIKE '%{$search_text}%' ORDER BY nombre");
$groups = print_array_pagination($groups, "index.php?sec=users&sec2=godmode/grupos/lista_grupos");
print_groups_table($groups);
echo '<form method="post" action="index.php?sec=users&sec2=godmode/grupos/configurar_grupo">';
echo '<div class="button" style="width: ' . $table->width . '">';
print_submit_button(__('Create'), 'create_btn', false, 'class="sub next"');
echo '</div>';
echo '</form>';
?>
Пример #26
0
    		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;
    echo '<form id="form-manage_objects" method="post">';
    print_table($table);
    echo '</form>';
}
Пример #27
0
function get_last_date_control($last_date = 0, $id = 'last_date_search', $label = '', $start_date = '', $start_date_name = 'start_date_search', $start_date_label = '', $end_date = '', $end_date_name = 'end_date_search', $end_date_label = '')
{
    if ($label == '') {
        $label = __('Date');
    }
    if ($start_date_label == '') {
        $start_date_label = __('Start date');
    }
    if ($end_date_label == '') {
        $end_date_label = __('End date');
    }
    $script = "javascript:\n\t\tif (\$('#{$id}').val() > 0) {\n\t\t\t\$('#start_end_dates').slideUp();\n\t\t} else {\n\t\t\t\$('#start_end_dates').slideDown();\n\t\t}\n\t;";
    $hidden = "";
    if ($last_date > 0) {
        $hidden = "style='display: none;'";
    }
    $html = print_select(get_last_dates(), $id, $last_date, $script, '', '', true, 0, false, $label);
    $html .= "<br>";
    $html .= "<div id='start_end_dates' {$hidden}>";
    $html .= "<div id='{$start_date_name}' style='display: inline-block;'>" . print_input_text($start_date_name, $start_date, "", 21, 100, true, $start_date_label) . "</div>";
    $html .= "&nbsp;";
    $html .= "<div id='{$end_date_name}' style='display: inline-block;'>" . print_input_text($end_date_name, $end_date, "", 21, 100, true, $end_date_label) . "</div>";
    $html .= "</div>";
    return $html;
}
Пример #28
0
                $num_params++;
            }
            $x++;
        }
        $data[$x] = "<a title='" . __("Edit fields") . "' href='javascript:update_row(" . $key_value . ",\"" . $params . "\");'><img src='images/accept.png'></a>";
        $data[$x] .= '<a title=' . __("Delete row") . ' href=index.php?sec=inventory&sec2=operation/inventories/manage_external_tables&delete_row=1&id=' . $id_object_type . '&external_table=' . $external_table . '&key=' . $key . '&key_value=' . $key_value . '><img src="images/fail.png"></a>';
        array_push($table_list->data, $data);
    }
    if ($add_row) {
        $j = 0;
        $data = array();
        foreach ($table_fields as $field) {
            if ($key == $field['Field']) {
                $data[$j] = "";
            } else {
                $data[$j] = print_input_text($field['Field'], '', '', 30, 100, true, '');
            }
            $j++;
        }
        $data[$j] = '<a id="link_add_row" title=' . __("Add row") . ' href=""><img src="images/add.png"></a>';
        array_push($table_list->data, $data);
    }
    echo '<form id="external_form" name="external_edition_form" method="post" action="index.php?sec=inventory&sec2=operation/inventories/manage_external_tables&insert_row=1">';
    print_input_hidden('id', $id_object_type, false);
    print_input_hidden('external_table', $external_table, false);
    print_input_hidden('key', $key, false);
    print_table($table_list);
    echo '</form>';
}
print_input_hidden('base_url_homedir', $config['base_url_dir'], false);
print_input_hidden('id', $id_object_type, false);
Пример #29
0
$mail .= "\n\t" . $user["nombre_real"];
$mail .= "\n\t" . $user["direccion"];
$mail .= "\n\t" . $company_user;
$table->width = "99%";
$table->class = "search-table-button";
$table->data = array();
$table->size = array();
$table->style = array();
$table->style[0] = 'font-weight: bold';
$table->colspan[1][0] = 3;
$table->colspan[2][0] = 3;
$table->colspan[3][0] = 3;
$table->data[0][0] = print_input_text("from", $from, "", 30, 100, true, __('From'));
$table->data[0][1] = print_input_text("to", $to, "", 30, 100, true, __('To'));
$table->data[0][2] = print_input_text("cco", $cco, "", 30, 100, true, __('Send a copy to'));
$table->data[1][0] = print_input_text("subject", $subject, "", 130, 100, true, __('Subject'));
$table->data[2][0] = print_textarea("mail", 10, 1, $mail, 'style="height:350px;"', true, __('E-mail'));
$table->data[3][0] = print_submit_button(__('Send email'), 'apply_btn', false, 'class="sub upd"', true);
$table->data[3][0] .= print_input_hidden('id', $id, true);
$table->data[3][0] .= print_input_hidden('send', 1, true);
echo '<form method="post" id="lead_mail_go">';
print_table($table);
echo "</form>";
?>

<script type="text/javascript" src="include/js/jquery.validate.js"></script>
<script type="text/javascript" src="include/js/jquery.validation.functions.js"></script>

<script type="text/javascript" >

validate_form("#lead_mail_go");
Пример #30
0
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>";
print_input_hidden('update', 1);