} $j++; $limite = 30; $shortBody = trim($rowMail['mhist_body']); if (strlen($shortBody) > $limite) { $shortBody = substr($shortBody, 0, $limite - 4) . "..."; } print "<tr class=" . $trClass . " id='imglinhax" . $j . "' onMouseOver=\"destaca('imglinhax" . $j . "','" . $_SESSION['s_colorDestaca'] . "');\" onMouseOut=\"libera('imglinhax" . $j . "','" . $_SESSION['s_colorLinPar'] . "','" . $_SESSION['s_colorLinImpar'] . "');\" onMouseDown=\"marca('imglinhax" . $j . "','" . $_SESSION['s_colorMarca'] . "');\" onClick=\"invertView('linhax" . $j . "');\" STYLE=\"{cursor: pointer;}\">"; print "<td class='line'>" . $rowMail['mhist_subject'] . "</td><td class='line'>" . NVL($rowMail['mhist_listname']) . "</td>" . "<td class='line'>" . $shortBody . "</td>" . "<td class='line'>" . formatDate($rowMail['mhist_date']) . "</td><td class='line'>" . $rowMail['nome'] . "</td>"; print "</tr>"; print "<tr><td colspan='6' ><div id='linhax" . $j . "' style='{display:none}'>"; //style='{display:none}' print "<TABLE border='0' cellpadding='2' cellspacing='0' width='90%'>"; print "<tr><td class='line'><b>" . TRANS('MAIL_FIELD_TO') . ":</b> " . toHtml($rowMail['mhist_address']) . "</td></tr>"; print "<tr><td class='line'><b>" . TRANS('MAIL_FIELD_CC') . ":</b> " . toHtml($rowMail['mhist_address_cc']) . "</td></tr>"; print "<tr><td class='textarea'>" . nl2br(toHtml($rowMail['mhist_body'])) . "</td></tr>"; //print "<tr><td>".$rowMail['mhist_body']."</td></tr>"; NL(); print "</table></div></td></tr>"; } print "</table>"; print "</table></div></td></tr>"; } //FIM DO TRECHO SOBRE OS E-MAIL ENVIADOS ############################################################# $qryTela = "select * from imagens where img_oco = " . $row['numero'] . ""; $execTela = mysql_query($qryTela) or die(TRANS('MSG_ERR_NOT_INFO_IMAGE')); //$rowTela = mysql_fetch_array($execTela); $isTela = mysql_num_rows($execTela); $cont = 0; print "<table>";
$j++; if ($_SESSION['s_nivel'] != 3 || $row['scpt_enduser'] == 1) { print "<tr class=" . $trClass . " id='linhax" . $j . "' onMouseOver=\"destaca('linhax" . $j . "','" . $_SESSION['s_colorDestaca'] . "');\" onMouseOut=\"libera('linhax" . $j . "','" . $_SESSION['s_colorLinPar'] . "','" . $_SESSION['s_colorLinImpar'] . "');\" onMouseDown=\"marca('linhax" . $j . "','" . $_SESSION['s_colorMarca'] . "'); redirect('" . $_SERVER['PHP_SELF'] . "?action=popup&cod=" . $row['scpt_id'] . "&cellStyle=true&bbutton=true')\">"; print "<td class='line'>" . $row['scpt_nome'] . "</td><td class='line'>" . $row['scpt_desc'] . "</td>"; print "</tr>"; } } print "<tr><td colspan='2'> </td></tr>"; print "<tr><TD colspan='2' bgcolor='" . BODY_COLOR . "'><INPUT type='button' class='button' value='" . TRANS('LINK_CLOSE') . "' name='fechar' onClick=\"javascript:window.close()\"></TD></tr>"; } else { if ($registros == 1) { $row = mysql_fetch_array($resultado); print "<BR><B>" . TRANS('TTL_PROB_SCRIP_CLUE') . " <font color='green'>" . $row['problema'] . "</font></B><BR>"; print "<BR><i>" . $row['prob_descricao'] . "</font></i><BR>"; print "<tr>"; print "<TD colspan='2' class='wide' align='left' bgcolor='" . BODY_COLOR . "'>" . toHtml(nl2br($row['scpt_script'])) . "</td>"; print "</tr>"; print "<tr><td colspan='2'> </td></tr>"; print "<tr><td colspan='2'> </td></tr>"; print "<tr>"; if (isset($_GET['bbutton'])) { print "<TD bgcolor='" . BODY_COLOR . "'><INPUT type='button' class='button' value='" . TRANS('TXT_RETURN') . "' name='voltar' onClick=\"javascript:history.back()\"></TD>"; print "<TD bgcolor='" . BODY_COLOR . "'><INPUT type='button' class='button' value='" . TRANS('LINK_CLOSE') . "' name='fechar' onClick=\"javascript:window.close()\"></TD>"; } else { print "<TD colspan='2' bgcolor='" . BODY_COLOR . "'><INPUT type='button' class='button' value='" . TRANS('LINK_CLOSE') . "' name='fechar' onClick=\"javascript:window.close()\"></TD>"; } print "</tr>"; } else { print "<tr><td align='center'>"; print mensagem(TRANS('NO_RECORDS')); print "</tr></td>";
function render_admin_masinfo($param) { $id = $param['uid']; list($db) = Getdb(); $Total_tablas = GetTables(); $tblusuarios = $Total_tablas['t']['usuarios']; $cols_usuarios = $Total_tablas['c']['usuarios']; $sql = "SELECT * FROM {$tblusuarios} WHERE " . $cols_usuarios['uid'] . "='{$id}'"; $resultado = $db->Execute($sql); if ($db->ErrorNo() != 0) { $param['ruta'] = "error"; $param['mensaje'] = "Ha ocurrido leer el usuario de la base de datos."; render($param); die; } $usuario = $resultado->FetchRow(); $usuario = toHtml($usuario); $usuario = fromdbtocms($usuario, 'usuarios'); $resultado = SmartyInit(); $plantilla = "usuarios/usrmasinfo.tpl"; $resultado->assign("datos", $usuario); $salida = $resultado->fetch($plantilla); return $salida; }
} $OPER .= "].</i>"; //----- TESTES PARA ENCONTRAR O BUG ---------// $todosTermos = ""; $arrayTermos = array(); $palavrasA = array_unique($palavrasA); for ($b = 0; $b < count($palavrasA); $b++) { $todosTermos .= $palavrasA[$b] . ", "; $arrayTermos[] = noHtml($palavrasA[$b]); } reIndexArray($arrayTermos); //dump($arrayTermos, 'ARRAY TERMOS:'); $arrayTeste = array(); for ($b = 0; $b < count($arrayTermos); $b++) { //$arrayTeste[] = $arrayTermos[$b]; $arrayTeste[] = toHtml($arrayTermos[$b]); } array_unique($arrayTeste); reIndexArray($arrayTeste); //dump($arrayTeste, 'TESTE INVERTENDO'); //----- TESTES PARA ENCONTRAR O BUG ---------// print "" . TRANS('TXT_TERM_SEARCH') . ": <i>\"" . trim($_POST['problema']) . "\".</i><br />" . TRANS('TXT_CRITERION') . ": " . $OPER . "<br /><br />"; $qrySolucao = ""; $qryAssentamento = ""; $qryProblema = ""; $qryDesc = ""; $destacaProb = str_replace("%", "|", $destacaProb); //SQL GLOBAL - RETORNA TODAS AS OCORRÊNCIAS QUE CONTENHAM PELO MENOS UM DOS TERMOS DE PESQUISA for ($i = 0; $i < count($palavrasA); $i++) { //Monta o SQL de forma dinâmica de acordo com a quantidade de palavras a serem pesquisadas if (isset($palavrasA[$i])) {
} // template $templateSingle = '<h3>' . toHtml($media['title']) . '</h3> ' . toHtml($media['desc']) . ' <p><b>Tag: </b><span class="label label-info">' . toHtml($media['tag']) . '</span></p>' . $albumImages; // return echo $templateSingle; } } else { // all media files $templateAll = ''; foreach ($json as $media) { $templateAll .= '<figure> <img width="' . $media['width'] . '" height="' . $media['height'] . '" src="' . Config::get('site.site_url') . $media['thumb'] . '"/> <figcaption> <a href="' . Config::get('site.site_url') . '/media?action=view&id=' . $media['id'] . '" title="' . toHtml($media['title']) . '">' . toHtml($media['title']) . '</a> </figcaption> </figure>'; } // check json file if not empty if (count($json) > 0) { echo $templateAll; } else { echo '<div class="alert alert-danger">Empty Media albums</div>'; } // get config //print_r(json_encode(Config::getConfig(),true)); } }); // text to html function toHtml($str)
function render_admin_editar($param) { list($db) = Getdb(); $tbl = GetTable('secciones'); $col = GetCols('secciones'); $sql = "SELECT * FROM {$tbl} WHERE {$col['sid']}='{$param['sid']}'"; $resultado = $db->Execute($sql); if ($db->ErrorNo() != 0) { $param['ruta'] = "error"; $param['mensaje'] = "Ha ocurrido leer el archivo de la base de datos."; render($param); die; } $seccion = $resultado->FetchRow(); $seccion = fromdbtocms($seccion, 'secciones'); $seccion = toHtml($seccion); $resultado = SmartyInit(); $resultado->assign("datos", $seccion); $resultado->assign("validaregistrourl", "index.php?actor=secciones&accion=validaredicion"); $plantilla = "seccion/editseccion.tpl"; $salida = $resultado->fetch($plantilla); return $salida; }
public function testToHtml() { $this->assertXmlStringEqualsXmlFile(__DIR__ . '/_files/design-abstraction_select.html', $this->_block->toHtml()); }
function renderRow($registro) { $row = SmartyInit(); $regaux = array(); $registro = toHtml($registro); foreach ($this->ColsToShow as $k => $v) { if (trim($v['dropcall']['funcion']) != "") { $funcion = $v['dropcall']['funcion']; $auxv = $funcion(&$this, $registro[$v['dropcall']['valor']]); $regaux[] = $auxv; } else { $regaux[] = $registro[$v['dbname']]; } } $row->assign('data', $regaux); $opciones = $this->caller($registro); $row->assign('options', $opciones); return $row->fetch("lister_rows.tpl"); }
function renderRow($registro) { $row = SmartyInit(); $registro = toHtml($registro); $regaux = $registro; foreach ($this->ColsToShow as $k => $v) { if (trim($v['showcall']['funcion']) != "") { $funcion = $v['showcall']['funcion']; $auxv = $funcion(&$this, $registro[$v['showcall']['valor']]); if (is_array($auxv)) { $regaux[$auxv['nombre']] = $auxv['valor']; } else { $regaux[$v['dbname']] = $auxv; } } else { $regaux[] = $registro[$v['dbname']]; } } $row->assign('registro', $regaux); $opciones = $this->callerOptions($registro); $row->assign('options', $opciones); return $row->fetch($this->tplName) . "<br>"; }
$execImg = mysql_query($qryImg) or die ('OS DADOS NÃO PUDERÃO SER CONSULTADOS!!'); $rowTela = mysql_fetch_array($execImg); $regImg = mysql_num_rows($execImg); if ($regImg!=0) { $linkImg = "<a onClick=\"javascript:popup_wide('listFiles.php?COD=".$row['numero']."')\"><img src='../../includes/icons/attach2.png'></a>"; } else $linkImg = ""; print "<TD class='line' ".$valign."><b>".$row['numero']."</a></b>".$imgSub."<br>".($row['area']==''?' ':$row['area'])."</td>"; print "<TD class='line' ".$valign.">".$linkImg." ".($row['problema']==''?' ':$row['problema'])."</td>"; print "<TD class='line' ".$valign."><b>".$row['contato']."</b><br>".$row['telefone']."</td>"; $limite = 150; $texto = trim($row['descricao']); $hnt = " title='Clique aqui para ver os detalhes do chamado!'"; if ((strlen(toHtml($texto))>$limite) || (strlen($texto) > $limite) ){ $hnt = ""; $arrayHNT = explode(chr(10), $texto); //EXTRAINDO AS LINE FEED for ($i=0; $i<count($arrayHNT); $i++) { $hnt.=trim($arrayHNT[$i]); } $hnt = noHtml($hnt); $texto = substr($texto,0,($limite-4))."..."; $hnt = "onmousemove=\"showToolTip(event,'".$hnt."', 'bubble_tooltip', 'bubble_tooltip_content'); return false\" onmouseout=\"hideToolTip('bubble_tooltip')\""; }; print "<TD class='line' ".$valign."><b>".$row['setor']."</b><br>".$texto."</a></td>"; $data = dataRED($row['data_abertura']);
} // template $templateSingle = '<h3>' . toHtml($media['title']) . '</h3> ' . toHtml($media['desc']) . ' <p><b>Tag: </b><span class="label label-info">' . toHtml($media['tag']) . '</span></p>' . $albumImages; // return echo $templateSingle; } } else { // all media files $templateAll = ''; foreach ($json as $media) { $templateAll .= '<figure> <img width="' . $media['width'] . '" height="' . $media['height'] . '" src="' . Morfy::$site['url'] . $media['thumb'] . '"/> <figcaption> <a href="' . Morfy::$site['url'] . '/media?action=view&id=' . $media['id'] . '" title="' . toHtml($media['title']) . '">' . toHtml($media['title']) . '</a> </figcaption> </figure>'; } // check json file if not empty if (count($json) > 0) { echo $templateAll; } else { echo '<div class="alert alert-danger">Empty Media albums</div>'; } } }); // text to html function toHtml($str) { // Redefine vars
function get_booking_form_action($my_boook_type = 1, $my_boook_count = 1, $my_booking_form = 'standard', $my_selected_dates_without_calendar = '', $start_month_calendar = false) { // $res = $this->add_booking_form_action($my_boook_type,$my_boook_count, 0, $my_booking_form , $my_selected_dates_without_calendar, $start_month_calendar ); //$res = $this->add_booking_form_action; $res = new AddBooking() . toHtml(); return $res; }
function render_user_mostrardocumento($param) { list($db) = Getdb(); $col = GetCols('documentos'); $tbl = GetTable('documentos'); $sql = "SELECT * FROM {$tbl} WHERE {$col['did']}={$param['did']}"; $rs = $db->Execute($sql); $result = $rs->FetchRow(); $result = fromdbtocms($result, 'documentos'); $result['periodo'] = InverseParsePeriod($result['periodo']); $result = toHtml($result); $resultado = SmartyInit(); $plantilla = "document/document.tpl"; $resultado->assign('datos', $result); $resultado->assign('dropDwArchivo', html_entity_decode(getArchivo($result['aid']), ENT_QUOTES)); $resultado->assign('dropDwSeccion', html_entity_decode(getSeccion($result['sid']), ENT_QUOTES)); $resultado->assign('recursos', MostrarRecursos($param['did'])); if (vwSessionGetVar('UserLevel') > 499) { $resultado->assign('admin', true); } else { $resultado->assign('admin', false); } $params = array("uid" => vwSessionGetVar("uid"), "did" => $param["did"]); eventoRecursos($params, "verdoc"); $salida = $resultado->fetch($plantilla); return $salida; }
$execImg = mysql_query($qryImg) or die(TRANS('ERR_QUERY')); $rowTela = mysql_fetch_array($execImg); $regImg = mysql_num_rows($execImg); if ($regImg != 0) { //$linkImg = "<a onClick=\"javascript:popupWH('../../includes/functions/showImg.php?file=".$row['numero']."&cod=".$rowTela['img_cod']."',".$rowTela['img_largura'].",".$rowTela['img_altura'].")\"><img src='".ICONS_PATH."attach2.png' width='16' height='16'></a>"; $linkImg = "<a onClick=\"javascript:popup_wide('listFiles.php?COD=" . $row['numero'] . "')\"><img src='../../includes/icons/attach2.png'></a>"; } else { $linkImg = ""; } print "<TD class='line' " . $valign . "><b><a href='mostra_consulta.php?numero=" . $row['numero'] . "'>" . $row['numero'] . "</a></b>" . $imgSub . "<br>" . ($row['area'] == '' ? ' ' : $row['area']) . "</td>"; print "<TD class='line' " . $valign . ">" . $linkImg . " " . ($row['problema'] == '' ? ' ' : $row['problema']) . "</td>"; print "<TD class='line' " . $valign . "><b>" . $row['contato'] . "</b><br>" . $row['telefone'] . "</td>"; $limite = 150; $texto = trim($row['descricao']); $hnt = " title='Clique aqui para ver os detalhes do chamado!'"; if (strlen(toHtml($texto)) > $limite || strlen($texto) > $limite) { $hnt = ""; $arrayHNT = explode(chr(10), $texto); //EXTRAINDO AS LINE FEED for ($i = 0; $i < count($arrayHNT); $i++) { $hnt .= trim($arrayHNT[$i]); } $hnt = noHtml($hnt); //$texto = substr($texto,0,($limite-4))."<a href='#' onmousemove=\"showToolTip(event,'".$hnt."', 'bubble_tooltip', 'bubble_tooltip_content'); return false\" onmouseout=\"hideToolTip('bubble_tooltip')\"> ...</a> "; $texto = substr($texto, 0, $limite - 4) . "..."; //$hnt = "onmousemove=\"showToolTip(event,'".$hnt."', 'bubble_tooltip', 'bubble_tooltip_content'); return false\" onmouseout=\"hideToolTip('bubble_tooltip')\""; } print "<TD class='line' " . $valign . "><b>" . $row['setor'] . "</b><br><a class='no' href='mostra_consulta.php?numero=" . $row['numero'] . "' " . $hnt . ">" . $texto . "</a></td>"; $data = dataRED($row['data_abertura']); $areaT = ""; $areaT = testaArea($areaT, $row['area_cod'], $H_horarios);