public function ajax_update() { $this->_validate(); $data = array('value_min' => $this->input->post('value_min'), 'value_max' => $this->input->post('value_max'), 'percentage' => $this->input->post('percentage'), 'edited_by' => GetUserID(), 'edited_on' => date('Y-m-d H:i:s')); $this->payroll->update(array('id' => $this->input->post('id')), $data); echo json_encode(array("status" => TRUE)); }
public function ajax_update() { $this->_validate(); $data = array('title' => $this->input->post('title'), 'abbr' => $this->input->post('abbr'), 'level_order' => $this->input->post('level_order'), 'level' => $this->input->post('level'), 'parent_position_group_id' => $this->input->post('parent_position_group_id'), 'description' => $this->input->post('description'), 'edited_on' => date('Y-m-d H:i:s', now()), 'edited_by' => GetUserID()); $this->position_group_model->update(array('id' => $this->input->post('id')), $data); echo json_encode(array("status" => TRUE)); }
public function ajax_update() { //$this->_validate(); $data = array('title' => $this->input->post('title'), 'code' => $this->input->post('code'), 'component_type_id' => $this->input->post('component_type_id'), 'is_annualized' => $this->input->post('is_annualized'), 'tax_component_id' => $this->input->post('tax_component_id'), 'edited_by' => GetUserID(), 'edited_on' => date('Y-m-d H:i:s')); $this->payroll->update(array('id' => $this->input->post('id')), $data); echo json_encode(array("status" => TRUE)); }
public function ajax_update() { $this->_validate(); $data = array('title' => $this->input->post('title'), 'edited_on' => date('Y-m-d H:i:s', now()), 'edited_by' => GetUserID()); $this->empl_status_model->update(array('id' => $this->input->post('id')), $data); echo json_encode(array("status" => TRUE)); }
function validateEncuestaYaCompletada($idEncuesta, $idPregunta, $permiteModificaciones) { if ($permiteModificaciones == "F") { $params = array(":idencuesta" => $idEncuesta, ":idpregunta" => $idPregunta, ":usuario" => GetUserID()); $sql = "SELECT COUNT(*) FROM rrhh.rrp_respuestaspreguntas WHERE rp_idencuesta = :idencuesta AND rp_idpregunta = :idpregunta AND rp_usuario = :usuario"; if (ValorSql($sql, "", $params) > 0) { echo '<span class="Pie">Usted ya ha participado en la encuesta.</span>'; exit; } } }
public function likeAction($id) { $article = new Articles($this->context, $id); if (!isset($article->ID) || $article->ID == null) { $error = 'Статьи не существует.'; } elseif ($article->IsActive != '1') { $error = 'Статья в черновике.'; } else { $userid = GetUserID(); $UnknownUserGUID = GetUnknownUserGUID(); $query = "INSERT INTO ArticleLikes (UserID, ArticleID, UnknownUserGUID) " . "VALUES ({$userid}, {$article->ID}, '{$UnknownUserGUID}');"; $this->db->exec($query); die(1); } die(json_encode(array('error' => $error))); }
function rawlog($message, $type = 's', $loc = "") { global $config; // First determine the name of the current log file. The name is // based on time. $t = UnixTimeNow(); $fbase = "log_" . date("ymd", $t) . ".txt"; $filename = $config["LogDir"] . $fbase; $newfile = !file_exists($filename); $logfile = fopen($filename, "a+"); if ($newfile) { // New file. Write info at top. $line = "#" . date("m/d/Y l") . ' ' . $config["ServerName"] . "\n"; fwrite($logfile, $line); } // Make sure message is an array of lines, and that embedded new-lines are // converted into array elements. $msglines = log_fixmsg($message); // Now, format the first line... $firstline = $msglines[0]; array_shift($msglines); if (empty($type)) { $type = 's'; } $line = '*' . date("H:i:s") . ' ' . substr($type, 0, 1); $line .= sprintf("%3d", GetUserID()); if (empty($loc)) { $page = basename($_SERVER["SCRIPT_NAME"]); } else { $page = $loc; } if (!empty($page)) { $line .= ' ' . $page; } $line .= '> ' . $firstline . "\n"; fwrite($logfile, $line); foreach ($msglines as $line) { fwrite($logfile, '+> ' . $line . "\n"); } fclose($logfile); }
public static function CreateForActualLink($link) { $ob = new self(); $ob->SetAuthorID(GetUserID()); $ob->SetActualLink($link); $random_link = SecretLink::GenerateRandomLink(); do { $old = SecretLink::FetchBy(['select_list' => 'id', 'eq_conds' => ['public_link' => $random_link]]); if (count($old) != 0) { $random_link = SecretLink::GenerateRandomLink(); } else { break; } } while (1); $ob->SetPublicLink($random_link); $res = SecretLink::InsertToDB($ob); if (Error::IsError($res)) { return $res; } return $ob; }
2, hs_idusuario_cambio, ss_idusuario_solicitud) FROM computos.chs_historicosolicitud chs1 WHERE chs1.hs_idsolicitud = ss_id AND chs1.hs_fecha_cambio = (SELECT MAX(chs2.hs_fecha_cambio) FROM computos.chs_historicosolicitud chs2 WHERE chs1.hs_idsolicitud = chs2.hs_idsolicitud AND chs2.hs_idusuario_cambio NOT IN( SELECT se_id FROM art.use_usuarios WHERE se_sector = 'COMPUTOS') AND chs2.hs_idestado = 2)), ss_idusuario_solicitud), ms_nivel) = ".GetUserID().")"); $link = '<a href="index.php?sistema='.$sistema.'&search=yes&pending_auth_tickets=yes" style="text-decoration: none;">'; if ($pending_auth_tickets > 0) { ?> <br /> </p> <p> <font color="#807F84">Ud. tiene</font> <?echo $link;?> <? echo $pending_auth_tickets; ?> </a> <font color="#807F84">tickets pendientes de autorizar. Puede hacer click</font> <?echo $link;?> <font color="#000000">aquí</font><font color="#807F84"> </a> para autorizarlos o rechazarlos.</font></p> <? } ?>
<? require_once($_SERVER["DOCUMENT_ROOT"]."/constants.php"); require_once($_SERVER["DOCUMENT_ROOT"]."/../Common/database/db.php"); require_once($_SERVER["DOCUMENT_ROOT"]."/../Common/miscellaneous/general.php"); SetDateFormatOracle("DD/MM/YYYY HH24:MI:SS"); $params = array(":idusuario" => GetUserID()); $sql = "SELECT no_codigoetica FROM rrhh.rno_notificaciones WHERE no_idusuario = :idusuario"; $fechaAceptacion = ValorSql($sql, "", $params); ?> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40"> <head> <title>..:: CÓDIGO DE VALORES Y CONDUCTA | PROVINCIA A.R.T. ::..</title> <script language="JavaScript"> function disableselect(e) { return false } function reEnable() { return true } //if IE4+ document.onselectstart=new Function ("return false") //if NS6 if (window.sidebar)
public function ajax_update() { //$i = $this->input->post('checkbox1');print_r($i);print_r($this->input->post('job_value_id'));print_mz($this->input->post('value')); $this->_validate(); $session_id = $this->input->post('session'); $id = $this->input->post('id'); $data = array('title' => $this->input->post('title'), 'code' => $this->input->post('code'), 'component_type_id' => $this->input->post('component_type_id'), 'is_annualized' => $this->input->post('is_annualized'), 'tax_component_id' => $this->input->post('tax_component_id'), 'edited_by' => GetUserID(), 'edited_on' => date('Y-m-d H:i:s')); $this->payroll->update(array('id' => $this->input->post('id')), $data); $num_rows = getAll('payroll_component_value', array('payroll_component_id' => 'where/' . $id, 'session_id' => 'where/' . $session_id))->num_rows(); $data2 = array('payroll_component_id' => $id, 'formula' => strtoupper($this->input->post('formula')), 'is_condition' => $this->input->post('is_condition'), 'min' => str_replace(',', '', $this->input->post('min')), 'max' => str_replace(',', '', $this->input->post('max')), 'session_id' => $this->input->post('session')); if ($num_rows > 0) { $this->db->where('payroll_component_id', $id)->where('session_id', $session_id)->update('payroll_component_value', $data2); } else { $this->db->insert('payroll_component_value', $data2); } echo json_encode(array("status" => TRUE)); }
if ($sistema == 3) { $textoHeader = 'Solicitud a Sistemas del Grupo Banco Provincia'; $textoSubHeader = 'Este módulo le permitirá realizar una solicitud a la Gerencia de Sistemas'; } if ($sistema == 4) { $textoHeader = 'Solicitud a Análisis y Control de Gestión'; $textoSubHeader = 'Este módulo le permitirá realizar una solicitud a la Gerencia de Análisis y Control de Gestión'; } ?> <div id="stylized" class="formGeneric" style="font-size:12px; width:500px;"> <form action="ticket_save.php?sistema=<?echo $sistema;?>" id="formSolicitud" name="formSolicitud" method="post" onSubmit="return ValidarFormTicket(formSolicitud)" enctype="multipart/form-data"> <b><?echo $textoHeader;?></b> <br /> <p><?echo $textoSubHeader;?></p> <? $params = array(":idusuario" => GetUserID(), ":idsistema" => $sistema); $sql = "SELECT COUNT(*) FROM computos.css_solicitudsistemas WHERE ss_idestadoactual = 5 AND ss_fechamodif < art.actualdate - 7 AND ss_idusuario_solicitud = :idusuario AND ss_idsistematicket = :idsistema"; $pending_tickets = ValorSQL($sql, "", $params); $link = '<b><a href="index.php?sistema='.$sistema.'&search=yes&pending_tickets=yes" style="text-decoration: none;">'; if ($pending_tickets > 0) { ?> Ud. tiene <?echo $link;?> <? echo $pending_tickets; echo "</a></b>";
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/constants.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/../Common/database/db.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/../Common/database/db_funcs.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/../Common/miscellaneous/general.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/../Common/miscellaneous/send_email.php"; /* Implementación de múltiples sistemas dentro del sistema de tickets */ if (isset($_REQUEST["sistema"])) { $sistema = $_REQUEST["sistema"]; } else { $sistema = 1; } // Guardo la calificación del pedido en la tabla.. $sql = "UPDATE computos.css_solicitudsistemas\n\t\tSET ss_fechamodif = SYSDATE,\n\t\t\t\tss_idusumodif = :idusumodif,\n\t\t\t\tss_idestadoactual = :idestadoactual,\n\t\t\t\tss_idcalificacion = DECODE(:idcalificacion, -1, NULL, :idcalificacion),\n\t\t\t\tss_resuelto = :resuelto,\n\t\t\t\tss_comentarios_usuario = :comentarios\n WHERE ss_id = :id"; $params = array(":idusumodif" => GetUserID(), ":idestadoactual" => 7, ":idcalificacion" => $_REQUEST["calificacion"], ":resuelto" => $_REQUEST["resuelto"], ":comentarios" => $_REQUEST["comentarios"], ":id" => $_REQUEST["id"]); DBExecSql($conn, $sql, $params); ?> <html> <head> <meta http-equiv="Refresh" content="0; url=index.php?sistema=<?echo $sistema; ?>&ticket_detail=yes&id=<?php echo $_REQUEST["id"]; ?> " /> </head> <body> </body> </html>
require_once $_SERVER["DOCUMENT_ROOT"] . "/../Common/miscellaneous/send_email.php"; /* Implementación de múltiples sistemas dentro del sistema de tickets */ if (isset($_REQUEST["sistema"])) { $sistema = $_REQUEST["sistema"]; } else { $sistema = 1; } $estado = 3; // Se setea esta variable que se utiliza en el trigger trg_css_permisosolicitud de la tabla computos.css_solicitudsistemas.. $curs = null; $params = array(":usuario" => GetWindowsLoginName()); $sql = "BEGIN COMPUTOS.GENERAL.v_nombreusuario := UPPER(:usuario); END;"; $stmt = DBExecSP($conn, $curs, $sql, $params, false); // Guardo la autorización del pedido en la tabla.. $sql = "UPDATE computos.css_solicitudsistemas\n SET ss_fechamodif = SYSDATE,\n \t ss_idusumodif = :idusumodif,\n \t ss_idestadoactual = :idestadoactual,\n ss_notas = SUBSTR(ss_notas || CHR(10) || CHR(13) || :comentarios,1,1000),\n ss_observaciones = :comentarios\n WHERE ss_id = :id"; $params = array(":idusumodif" => GetUserID(), ":idestadoactual" => $estado, ":comentarios" => $_REQUEST["comentarios"], ":id" => $_REQUEST["id"]); DBExecSql($conn, $sql, $params); ?> <html> <head> <link href="/styles/style_sistemas.css?sid=<?php echo date('YmdHis'); ?> " rel="stylesheet" type="text/css" /> <meta http-equiv="Refresh" content="0; url=index.php?sistema=<?echo $sistema; ?>&ticket_detail=yes&id=<?php echo $_REQUEST["id"]; ?> " /> </head> <body> Procesando la información añadida...
WHERE se_fechabaja IS NULL AND se_usuariogenerico = 'N' AND se_respondea = NVL(UPPER(:respondea), '') UNION SELECT se_id ID, InitCap(se_nombre) DETALLE, SE_USUARIO IDUSUARIO /* Los empleados de los empleados a cargo */ FROM art.use_usuarios WHERE se_fechabaja IS NULL AND se_usuariogenerico = 'N' AND se_respondea IN (SELECT se_usuario FROM art.use_usuarios WHERE se_fechabaja IS NULL AND se_usuariogenerico = 'N' AND se_respondea = NVL(UPPER(:respondea), '')) ORDER BY 2"; $RCselectedItem = GetUserID(); FillCombo(); $RCfield = "TipoPedido"; $RCparams = array(); $RCquery = "SELECT ms_id ID, ms_descripcion DETALLE FROM computos.cms_motivosolicitud WHERE ms_idpadre = -1 AND ms_visible = 'S' AND ms_fechabaja IS NULL AND ms_id IN (SELECT ms_idpadre FROM computos.cms_motivosolicitud, computos.cts_ticketsector WHERE art.agenda_pkg.is_sectordependiente(ts_idsector, ms_idsectordefault) = 'S' AND ts_idsistematicket = " . $sistema . ") ORDER BY 2"; $RCselectedItem = -1;
function merge_workorders($wo1, $wo2) { $loc = rmabs(__FILE__ . ".merge_workorders"); $wid1 = $wo1["WID"]; $wid2 = $wo2["WID"]; $wo1["Description"] .= "\n\n" . $wo2["Description"]; UpdateWorkOrder($wid1, $wo1); $data = GetAppendedData($wid2); $nd = 0; foreach ($data as $d) { if ($d["UserID"] == 0) { continue; } // Skip sys generated msg. if ($d["Removed"]) { continue; } // Skip deleted data. AppendWorkOrderData($wid1, $d["UserID"], $d["TextInfo"], $d["PicID"], false); $nd++; } $workers = GetAssignedWorkers($wid2); $nw = 0; foreach ($workers as $w) { MakeAssignment($wid1, $w["UserID"]); RemoveAssignment($wid2, $w["UserID"]); $nw++; } $userid = GetUserID(); $userinfo = GetUserInfo($userid); $username = MakeFullName($userinfo); if (!$wo2["Closed"]) { ChangeWOStatus($wid2, $username, "Closed", true); } $newwostr = WIDStr($wid1, $wo1["Revision"], $wo1["IsApproved"]); AttachSystemNote($wid2, "This WO Merged into " . $newwostr . " by " . $username . '.'); $oldwostr = WIDStr($wid2, $wo2["Revision"], $wo2["IsApproved"]); AttachSystemNote($wid1, "Data from " . $oldwostr . " merged into this one by " . $username . '.'); $msg = 'Workorder ' . $oldwostr . ' merged into ' . $newwostr . '. '; $msg .= 'Number Items Copied=' . $nd . '. '; $msg .= 'Number of Workers Reassigned=' . $nw . '. '; log_msg($loc, array($msg, "By " . $username)); return $msg; }
} try { $_POST["motivo" . $_POST["valor"]] = trim($_POST["motivo" . $_POST["valor"]]); if (!validar()) { exit; } $params = array(":fase" => $_POST["fase"], ":idvotante" => GetUserID(), ":valor" => $_POST["valor"]); $sql = "SELECT 1\n\t\t\t FROM rrhh.rjo_jjoo2012\n\t\t\tWHERE jo_idvotante = :idvotante\n\t\t\t\tAND jo_valor = :valor\n\t\t\t\tAND jo_fase = :fase"; if (!ExisteSql($sql, $params)) { // Alta $params = array(":fase" => $_POST["fase"], ":idvotante" => GetUserID(), ":motivo" => substr($_POST["motivo" . $_POST["valor"]], 0, 2048), ":valor" => $_POST["valor"], ":votado" => $_POST["usuarios" . $_POST["valor"]]); $sql = "INSERT INTO rrhh.rjo_jjoo2012\n\t\t\t\t\t\t\t\t\t(jo_fase, jo_fechaalta, jo_idvotante, jo_motivo, jo_valor, jo_votado)\n\t\t\t\t\t VALUES (:fase, SYSDATE, :idvotante, :motivo, :valor, :votado)"; DBExecSql($conn, $sql, $params); } else { // Modificación.. $params = array(":fase" => $_POST["fase"], ":idvotante" => GetUserID(), ":motivo" => substr($_POST["motivo" . $_POST["valor"]], 0, 2048), ":valor" => $_POST["valor"], ":votado" => $_POST["usuarios" . $_POST["valor"]]); $sql = "UPDATE rrhh.rjo_jjoo2012\n\t\t\t\t\tSET jo_fechamodif = SYSDATE,\n\t\t\t\t\t\t\tjo_motivo = :motivo,\n\t\t\t\t\t\t\tjo_votado = :votado\n\t\t\t\tWHERE jo_idvotante = :idvotante\n\t\t\t\t\tAND jo_valor = :valor\n\t\t\t\t\tAND jo_fase = :fase"; DBExecSql($conn, $sql, $params); } } catch (Exception $e) { DBRollback($conn); echo "<script>alert(unescape('" . rawurlencode($e->getMessage()) . "'));</script>"; exit; } ?> <script> function ocultarOk() { window.parent.document.getElementById('voto<?php echo $_POST["valor"]; ?> Ok').style.display = 'none';
<? } $valoresInformacion = array(11); $valoresCalificacion = array(5); $valoresAutorizacion = array(2); // Muestro el botón de calificar solo si corresponde... if (in_array($row["SS_IDESTADOACTUAL"], $valoresInformacion) and ($usu_soli == GetUserID())) { ?> <button type="submit" class="btnAction" onClick="submitFormTicket('&information=yes');">Añadir información</button> <? } // Muestro el botón de calificar solo si corresponde... if (in_array($row["SS_IDESTADOACTUAL"], $valoresCalificacion) and ($usu_soli == GetUserID())) { ?> <button type="submit" class="btnAction" onClick="submitFormTicket('&qualification=yes');">Calificar ahora</button> <? } // Muestro el botón de autorizar solo si corresponde... else if (in_array($row["SS_IDESTADOACTUAL"], $valoresAutorizacion) and ($showAuthorizationButton)) { ?> <button type="button" class="btnAction" onClick="submitFormTicket('&authorize=S');">Autorizar</button> <button type="button" class="btnAction" onClick="submitFormTicket('&authorize=N');">Rechazar</button> <? } // Muestro el botón atrás sólo si me viene por parámetro...
FROM computos.cps_permisosolicitud WHERE ps_idsolicitud = ss_id AND ps_fechaautorizacion IS NULL) AND computos.general.get_usuarioresponsable(NVL((SELECT DECODE(hs_idestado, 2, hs_idusuario_cambio, ss_idusuario_solicitud) FROM computos.chs_historicosolicitud chs1 WHERE chs1.hs_idsolicitud = ss_id AND chs1.hs_fecha_cambio = (SELECT MAX(chs2.hs_fecha_cambio) FROM computos.chs_historicosolicitud chs2 WHERE chs1.hs_idsolicitud = chs2.hs_idsolicitud AND chs2.hs_idusuario_cambio NOT IN(SELECT usuario.se_id FROM art.use_usuarios usuario WHERE usuario.se_sector = 'COMPUTOS') AND chs2.hs_idestado = 2)), ss_idusuario_solicitud), motivooriginal.ms_nivel + 10) = ".GetUserID()." AND ss_fecha_carga > TRUNC(SYSDATE) - 365 AND ss_idusuario_solicitud = usuarios.se_id ".$where; } $sql = $sql." ORDER BY ss_fecha_carga desc "; set_time_limit(100); $grilla = new Grid(array("", "N° de Ticket", "Fecha", "Motivo", "Detalle", "Estado", "Pedido por", ""), array(8, 0, 0, 0, 0, 0, 0, -1), array("btnTicket", "", "", "", "", "", "", ""), array("index.php?sistema=".$sistema."&ticket_detail=yes&all_tickets=".$all_tickets."&pending_tickets=". $pending_tickets."&back_button=". $back_button."&close_button=". $close_button, "", "", "", "", "", "", "")); $grilla = new Grid();
$content = AlertMessage('alert-danger', Language::Word('access denied')); break; } } if ($content_type === 'received_reps') { $title .= ' :' . Language::Word('received reports'); } else { if ($content_type === 'sended_reps') { $title .= ' :' . Language::Word('sended reports'); } else { $title .= ' :' . Language::Word('all reports'); } } $header = $title; $reports = array(); $user = User::FetchBy(['select_list' => 'id, received_reports, sended_reports', 'eq_conds' => ['id' => GetUserID()], 'is_unique' => true]); $size = 0; $received = array(); $sended = array(); if ($content_type === 'received_reps') { $received = $user->GetReceivedReports(); $size = count($received); } else { if ($content_type === 'sended_reps') { $sended = $user->GetSendedReports(); $size = count($sended); } else { $size = Report::GetCount(); } } if ($size) {
require_once($_SERVER["DOCUMENT_ROOT"]."/constants.php"); require_once($_SERVER["DOCUMENT_ROOT"]."/../Common/miscellaneous/general.php"); for ($i=0; $i<=4; $i++) if (isset($_REQUEST["opcion".$i])) { $observaciones = ""; if (isset($_REQUEST["Observacion".$_REQUEST["opcion".$i]])) $observaciones = $_REQUEST["Observacion".$_REQUEST["opcion".$i]]; $sql = "INSERT INTO rrhh.rrp_respuestaspreguntas (rp_idencuesta, rp_idpregunta, rp_idopcion, rp_usuario, rp_fechaalta, rp_observaciones) VALUES (:idencuesta, :idpregunta, :idopcion, :usuario, SYSDATE, :observaciones)"; $params = array(":idencuesta" => 1, ":idpregunta" => $_REQUEST["pregunta".$i], ":idopcion" => $_REQUEST["opcion".$i], ":usuario" => GetUserID(), ":observaciones" => $observaciones); DBExecSql($conn, $sql, $params); } if ($dbError["offset"]) { ?> <script> alert('<?= $dbError["message"]?>'); </script> <? } else header("Refresh: 0; url=/modules/encuestas/snacks/index.php?std=f"); // estado=fin.. ?>
<?php // -------------------------------------------------------------------- // wo_new.php -- Adds a new work order. // // Created: 12/31/15 DLB // -------------------------------------------------------------------- require_once "../maindef.php"; $loc = rmabs(__FILE__); session_start(); log_page(); CheckLogin(); $timer = new timer(); $error_msg = ""; $success_msg = ""; $userid = GetUserID(); $username = GetUserName(); $userIPT = GetUserIPT($userid); $doform = false; $link_to_view = false; $picid = 0; $param_list = array(array("FieldName" => "Title", "FieldType" => "Text", "Caption" => "Title of New Work Order"), array("FieldName" => "Project", "FieldType" => "Selection", "Selection" => $WOProjects, "Caption" => "Project"), array("FieldName" => "DateNeedBy", "FieldType" => "Date", "Caption" => "Date Needed"), array("FieldName" => "Priority", "FieldType" => "Selection", "Selection" => $WOPriorities, "Caption" => "Priority"), array("FieldName" => "Requestor", "FieldType" => "Selection", "Selection" => $WOIPTeams, "Caption" => "Requesting IPT"), array("FieldName" => "Receiver", "FieldType" => "Selection", "Selection" => $WOIPTeams, "Caption" => "Receiving IPT"), array("FieldName" => "Description", "FieldType" => "TextArea", "Rows" => 10, "Columns" => 72, "Caption" => "Describe Work")); if ($_SERVER["REQUEST_METHOD"] == "GET") { // Set up defaults... $data["Priority"] = $WOPriorities[0]; $data["Requestor"] = $userIPT; $data["Receiver"] = $userIPT; $data["DateNeedBy"] = date('Y-m-d', time() + 5 * 24 * 3600); PopulateParamList($param_list, $data); $doform = true; goto GenerateHtml;
public static function InsertToDB($request) { global $db_connection; global $link_to_report_images; global $link_to_report_files; $author_id = $db_connection->real_escape_string($request->author_id); $name = $db_connection->real_escape_string($request->name); $res = $db_connection->query("INSERT INTO `" . self::$table . "` (`author_id`, `name`) VALUES ('" . $author_id . "', '" . $name . "')"); if (!$res) { echo $db_connection->error; return false; } $id = $db_connection->insert_id; $request->text_block = preg_replace('/tmp_(\\d+)\\//', $id . '/', $request->text_block); $text_block = $db_connection->real_escape_string($request->text_block); $res = $db_connection->query("UPDATE `" . self::$table . "` SET `text_block`=\"" . $text_block . "\" WHERE `id`=" . $id); if (!$res) { echo $db_connection->error; $db_connection->query("DELETE FROM `" . self::$table . "` WHERE `id` = " . $id); return false; } $request->id = $id; $upload_path = ''; recurse_copy($link_to_report_images . 'tmp_' . GetUserID(), $link_to_report_images . $id); recurse_copy($link_to_report_files . 'tmp_' . GetUserID(), $link_to_report_files . $id); $receiver_emails = []; foreach ($request->recipient_ids as $key => $aim) { $received = User::FetchBy(['select_list' => 'received_reports, email', 'is_unique' => true, 'eq_conds' => ['id' => $aim]]); if (Error::IsError($received)) { echo Error::ToString($received); return false; } $tmp = $received->GetReceivedReports(); array_push($tmp, $id . ''); $rc = $db_connection->query("UPDATE users SET received_reports = '" . $db_connection->real_escape_string(json_encode($tmp)) . "' WHERE id = " . $aim); if (!$rc) { echo $db_connection->error; return false; } array_push($receiver_emails, $received->GetEmail()); } $sended = User::FetchBy(['select_list' => 'sended_reports', 'is_unique' => true, 'eq_conds' => ['id' => $request->GetAuthorID()]]); if (Error::IsError($sended)) { echo Error::ToString($sended); return false; } $tmp = $sended->GetSendedReports(); array_push($tmp, $id . ''); $rc = $db_connection->query("UPDATE users SET sended_reports = '" . $db_connection->real_escape_string(json_encode($tmp)) . "' WHERE id = " . $request->GetAuthorID()); if (!$rc) { echo $db_connection->error; return false; } $receiver_emails = array_unique($receiver_emails); foreach ($receiver_emails as $key => $email) { $subject = 'New report on lgmis.cs.msu.ru'; $message = '<html>'; $message .= '<head><title>New report from on your name</title></head>'; $message .= '<body>'; $message .= '<table width="100%" align="center">'; $message .= '<tr><td>You can see more information about this report: <a href="' . $request->ToHTMLFullVersLite() . '">go on site</a></td></tr>'; $message .= '</table>'; $message .= '</body>'; $message .= '</html>'; $headers = 'From: LGMIS Admin <*****@*****.**>' . PHP_EOL . 'Reply-To: <*****@*****.**>' . PHP_EOL . 'X-Mailer: PHP/' . phpversion() . 'MIME-Version: 1.0' . PHP_EOL . 'Content-type: text/html; charset=UTF-8' . PHP_EOL; if (!mail($email, $subject, $message, $headers, '-f no-reply@lgmis.cs.msu.ru')) { echo 'error:' . error_get_last(); return false; } } return true; }
<tr> <td height="20"></td> </tr> <tr> <td class="Txt"> <p><img src="images/entusiasmo.jpg"></p> <p style="padding-left:15px; padding-right:20px">La persona entusiasta muestra actitud en la consecución de los objetivos. Motiva y brinda aliento a los demás para alcanzar las metas propias y de la organización. Siempre tiene “buena onda” y ve la parte positiva de las cosas. En los momentos difíciles, es el que mantiene la entereza y busca la unión del grupo para superar los inconvenientes.</p> </td> </tr> <tr> <td height="10"></td> </tr> <tr> <td class="Txt" style="padding-left:20px"> <? $params = array(":idvotante" => GetUserID()); $sql = "SELECT jo_motivo, jo_votado FROM rrhh.rjo_jjoo2012 WHERE jo_idvotante = :idvotante AND jo_valor = 'N' AND jo_fase = 2"; $stmt = DBExecSql($conn, $sql, $params); $rowN = DBGetQuery($stmt); ?> <form action="/modules/olimpiadas_londres2012/procesar_voto.php" id="formEntusiasmo" method="post" name="formEntusiasmo" target="iframeProcesando"> <input id="fase" name="fase" type="hidden" value="2" /> <input id="valor" name="valor" type="hidden" value="N" /> <table cellpadding="1" cellspacing="1" align="left"> <tr> <td><select id="usuariosN" name="usuariosN" style="border:1px solid #676767; color:#676767; font-size:9pt; font-family:Neo Sans; margin-right:8px; padding-bottom:1px; padding-left:4px; padding-right:4px; padding-top:1px;"></select></td>
include_once 'utility_lgmis_lib.php'; include_once $link_to_utility_authorization; clear_tmp_files_dir(MyFile::$type, 0); $perms = MyFile::perm_to_only_empls; $user = User::FetchBy(['select_list' => 'position', 'eq_conds' => ['id' => GetUserID()], 'is_unique' => true]); if ($user->GetPositionNum() == NotEmployeeNum) { $perms = MyFile::perm_to_all_registered; } $header = ''; $content = ''; $footer = ''; if ($perms > MyFile::perm_to_all_registered) { $head_addition = '<script type="text/javascript" src="js/files_upload.js"></script>'; } $head_addition .= '<script type="text/javascript" src="js/file_manager.js"></script>'; $head_addition .= MakeScript('files_type="' . MyFile::$type . '"; author_id=' . GetUserID() . '; max_files=10; files_action="add";'); $content .= '<div style="display: table; width: 100%; height: 80%;">'; $content .= '<div class="row" style="height: 100%; display: table-row;">'; $col_width = 8; if ($perms <= MyFile::perm_to_all_registered) { $col_width = 12; } $content .= '<div class="' . ColAllTypes($col_width) . ' modal-open" style="border: 3px solid #dadada; display: table-cell; float: none;">'; $content .= '<ol class="breadcrumb" id="current_manager_path" align="left">'; $content .= '<li><a href="#" onclick="goUpDir(0);">Home</a></li>'; $content .= '</ol>'; $content .= '<div class="row" id="files_place"></div>'; $content .= '<div id="file_backdrop_area" align="center"></div>'; $content .= '</div>'; if ($perms > MyFile::perm_to_all_registered) { $content .= '<div id="files_area" class="' . ColAllTypes(4) . '" style="border: 3px dashed #dadada; display: table-cell; float: none;">';
function delete() { $webmaster_id = permission(); $data = array(); $exp = explode("-", $this->input->post('del_id')); foreach ($exp as $r) { if ($r) { $data[] = $r; //Admin Log //$logs = "DELETE from ".$this->tabel." where id='".$r."'"; //$this->model_admin_all->LogActivities($webmaster_id,$this->tabel,$r,$logs,lang($this->filename),'',$this->filename,"Delete"); $q = GetAll($this->tabel, array("id" => "where/" . $r)); $r = $q->result_array(); $data_ins = array("id_employee" => $r[0]['id'], "create_date" => date("Y-m-d H:i:s"), "modify_date" => date("Y-m-d H:i:s"), "create_user_id" => GetUserID(), "modify_user_id" => GetUserID()); $this->db->insert("exitmng", $data_ins); } } //$this->db->where_in($this->id_primary, $data); //$this->db->delete($this->tabel); $this->db->where_in($this->id_primary, $data); $this->db->update($this->tabel, array("is_active" => "InActive", "modify_date" => date("Y-m-d H:i:s"), "modify_user_id" => GetUserID())); $this->session->set_flashdata("message", lang('delete') . " " . count($data) . " " . lang($this->filename) . " " . lang('msg_sukses')); }
function SavePref($PrefName, $PrefValue) { if (!IsLoggedIn()) { DieWithMsg("userlib.php->SavePref", "Call to SavePref while not logged in."); } if (!isset($_SESSION["Prefs"])) { DieWithMsg("userlib.php->SavePref", '$_SESSION["Prefs"] Not set!'); } $_SESSION["Prefs"][$PrefName] = $PrefValue; SavePrefsForUser(GetUserID(), $_SESSION["Prefs"]); }
// Se setea esta variable que se utiliza en el trigger trg_css_permisosolicitud de la tabla computos.css_solicitudsistemas.. $curs = null; $sql = "BEGIN COMPUTOS.GENERAL.v_nombreusuario := UPPER(:usuario); END;"; $params = array(":usuario" => GetWindowsLoginName()); $stmt = DBExecSP($conn, $curs, $sql, $params, false); // Doy de alta el ticket... $sql = "INSERT INTO computos.css_solicitudsistemas (ss_id, ss_idusuario_carga, ss_fecha_solicitud, ss_idusuario_solicitud, ss_fecha_carga, ss_idsector_asignado, ss_idequipo, ss_idestadoactual, ss_idmotivosolicitud, ss_notas, ss_observaciones, ss_prioridad ".$campoEjecutable.", ss_presencial, ss_indicaciones) VALUES (:id, :idusuario, ART.ACTUALDATE, :idusuariosolicitud, SYSDATE, :idsectorasignado, :idequipo, :idestadoactual, :idmotivosolicitud, :notas, :observaciones, :prioridad".$valorEjecutable.", :presencial, :indicaciones)"; $params = array(":id" => $id, ":idusuario" => GetUserID(), ":idusuariosolicitud" => $_REQUEST["UsuarioSolicitud"], ":idsectorasignado" => $idSectorAsignado, ":idequipo" => $idEquipo, ":idestadoactual" => $id_estado, ":idmotivosolicitud" => $_REQUEST["DetallePedido"], ":notas" => $_REQUEST["notas"], ":observaciones" => $user, ":prioridad" => $_REQUEST["Prioridad"], ":presencial" => "N", ":indicaciones" => NULL); DBExecSql($conn, $sql, $params); if (count($_FILES) > 0) { MakeDirectory(ATTACHMENTS_PATH.$id); }
$content .= 'allowedContent: true, });'; $content .= 'CKEDITOR.config.height = 400;'; $content .= '</script>'; $content .= '<div class="row">'; $content .= DialogInputsYesNo('edit', $_POST['type'], $ob_id, Language::Word('save'), Language::Word('cancel')); $content .= '</div>'; $content .= '</form>'; $title = Language::Word('report editing'); $header = $title; } } else { if (!isset($_REQUEST['id'])) { echo 'user id is unset'; exit; } $ob = Report::FetchBy(['eq_conds' => ['id' => $_REQUEST['id']], 'is_unique' => true]); $user_id = GetUserID(); $user = User::FetchBy(['eq_conds' => ['id' => $user_id], 'is_unique' => true, 'select_list' => 'received_reports']); if ($user_id !== $ob->GetAuthorID() && !in_array($ob->GetID(), $user->GetReceivedReports()) && GetUserPrivileges() !== admin_user_id) { $content = AlertMessage('alert-danger', Language::Word('access denied')); } else { $title = ''; $header = ''; $content = ''; $title = Language::Word('report'); $header = htmlspecialchars($ob->GetName()); $content = $ob->ToHTMLAutoFull(GetUserPrivileges()); } } } include_once $link_to_admin_template;
function GrillaPedidos($all_tickets, $pending_tickets, $pending_moreinfo_tickets, $pending_auth_tickets, $numeroTicket, $fechaDesde, $fechaHasta, $ss_notas, $PlanAccion, $TipoPedido, $DetallePedido, $employees, $sistema, $back_button, $close_button, $pagina, $MNUselect) { if ($all_tickets != "yes") { $where = " AND ss_idestadoactual in (1,2,3,4,5,9,10,11) "; } else { $where = " AND ss_idestadoactual in (6,7,8) "; } if ($pending_tickets == "yes") { $employees = "no"; $where = " AND ss_idestadoactual = 5 "; } if ($pending_moreinfo_tickets == "yes") { $where = " AND ss_idestadoactual = 11 "; } if ($pending_auth_tickets == "yes") { $where = " AND ss_idestadoactual = 2 "; } if ($numeroTicket != "") { $where = " AND ss_nro_ticket = " . $numeroTicket; } //----------------------NUEVOS-FILTROS--------------------------------------------------------------- if ($pending_tickets == "no") { if ($fechaDesde != "" and $fechaHasta != "") { //$fechaDesde = date("d-m-Y", strtotime($fechaDesde)); //$fechaHasta = date("d-m-Y", strtotime($fechaHasta)); $where .= " AND ss_fecha_solicitud >= TO_DATE('" . $fechaDesde . "', 'DD/MM/YYYY') "; $where .= " AND ss_fecha_solicitud <= TO_DATE('" . $fechaHasta . "', 'DD/MM/YYYY') "; } if (trim($ss_notas) != '') { $where .= " AND UPPER(ss_notas) like UPPER('%" . trim($ss_notas) . "%') "; } if (trim($PlanAccion) != '') { $where .= $PlanAccion; } if (intval($TipoPedido) > 0) { $where .= " AND motivodetalle.ms_id = " . $TipoPedido . " "; } if (intval($DetallePedido) > 0) { $where .= " AND motivooriginal.ms_id = " . $DetallePedido . " "; } } //-------------------------------------------------------------------------------------- $where = $where . " AND ss_idsistematicket = " . $sistema; /*GetWindowsLoginName = GetUsuarioAplicacion */ $sql = "SELECT /*+ INDEX(css_solicitudsistemas NDX_CSS_GRILLAWEB)*/\n\t\t\t\t\t [ss_id], ss_nro_ticket as [nro_ticket], TO_CHAR(ss_fecha_solicitud, 'DD/MM/YYYY') [fecha_solicitud],\n\t\t\t\t\t motivodetalle.ms_descripcion [motivo], motivooriginal.ms_descripcion [detalle],\n\t\t\t\t\t es_descripcion [estado], [se_nombre], [ss_fecha_carga], [ss_notas]\n\t\t\t\tFROM art.use_usuarios usuarios, computos.cse_sector sector, computos.cms_motivosolicitud motivooriginal,\n\t\t\t\t\t computos.cms_motivosolicitud motivodetalle, computos.ces_estadosolicitud,\n\t\t\t\t\t computos.css_solicitudsistemas\n\t\t\t WHERE usuarios.se_idsector = sector.se_id(+)\n\t\t\t\t AND usuarios.se_usuario = UPPER('" . GetUsuarioAplicacion() . "')\n\t\t\t\t AND ss_idmotivosolicitud = motivooriginal.ms_id\n\t\t\t\t AND motivooriginal.ms_idpadre = motivodetalle.ms_id\n\t\t\t\t AND ss_idestadoactual = es_id\n\t\t\t\t AND ss_idusuario_solicitud = usuarios.se_id " . $where; if ($pending_auth_tickets == "yes" or $employees == "yes") { $sql = $sql . " UNION ALL\n SELECT /*+ INDEX(css_solicitudsistemas NDX_CSS_GRILLAWEB)*/\n ss_id, ss_nro_ticket AS nro_ticket, TO_CHAR(ss_fecha_solicitud, 'DD/MM/YYYY') fecha_solicitud,\n motivodetalle.ms_descripcion motivo, motivooriginal.ms_descripcion detalle, es_descripcion estado, se_nombre,\n ss_fecha_carga, ss_notas\n FROM art.use_usuarios usuarios, computos.cse_sector sector, computos.cms_motivosolicitud motivooriginal,\n computos.cms_motivosolicitud motivodetalle, computos.ces_estadosolicitud, computos.css_solicitudsistemas\n WHERE usuarios.se_idsector = sector.se_id(+)\n AND ss_idmotivosolicitud = motivooriginal.ms_id\n AND motivooriginal.ms_idpadre = motivodetalle.ms_id\n AND ss_idestadoactual = es_id\n AND (SELECT gerente.se_id\n FROM art.use_usuarios gerente\n WHERE gerente.se_usuario = (SELECT jefe.se_respondea\n FROM art.use_usuarios jefe\n WHERE jefe.se_id = computos.general.get_usuarioresponsable(NVL((SELECT DECODE(hs_idestado, 2, hs_idusuario_cambio, ss_idusuario_solicitud)\n FROM computos.chs_historicosolicitud chs1\n WHERE chs1.hs_idsolicitud = ss_id\n AND chs1.hs_fecha_cambio =\n (SELECT MAX(chs2.hs_fecha_cambio)\n FROM computos.chs_historicosolicitud chs2\n WHERE chs1.hs_idsolicitud = chs2.hs_idsolicitud\n AND chs2.hs_idusuario_cambio NOT IN(SELECT usuario.se_id\n FROM art.use_usuarios usuario\n WHERE usuario.se_sector = 'COMPUTOS')\n AND chs2.hs_idestado = 2)),\n ss_idusuario_solicitud),\n motivooriginal.ms_nivel + 10))) = " . GetUserID() . "\n AND ss_idusuario_solicitud = usuarios.se_id " . $where . "\n AND ss_fecha_carga > TRUNC(SYSDATE) - 365\n UNION\n SELECT /*+ INDEX(css_solicitudsistemas NDX_CSS_GRILLAWEB)*/\n ss_id, ss_nro_ticket AS nro_ticket, TO_CHAR(ss_fecha_solicitud, 'DD/MM/YYYY') fecha_solicitud,\n motivodetalle.ms_descripcion motivo, motivooriginal.ms_descripcion detalle, es_descripcion estado, se_nombre,\n ss_fecha_carga, ss_notas\n FROM art.use_usuarios usuarios, computos.cse_sector sector, computos.cms_motivosolicitud motivooriginal,\n computos.cms_motivosolicitud motivodetalle, computos.ces_estadosolicitud, computos.css_solicitudsistemas\n WHERE art.usuarios.se_idsector = sector.se_id(+)\n AND ss_idmotivosolicitud = motivooriginal.ms_id\n AND motivooriginal.ms_idpadre = motivodetalle.ms_id\n AND ss_idestadoactual = es_id\n AND usuarios.se_id = ss_idusuario_solicitud\n AND EXISTS(SELECT 1\n FROM computos.cps_permisosolicitud\n WHERE ps_idsolicitud = ss_id\n AND ps_fechaautorizacion IS NULL\n AND ps_idusuario = " . GetUserID() . ")" . $where . " UNION \n SELECT /*+ INDEX(css_solicitudsistemas NDX_CSS_GRILLAWEB)*/\n ss_id, ss_nro_ticket AS nro_ticket, TO_CHAR(ss_fecha_solicitud, 'DD/MM/YYYY') fecha_solicitud,\n motivodetalle.ms_descripcion motivo, motivooriginal.ms_descripcion detalle, es_descripcion estado, se_nombre,\n ss_fecha_carga, ss_notas\n FROM art.use_usuarios usuarios, computos.cse_sector sector, computos.cms_motivosolicitud motivooriginal,\n computos.cms_motivosolicitud motivodetalle, computos.ces_estadosolicitud, computos.css_solicitudsistemas\n WHERE usuarios.se_idsector = sector.se_id(+)\n AND ss_idmotivosolicitud = motivooriginal.ms_id\n AND motivooriginal.ms_idpadre = motivodetalle.ms_id\n AND ss_idestadoactual = es_id\n AND NOT EXISTS(SELECT 1\n FROM computos.cps_permisosolicitud\n WHERE ps_idsolicitud = ss_id\n AND ps_fechaautorizacion IS NULL)\n AND computos.general.get_usuarioresponsable(NVL((SELECT DECODE(hs_idestado, 2, hs_idusuario_cambio, ss_idusuario_solicitud)\n FROM computos.chs_historicosolicitud chs1\n WHERE chs1.hs_idsolicitud = ss_id\n AND chs1.hs_fecha_cambio =\n (SELECT MAX(chs2.hs_fecha_cambio)\n FROM computos.chs_historicosolicitud chs2\n WHERE chs1.hs_idsolicitud = chs2.hs_idsolicitud\n AND chs2.hs_idusuario_cambio NOT IN(SELECT usuario.se_id\n FROM art.use_usuarios usuario\n WHERE usuario.se_sector = 'COMPUTOS')\n AND chs2.hs_idestado = 2)),\n ss_idusuario_solicitud),\n motivooriginal.ms_nivel + 10) = " . GetUserID() . "\n AND ss_fecha_carga > TRUNC(SYSDATE) - 365\n AND ss_idusuario_solicitud = usuarios.se_id " . $where; } $sql = $sql . " ORDER BY ss_fecha_carga desc "; $sql = ReemplazaCorchetesQRY($sql); set_time_limit(100); $grilla = new gridAjax(); $psistema = $sistema; $urlIndex = "index.php?sistema=" . $psistema . "&MNU=" . $MNUselect . "&ticket_detail=yes&all_tickets=" . $all_tickets . "&pending_tickets=" . $pending_tickets . "&back_button=" . $back_button . "&close_button=" . $close_button; $grilla->addColumn(new columnAjax("", 8, TRUE, FALSE, 9, "btnTicket", $urlIndex, "gridFirstColumn")); $grilla->addColumn(new columnAjax("Num. de Ticket")); $grilla->addColumn(new columnAjax("Fecha")); $grilla->addColumn(new columnAjax("Motivo")); $grilla->addColumn(new columnAjax("Detalle")); $grilla->addColumn(new columnAjax("Estado")); $grilla->addColumn(new columnAjax("Pedido por")); $grilla->addColumn(new columnAjax("", 0, FALSE)); $grilla->addColumn(new columnAjax("", 0, FALSE)); $grilla->setColsSeparator(TRUE); $grilla->setPageNumber($pagina); $grilla->setRowsSeparator(TRUE); $grilla->SetFooterSelected('GIgridFooterFontSelected'); $grilla->setShowTotalRegistros(TRUE); $grilla->setSql($sql); //$grilla->SetCurrentURL($urlIndex.'&id='.$grilla->GetLastID() ); $grilla->SetCurrentURL($urlIndex . '&id=227'); $grilla->setFuncionAjaxJS("BuscarPedidos"); return $grilla; }