mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
2011-02-17 Miguel de Dios <miguel.dedios@artica.es>
* operation/agentes/estado_agente.php: fixed the re-apply the safe_input in the search. Fixes: #3184647 * include/functions_db.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3899 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
810516479a
commit
67968de9b6
@ -1,3 +1,12 @@
|
|||||||
|
2011-02-17 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* operation/agentes/estado_agente.php: fixed the re-apply the safe_input in
|
||||||
|
the search.
|
||||||
|
|
||||||
|
Fixes: #3184647
|
||||||
|
|
||||||
|
* include/functions_db.php: cleaned source code style.
|
||||||
|
|
||||||
2011-02-17 Ramon Novoa <rnovoa@artica.es>
|
2011-02-17 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* include/functions.php: Hide custom SQL reports from non PM users
|
* include/functions.php: Hide custom SQL reports from non PM users
|
||||||
|
@ -605,6 +605,7 @@ function get_group_agents ($id_group = 0, $search = false, $case = "lower", $noA
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sql = sprintf ("SELECT id_agente, nombre FROM tagente %s ORDER BY nombre", $search_sql);
|
$sql = sprintf ("SELECT id_agente, nombre FROM tagente %s ORDER BY nombre", $search_sql);
|
||||||
|
|
||||||
$result = get_db_all_rows_sql ($sql);
|
$result = get_db_all_rows_sql ($sql);
|
||||||
|
|
||||||
if ($result === false)
|
if ($result === false)
|
||||||
@ -613,14 +614,15 @@ function get_group_agents ($id_group = 0, $search = false, $case = "lower", $noA
|
|||||||
$agents = array ();
|
$agents = array ();
|
||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
switch ($case) {
|
switch ($case) {
|
||||||
case "lower":
|
case "lower":
|
||||||
$agents[$row["id_agente"]] = mb_strtolower ($row["nombre"], "UTF-8");
|
$agents[$row["id_agente"]] = mb_strtolower ($row["nombre"], "UTF-8");
|
||||||
break;
|
break;
|
||||||
case "upper":
|
case "upper":
|
||||||
$agents[$row["id_agente"]] = mb_strtoupper ($row["nombre"], "UTF-8");
|
$agents[$row["id_agente"]] = mb_strtoupper ($row["nombre"], "UTF-8");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$agents[$row["id_agente"]] = $row["nombre"];
|
$agents[$row["id_agente"]] = $row["nombre"];
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ($agents);
|
return ($agents);
|
||||||
|
@ -82,7 +82,7 @@ if (is_ajax ()) {
|
|||||||
|
|
||||||
// Take some parameters (GET)
|
// Take some parameters (GET)
|
||||||
$group_id = (int) get_parameter ("group_id", 0);
|
$group_id = (int) get_parameter ("group_id", 0);
|
||||||
$search = get_parameter ("search", "");
|
$search = safe_output(get_parameter ("search", ""));
|
||||||
$offset = get_parameter('offset', 0);
|
$offset = get_parameter('offset', 0);
|
||||||
$refr = get_parameter('refr', 0);
|
$refr = get_parameter('refr', 0);
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ print_submit_button (__('Search'), "srcbutton", '', array ("class" => "sub searc
|
|||||||
echo '</td><td style="width:40%;"> </td></tr></table></form>';
|
echo '</td><td style="width:40%;"> </td></tr></table></form>';
|
||||||
|
|
||||||
if ($search != ""){
|
if ($search != ""){
|
||||||
$filter = array ("string" => '%'.$search.'%');
|
$filter = array ("string" => '%' . $search . '%');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$filter = array ();
|
$filter = array ();
|
||||||
@ -215,11 +215,13 @@ switch ($sortField) {
|
|||||||
if ($group_id > 0) {
|
if ($group_id > 0) {
|
||||||
$groups = $group_id;
|
$groups = $group_id;
|
||||||
$agent_names = get_group_agents ($group_id, $filter, "upper");
|
$agent_names = get_group_agents ($group_id, $filter, "upper");
|
||||||
// Not selected any specific group
|
}
|
||||||
} else {
|
else {
|
||||||
$user_group = get_user_groups ($config["id_user"], "AR");
|
// Not selected any specific group
|
||||||
$groups = array_keys ($user_group);
|
|
||||||
$agent_names = get_group_agents (array_keys ($user_group), $filter, "upper");
|
$user_group = get_user_groups($config["id_user"], "AR");
|
||||||
|
$groups = array_keys($user_group);
|
||||||
|
$agent_names = get_group_agents(array_keys ($user_group), $filter, "upper");
|
||||||
}
|
}
|
||||||
|
|
||||||
$total_agents = 0;
|
$total_agents = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user