当前位置: 首页>>代码示例>>PHP>>正文


PHP get_db_all_rows_sql函数代码示例

本文整理汇总了PHP中get_db_all_rows_sql函数的典型用法代码示例。如果您正苦于以下问题:PHP get_db_all_rows_sql函数的具体用法?PHP get_db_all_rows_sql怎么用?PHP get_db_all_rows_sql使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_db_all_rows_sql函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: project_cost_invoices

/**
* Return total cost assigned to task on external costs attached
*
* $id_task	integer 	ID of task
**/
function project_cost_invoices($id_project)
{
    $tasks = get_db_all_rows_sql("SELECT * FROM ttask WHERE id_project = {$id_project}");
    if ($tasks === false) {
        $tasks = array();
    }
    $total = 0;
    foreach ($tasks as $task) {
        $total += task_cost_invoices($task["id"]);
    }
    return $total;
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:17,代码来源:functions_tasks.php

示例2: foreach

     echo "</ul>";
     return;
 }
 //Branch with items
 $new = true;
 $count = 0;
 $clause = "";
 if ($cont) {
     foreach ($cont as $c) {
         $clause .= $c["id"] . ",";
     }
     $clause = substr($clause, 0, -1);
     $clause = " AND tinventory.id IN ({$clause})";
 }
 $sql = "SELECT DISTINCT(tinventory.id_object_type), tobject_type.* FROM tinventory, tobject_type \n\t\t\t\tWHERE tinventory.id_object_type = tobject_type.id" . $clause . " ORDER BY tobject_type.name ASC";
 $cont = get_db_all_rows_sql($sql);
 // Add no object type
 $last_key = count($cont);
 $cont[$last_key]['name'] = __('No object type');
 $cont[$last_key]['icon'] = "box.png";
 $cont[$last_key]['id'] = 0;
 echo "<ul style='margin: 0; padding: 0;'>\n";
 $cont_size = count($cont);
 $end = 1;
 foreach ($cont as $row) {
     if ($row != end($cont)) {
         $end = 0;
     }
     $aux_ref_tree = $ref_tree . "" . $count;
     $new = false;
     $count++;
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:inventory_search.php

示例3: get_db_value

}

// Get names
if ($id_project)
	$project_name = get_db_value ('name', 'tproject', 'id', $id_project);
else
	$project_name = '';

if ($id_task)
	$task = get_db_row ('ttask', 'id', $id_task);

$task_days = $task["hours"] / $config["hours_perday"];
$task_cost = $task['estimated_cost']. $config["currency"];
$prio_array = get_priorities();

$task_participants = get_db_all_rows_sql ("SELECT direccion, nombre_real FROM tusuario, trole_people_task WHERE tusuario.id_usuario = trole_people_task.id_user AND trole_people_task.id_task = $id_task");
$participants ="";
foreach ($task_participants as $participant){
	$participants .= $participant["nombre_real"]. ", ";
}

$title = "[".$config["sitename"]."] Task report - $project_name / ".$task["name"];

$description = sprintf ( "This is a resume of task %s. This report has been sent by Project manager [%s]

------------------------------------------------------------------------------------------------------
Start - End             : %s - %s
Priority                : %s
Estimated length (days) : %d
Estimated cost          : %s
Current progress        : %d %%
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:task_emailreport.php

示例4: get_db_all_rows_sql

			$sql_search_pagination = 'SELECT '.$pr.' FROM tinventory i, tobject_field_data t, tobject_type_field o where t.id_object_type_field= o.id and i.id = t.id_inventory';
			$sql_search_count = 'SELECT i.id, i.name FROM tinventory i, tobject_field_data t, tobject_type_field o where t.id_object_type_field= o.id and i.id = t.id_inventory';
		} else {
			$sql_search = 'SELECT '.$pr.' FROM tinventory i WHERE 1=1';
			$sql_search_pagination = 'SELECT '.$pr.' FROM tinventory i WHERE 1=1';
			$sql_search_count = 'SELECT i.id, i.name FROM tinventory i WHERE 1=1';
		}
		
		if ($id_object_type != -1) {
			$sql_search .= " AND i.id_object_type = $id_object_type";
			$sql_search_pagination .= " AND i.id_object_type = $id_object_type";
			$sql_search_count .= " AND i.id_object_type = $id_object_type";
			
			//for object fields
			$sql_object_fields_custom = 'select label, id from tobject_type_field where show_list=1 and id_object_type='.$id_object_type;
			$object_fields_custom = get_db_all_rows_sql($sql_object_fields_custom);
			//id_type_object
			$params['object_fields_custom'] = $object_fields_custom;
		}

		//search word in the inventory only name, description,id,status and custom fields
		if(isset($params_array['search_free']) && $params_array['search_free'] != ''){
			$search_free = $params_array['search_free'];
		} else {
			$search_free = (string)get_parameter ('search_free', '');
		}

		if ($id_object_type != -1 && !empty($object_fields) && $search_free != '') {
			$params['search_free']= $search_free;
			$string_fields_object_types == '';
			$string_fields_types == '';
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:inventory_search.php

示例5: print_checkbox

$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");
    foreach ($mails as $mail) {
        $mail_queue .= "<tr>";
        $mail_queue .= "<td style='font-size: 9px;'>";
        $mail_queue .= $mail["date"];
        $mail_queue .= "<td>";
        $mail_queue .= $mail["recipient"];
        $mail_queue .= "<td style='font-size: 9px;'>";
        $mail_queue .= $mail["subject"];
        $mail_queue .= "<td>";
        $mail_queue .= $mail["attempts"];
        if ($mail["status"] == 1) {
            $mail_queue .= "<td>" . __("Bad mail");
        } else {
            $mail_queue .= "<td>" . __("Pending");
        }
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:setup_mail.php

示例6: get_db_row

	$report = get_db_row ('tinventory_reports', 'id', $id);
	if ($report === false)
		return;
	
	ini_set ("memory_limit", "3072M");
	ini_set ("max_execution_time", 600);
	
	echo "<h2>".__('Custom report')."</h2>";
	echo "<h4>".$report['name'];
		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>";

	$config['mysql_result_type'] = MYSQL_ASSOC;
	$rows = get_db_all_rows_sql (clean_output ($report['sql']));
	if ($rows === false)
		return;
	
	//count $row chunk
	$row_chunk_cont = count(array_chunk($rows[0], 10));
	
	//keys $row chunk
	$row_chunk_keys = array_chunk(array_keys($rows[0]), 10);
		
	$table = array();
	for($i=0; $i < $row_chunk_cont; $i++){
		$table[$i][] = $row_chunk_keys[$i];
		foreach ($rows as $row) {
			$row_chunk = array_chunk($row, 10);
			$table[$i][] = $row_chunk[$i];
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:inventory_reports_detail.php

示例7: __

		$search_by_status .= "<td>";
		$search_by_status .= "<a href='index.php?sec=incidents&sec2=operation/incidents/incident_search&search_first_date=" . $first_start . "&search_status=".$status["id"]."'>";
		$search_by_status .= __($status["name"])." (".count($incidents).")";
		$search_by_status .= "</a>";
		$search_by_status .= "</td>";
		
	if ($key % 2 != 0) {
		$search_by_status .= "</tr>";
	}
}

$search_by_status .= "</table>";

$right_side = print_container('incident_search_by_status', __('Search by status'), $search_by_status);

$rows = get_db_all_rows_sql ("SELECT id, name FROM tincident_type ORDER BY name ASC");

$search_by_type = "<table>";

if (!$rows) {
	$search_by_type .="<tr>";
	$search_by_type .="<td>";
	$search_by_type .="<em>".__("There aren't ticket types defined")."</em>";
	$search_by_type .="</td>";
	$search_by_type .="</tr>";

} else {
	$count = 0;

	$rows = get_incident_types();
开发者ID:keunes,项目名称:integriaims,代码行数:30,代码来源:incident_dashboard.php

示例8: showWorkOrder

 private function showWorkOrder($message = "")
 {
     $system = System::getInstance();
     $ui = Ui::getInstance();
     $ui->createPage();
     $back_href = "index.php?page=workorders&filter_status=0&filter_owner=" . $system->getConfig('id_user');
     if ($this->id_workorder < 0) {
         $title = __("Workorder");
     } else {
         $title = __("Workorder") . "&nbsp;#" . $this->id_workorder;
     }
     $ui->createDefaultHeader($title, $ui->createHeaderButton(array('icon' => 'back', 'pos' => 'left', 'text' => __('Back'), 'href' => $back_href)));
     $ui->beginContent();
     // Message popup
     if ($message != "") {
         $options = array('popup_id' => 'message_popup', 'popup_content' => $message);
         $ui->addPopup($options);
         $ui->contentAddHtml("<script type=\"text/javascript\">\n\t\t\t\t\t\t\t\t\t\t\$(document).on('pageshow', function() {\n\t\t\t\t\t\t\t\t\t\t\t\$(\"#message_popup\").popup(\"open\");\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t</script>");
     }
     $options = array('id' => 'form-workorder', 'action' => "index.php?page=workorder", 'method' => 'POST');
     $ui->beginForm($options);
     // Title
     $options = array('name' => 'title', 'label' => __('Title'), 'value' => $this->title, 'placeholder' => __('Title'));
     $ui->formAddInputText($options);
     // Assigned user
     $options = array('name' => 'assigned_user', 'id' => 'text-assigned_user', 'label' => __('Assigned user'), 'value' => $this->assigned_user, 'placeholder' => __('Assigned user'), 'autocomplete' => 'off');
     $ui->formAddInputText($options);
     // Assigned user autocompletion
     // List
     $ui->formAddHtml("<ul id=\"ul-autocomplete\" data-role=\"listview\" data-inset=\"true\"></ul>");
     // Autocomplete binding
     $ui->bindMobileAutocomplete("#text-assigned_user", "#ul-autocomplete");
     // Status
     $values = array();
     if (get_db_value("need_external_validation", "ttodo", "id", $this->id_workorder)) {
         $values = wo_status_array(0);
     } else {
         $values = wo_status_array(1);
     }
     $options = array('name' => 'status', 'title' => __('Status'), 'label' => __('Status'), 'items' => $values, 'selected' => $this->status);
     $ui->formAddSelectBox($options);
     // Priority
     $values = array();
     $values = get_priorities();
     $options = array('name' => 'priority', 'title' => __('Priority'), 'label' => __('Priority'), 'items' => $values, 'selected' => $this->priority);
     $ui->formAddSelectBox($options);
     // Category
     $workorders = get_db_all_rows_sql("SELECT id, name FROM two_category ORDER BY name");
     $values = array();
     if ($workorders) {
         foreach ($workorders as $workorder) {
             $values[$workorder[0]] = $workorder[1];
         }
     }
     array_unshift($values, __('Any'));
     $options = array('name' => 'category', 'title' => __('Category'), 'label' => __('Category'), 'items' => $values, 'selected' => $this->category);
     $ui->formAddSelectBox($options);
     // Task
     $sql = "SELECT ttask.id, tproject.name, ttask.name\n\t\t\t\t\t\tFROM ttask, trole_people_task, tproject\n\t\t\t\t\t\tWHERE ttask.id_project = tproject.id\n\t\t\t\t\t\t\tAND tproject.disabled = 0\n\t\t\t\t\t\t\tAND ttask.id = trole_people_task.id_task\n\t\t\t\t\t\t\tAND trole_people_task.id_user = '" . $system->getConfig('id_user') . "'\n\t\t\t\t\t\tORDER BY tproject.name, ttask.name";
     if (dame_admin($system->getConfig('id_user'))) {
         $sql = "SELECT ttask.id, tproject.name, ttask.name \n\t\t\t\t\t\t\tFROM ttask, tproject\n\t\t\t\t\t\t\tWHERE ttask.id_project = tproject.id\n\t\t\t\t\t\t\t\tAND tproject.disabled = 0\n\t\t\t\t\t\t\tORDER BY tproject.name, ttask.name";
     }
     $tasks = get_db_all_rows_sql($sql);
     $values = array();
     $values[0] = __('N/A');
     if ($tasks) {
         foreach ($tasks as $task) {
             $values[$task[0]] = array('optgroup' => $task[1], 'name' => $task[2]);
         }
     }
     $selected = $this->id_task > 0 ? $this->id_task : 0;
     $options = array('name' => 'id_task', 'title' => __('Task'), 'label' => __('Task'), 'items' => $values, 'selected' => $selected);
     $ui->formAddSelectBox($options);
     // Description
     $options = array('name' => 'description', 'label' => __('Description'), 'value' => $this->description);
     $ui->formAddHtml($ui->getTextarea($options));
     // Hidden operation (insert or update+id)
     if ($this->id_workorder < 0) {
         $options = array('type' => 'hidden', 'name' => 'operation', 'value' => 'insert');
         $ui->formAddInput($options);
         // Submit button
         $options = array('text' => __('Add'), 'data-icon' => 'plus');
         $ui->formAddSubmitButton($options);
     } else {
         $options = array('type' => 'hidden', 'name' => 'operation', 'value' => 'update');
         $ui->formAddInput($options);
         $options = array('type' => 'hidden', 'name' => 'id_workorder', 'value' => $this->id_workorder);
         $ui->formAddInput($options);
         // Submit button
         $options = array('text' => __('Update'), 'data-icon' => 'refresh');
         $ui->formAddSubmitButton($options);
     }
     $ui->endForm();
     $ui->endContent();
     // Foooter buttons
     // Add
     if ($this->id_workorder < 0) {
         $button_add = "<a onClick=\"\$('#form-workorder').submit();\" data-role='button' data-icon='plus'>" . __('Add') . "</a>\n";
     } else {
         $button_add = "<a onClick=\"\$('#form-workorder').submit();\" data-role='button' data-icon='refresh'>" . __('Update') . "</a>\n";
//.........这里部分代码省略.........
开发者ID:dsyman2,项目名称:integriaims,代码行数:101,代码来源:workorder.php

示例9: sprintf

    $where_clause .= sprintf('AND name LIKE "%%%s%%"', $search_text);
}
$table->width = '90%';
$table->class = 'search-table';
$table->style = array();
$table->style[0] = 'font-weight: bold;';
$table->style[2] = '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][4] = print_submit_button(__('Search'), "search_btn", false, 'class="sub search"', true);
echo '<form method="post" action="">';
print_table($table);
echo '</form>';
$sql = "SELECT * FROM tnewsletter {$where_clause} ORDER BY name";
$newsletters = get_db_all_rows_sql($sql);
$newsletters = print_array_pagination($newsletters, "index.php?sec=customers&sec2=operation/newsletter/operation/newsletter/newsletter_definition&search_text='{$search_text}");
if ($newsletters !== false) {
    $table->width = "90%";
    $table->class = "listing";
    $table->data = array();
    $table->style = array();
    $table->style[0] = 'font-weight: bold; font-size: 14px';
    $table->style[1] = 'font-weight: bold';
    $table->colspan = array();
    $table->head[0] = __('ID');
    $table->head[1] = __('Name');
    $table->head[2] = __('Total addresses');
    $table->head[3] = __('Subscribe Link');
    $table->head[4] = __('Unsubscribe Link');
    $table->head[5] = __('Validated addr.');
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:newsletter_definition.php

示例10: JOIN

								INNER JOIN (
									SELECT twi.id_workunit,
										ti.id_incidencia,
										ti.titulo,
										tis.name AS estado
									FROM tworkunit_incident twi
									INNER JOIN tincidencia ti
										ON twi.id_incident = ti.id_incidencia
											AND ti.id_task = %d
									INNER JOIN tincident_status tis
										ON ti.estado = tis.id
								) twin
									ON tw2.id = twin.id_workunit
							) final
							ORDER BY final.id_user, final.timestamp', $task['id'], $task['id']);
            $all_wu = get_db_all_rows_sql($sql);
            if (!empty($all_wu)) {
                $table_wu = new StdClass();
                $table_wu->width = '100%';
                $table_wu->class = 'listing';
                $table_wu->head = array();
                $table_wu->head['person'] = __('Person');
                $table_wu->head['date'] = __('Date');
                $table_wu->head['duration'] = __('Duration (' . __('In hours') . ')');
                $table_wu->head['ticket_id'] = __('Ticket id');
                $table_wu->head['ticket_title'] = __('Ticket title');
                $table_wu->head['ticket_status'] = __('Ticket status');
                if (!$pdf_output) {
                    $table_wu->head['content'] = __('Content');
                }
                $table_wu->style = array();
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:project_report.php

示例11: print_select

	$select = '';
} else {
	$select = 'select';
}

if (give_acl ($config['id_user'], $id_grupo, "IW") || give_acl ($config['id_user'], $id_grupo, "SI") || (get_standalone_user($config["id_user"]))) {
	$table->data[0][1] .= print_select($types, 'id_incident_type', $id_incident_type, '', $select, '', true, 0, true, false, $disabled_itype);
} else if (give_acl ($config['id_user'], $id_grupo, "SI")){
	$group_escalate_sql = 'select g.nombre from tusuario_perfil u, tgrupo g where g.id_grupo=u.id_grupo and u.id_usuario = "'.$config['id_user'].'"';
	$group_escalate_p = get_db_all_rows_sql($group_escalate_sql);
	foreach ($group_escalate_p as $v) {
		$group_escalate .= $v['nombre']. '|';
	}
	$group_escalate = rtrim($group_escalate, "|");
	$types_escalate_sql = 'select id, name from tincident_type where id_group REGEXP "'.$group_escalate.'"';
	$types_escalate_s = get_db_all_rows_sql($types_escalate_sql);
	$types_escalate = array();
	foreach ($types_escalate_s as $v) {
		$types_escalate[$v['id']] = $v['name'];
	}
	$table->data[0][1] .= print_select($types_escalate, 'id_incident_type', $id_incident_type, '', $select, '', true, 0, true, false, $disabled_itype);
}
$id_group_type = safe_output(get_db_value("id_group", "tincident_type", "id", $id_incident_type));

if($id_group_type != "" && $id_group_type != "0"){
	if(give_acl ($config['id_user'], $id_grupo, "SI")){
		$groups_all = safe_output(users_get_groups_for_select ($config['id_user'], "SI", false,  true));
	}
	else{
		$groups_all = safe_output(users_get_groups_for_select ($config['id_user'], "IW", false,  true));
	}
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:incident_detail.php

示例12: api_ovo_manager

function api_ovo_manager($return_type, $params)
{
    $values[0] = $params[0];
    //title
    $values[1] = $params[1];
    //id group
    $values[2] = $params[2];
    //priority
    $values[3] = $params[3];
    //description
    $values[4] = $params[4];
    //id inventory
    $values[5] = $params[5];
    //id incident type
    $values[6] = '';
    //email
    $values[7] = '';
    //owner
    $values[8] = 0;
    //id parent
    $values[9] = 1;
    //status
    $values[10] = $params[6];
    //info extra
    $prioridad = $params[2];
    $descripcion = $params[3];
    $extra_data = $params[6];
    $msg_group = $params[7];
    //~ $sql = "SELECT * FROM tincidencia WHERE extra_data = '".$extra_data."' AND estado <> 7";
    $sql = "SELECT * FROM tincidencia WHERE extra_data = '" . $extra_data . "'";
    $incidents = get_db_all_rows_sql($sql);
    if ($incidents == false) {
        if ($prioridad == 2 || $prioridad == 3 || $prioridad == 4) {
            //minor, major o critical
            $values[1] = 11;
            //grupo M112 GM24. Hay que ponerlo a mano
            $new_id = api_create_incident('int', 'ovo', $values);
            $values_update[0] = $new_id;
            $values_update[1] = $params[0];
            //title
            $values_update[2] = $params[3];
            //description
            $values_update[3] = "";
            //epilog
            $values_update[4] = 11;
            //group
            $values_update[5] = $params[2];
            //prority
            $values_update[7] = 3;
            //estado asignado
            $values_update[8] = "";
            //owner
            $values_update[9] = 0;
            //id parent
            $values_update[10] = $params[5];
            //id incident type
            $values_update[11] = $params[6];
            //info extra
            api_update_incident($return_type, 'ovo', $values_update);
        }
    } else {
        foreach ($incidents as $incident) {
            switch ($incident['estado']) {
                case 7:
                    //cerrada
                    if ($incident['resolution'] == 1 || $incident['resolution'] == 2) {
                        //resolución arreglado o no válido
                        if ($prioridad == 2 || $prioridad == 3 || $prioridad == 4) {
                            //minor, major o critical
                            $values[1] = 11;
                            //grupo M112 GM24. Hay que ponerlo a mano
                            $new_id = api_create_incident('int', 'ovo', $values);
                            $values_update[0] = $new_id;
                            $values_update[1] = $params[0];
                            //title
                            $values_update[2] = $params[3];
                            //description
                            $values_update[3] = "";
                            //epilog
                            $values_update[4] = 11;
                            //group
                            $values_update[5] = $params[2];
                            $values_update[7] = 3;
                            //estado asignado
                            $values_update[8] = "";
                            //owner
                            $values_update[9] = 0;
                            //id parent
                            $values_update[10] = $params[5];
                            //id incident type
                            $values_update[11] = $params[6];
                            //info extra
                            api_update_incident($return_type, 'ovo', $values_update);
                        }
                    } else {
                        if ($incident['resolution'] == 9) {
                            if ($prioridad == 2 || $prioridad == 3 || $prioridad == 4) {
                                //minor, major o critical
                                //update ticket
                                $values_update[0] = $incident['id_incidencia'];
//.........这里部分代码省略.........
开发者ID:keunes,项目名称:integriaims,代码行数:101,代码来源:functions_api.php

示例13: __

	else
		$labour .= __("N/A");
	$labour .= "</td></tr>";
	
	$labour .= "<tr>";
	$labour .= '<td>'.__('Proyect length deviation (days)').'</td><td>';
	$labour .= abs($deviation/8). " ".__('Days');
	$labour .= "</td></tr>";
	

	
	// People involved
	//Get users with tasks
	$sql = sprintf("SELECT DISTINCT id_user FROM trole_people_task, ttask WHERE ttask.id_project= %d AND ttask.id = trole_people_task.id_task", $id_project);
	
	$users_aux = get_db_all_rows_sql($sql);
	
	if(empty($users_aux)) {
		$users_aux = array();
	}
	
	foreach ($users_aux as $ua) {
		$users_involved[] = $ua['id_user'];
	}
	
	//Delete duplicated items
	if (empty($users_involved)) {
		$users_involved = array();
	}
	else {
		$users_involved = array_unique($users_involved);
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:project_detail.php

示例14: safe_output

    if ($id_task == 0){
	    if ($timestamp_l != "" && $timestamp_h != "")
		    $sql= "SELECT * FROM tworkunit WHERE tworkunit.id_user = '$id_user' AND timestamp >= '$timestamp_l' AND timestamp <= '$timestamp_h' ORDER BY timestamp DESC";
	    else 
		    $sql= "SELECT * FROM tworkunit WHERE tworkunit.id_user = '$id_user' ORDER BY timestamp DESC";
    } else {
        if ($timestamp_l != "" && $timestamp_h != "")
		    $sql= "SELECT * FROM tworkunit, tworkunit_task WHERE tworkunit.id_user = '$id_user' AND timestamp >= '$timestamp_l' AND timestamp <= '$timestamp_h' AND tworkunit_task.id_task = $id_task AND tworkunit_task.id_workunit = tworkunit.id ORDER BY timestamp DESC";
	    else 
		    $sql= "SELECT * FROM tworkunit, tworkunit_task WHERE tworkunit.id_user = '$id_user' AND tworkunit_task.id_task = $id_task AND tworkunit_task.id_workunit = tworkunit.id ORDER BY timestamp DESC";
    }
}

$sql = safe_output ($sql);

$alldata = get_db_all_rows_sql ($sql);
foreach ($alldata as $row){ 
	
	if ($row["id"] != -1)
        show_workunit_user ($row['id'], 1, true, true, $id_user, $timestamp_h, $timestamp_l);
	else 
		show_workunit_user ($row['id'], 0, true, true, $id_user, $timestamp_h, $timestamp_l);
}

echo '<div id="show_multiple_edit">';

echo '<h2>'.__('Massive operations over selected items').'</h2>';

$table = new StdClass;
$table->class = 'search-table-button';
$table->width = '100%';
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:user_workunit_report.php

示例15: print_table

    echo '<form id="form-template_manager" method="post" action="index.php?sec=leads&sec2=operation/leads/template_manager">';
    print_table($table);
    echo '</form>';
}
// -------------------------
// LIST OF CRM TEMPLATES
// -------------------------
if ($operation == "") {
    echo "<h1>" . __('CRM Template management') . "</h1>";
    //TODO: Show only my companies templates or my "child" companies tempaltes (and all if I'm admin)
    if (dame_admin($config["id_user"])) {
        $sql = sprintf('SELECT * FROM tcrm_template');
    } else {
        $sql = sprintf('SELECT * FROM tcrm_template');
    }
    $todos = get_db_all_rows_sql($sql);
    if ($todos === false) {
        $todos = array();
    }
    echo '<table class="listing" width="99%">';
    echo "<th>" . __('Name');
    echo "<th>" . __('Language');
    echo "<th>" . __('Company');
    echo "<th>" . __('Operations');
    foreach ($todos as $todo) {
        echo "<tr><td valign=top>";
        echo '<a href="index.php?sec=customers&sec2=operation/leads/template_manager&operation=edit&id=' . $todo["id"] . '">';
        echo "<b>" . $todo["name"] . "</b></a>";
        echo "<td valign=top>";
        echo "<b>" . $todo["id_language"] . "</b>";
        echo "<td valign=top>";
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:template_manager.php


注:本文中的get_db_all_rows_sql函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。