Ir para conteúdo
Fórum Script Brasil

unmeanings

Membros
  • Total de itens

    17
  • Registro em

  • Última visita

Sobre unmeanings

unmeanings's Achievements

0

Reputação

  1. Eu tenho duas tabelas (clientes e imóveis). Na tabela de clientes eu tenho os dados pessoais do cliente e os interesses que ele tem. Tabela "dbc_customers": +----+-------+---------+---------+------+--------+-----------+-----------+--------+ | id | name | email | bedroom | bath | garage | min_price | max_price | status | +----+-------+-----------------+---------+------+--------+-----------+-----------++ | 1 | Maria | maria | 4 | 2 | 0 | 0.00 | 0.00 | 1 | | 2 | John | john | 4 | 0 | 0 | 0.00 | 0.00 | 1 | | 3 | Julia | julia | 0 | 0 | 0 | 0.00 | 0.00 | 1 | | 4 | Ana | ana | 0 | 0 | 0 | 0.00 | 0.00 | 0 | +----+-------+-----------------+---------+------+--------+-----------+-----------++ Na tabela imóveis eu tenho os dados de cada casa registrada. Tabela "dbc_posts": +----+------+---------+---------+------+--------+-------------+------------+--------+ | id | city | address | bedroom | bath | garage | total_price | year_built | status | +----+------+---------+---------+------+--------+-------------+------------+--------+ | 1 | 3 | st 21 | 4 | 2 | 1 | 200.00 | 2010 | 1 | | 2 | 3 | st 22 | 4 | 3 | 4 | 10.00 | 2000 | 1 | | 3 | 3 | b 12 | 2 | 1 | 5 | 40.00 | 2014 | 1 | | 4 | 2 | b 14 | 3 | 2 | 2 | 30.00 | 2013 | 1 | +----+------+---------+---------+------+--------+-------------+------------+--------+ Eu preciso de alguma forma comparar os interesses de cada cliente, com cada casa e mostrar o número de casas compatíveis com cada cliente, o resultado seria algo como isto: Client1 || cliente1@email.com || 4 properties compatible Client2 || cliente2@email.com || 7 properties compatible No entanto já tentei várias formas, eu já quebrei a cabeça, eu já tenho resultados semelhantes, mas algo está sempre errado. Neste código abaixo ele conta corretamente quantas casas são compatíveis com cada cliente, mas também mostra os clientes com interesses vazios e eu preciso mostrar apenas os clientes que encheram os interesses e mostrar as casas compatíveis com eles. Esse código funciona no entanto, ele exibe todos os clientes, mesmo que eles estão com interesses vazias. Meu código atual: <?php #Select all active customers and order by id desc $query = mysql_query("SELECT * FROM dbc_customers WHERE status='1' ORDER BY id DESC") or die(mysql_error()); #No customers found if (mysql_num_rows($query) < 1){ echo "No customers found!"; } else { #Set vars $where=""; $i=1; while ($row = mysql_fetch_object($query)) { #Define "where" clause according to values of the table column if (!empty($row->bedroom)) $where .= "bedroom='$row->bedroom' AND "; if (!empty($row->bath)) $where .= "bath='$row->bath' AND "; //if (!empty($row->garage)) $where .= "c.garage = p.garage AND "; #Count all posts compatibles with each customer $query2 = mysql_query("SELECT id FROM dbc_posts WHERE $where status='1'") or die(mysql_error()); #If none posts found break the loop, exit and show a message error, else show number of posts found if (mysql_num_rows($query2) < 1){ break; exit; } else { $result = mysql_num_rows($query2); } #Select only one post compatible for each customer $query3 = mysql_query("SELECT DISTINCT id FROM dbc_posts WHERE $where status='1' LIMIT 1") or die(mysql_error()); #Flag for where var if ($query2 and $query3) $where = ""; #Loop for each result of query3 and show customers and yours compatibles posts while ($row3 = mysql_fetch_object($query3)) { #Show customers echo "<b>".$row->name."</b> || ".$row->email." || <a href='#'><b>".mysql_num_rows($query2)." properties compatible</b></a><br />"; } } #If none compatibles posts with customers was found if ($result < 1){ echo "No listings were found compatible with any client!"; } } ?> Acredito que o meu código poderia estar totalmente errado a partir do seguinte variável query3.
  2. Ola tenho um problema simples... Eu uso uma funcao em javascript/ajax para passar valores por url atraves de um formulario php. So que eu passava apenas 1 valor pela url porque eu so tinha que receber valores de 1 input text, agora eu preciso receber o valor do input e do select so que não to conseguindo passar os 2 valores usando o mesmo codigo: $.post('whois/process.php?domain=' + escape($('#Search').val()),{ }, function(response){ ..... }); Como podem ver a parte: ?domain e responsavel pela variavel certo? e depois vem o =' escape.... essa parte e responsavel por pegar o valor do input definido com a id Search ai o que eu preciso é pegar mais um valor do formulario usando este mesmo metodo, so que o problema e que eu não consigo concatenar essa parte do process.php?domain..... eu preciso acrescentar mais um codigo igual a partir de ?domain... Como posso fazer isso? Agradeco desde já
  3. Ola gostaria de saber como funciona o sistema dos sites: TelecinePlay, Netfix, Skyonline e etc... Que metodo eles usam para exibir os filmes? Streaming? Fazem upload dos arquivos de filmes um a um? Incorporam os filmes de outro servidor? Enfim qual o metodo que eles usam para isso? Alguns sites como telecine play foram lançados recentemente e já possuem mais de 1500 filmes a disposicao! Como eles disponibilizaram essa enorme quantia de filmes em tão pouco tempo? Demoraria muitos dias para upar essa quantia de filmes. Me expliquem detalhadamente se possivel, pois estou planejando desenvolver um sistema assim semelhante.
  4. Ola tenho dois arquivos php que estao interligados da seguinte forma: Tenho o arquivo index.php que e a index de um cms (webmail roundcube) (Como e de conhecimento de voces esse index por ser um script profssional tem varias funcoes que carregam sub funcoes, modulos, idiomas, temas e etc) então ainda no script do roundcube tenho a pasta skins/default/includes/head.html nessa pagina eu inseri a barra cometchat atraves de um script css e outro java script: <link type="text/css" href="http://ifmg.me/inc/mail/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8"> <script type="text/javascript" src="http://ifmg.me/inc/mail/cometchat/cometchatjs.php" charset="utf-8"></script> Esses dois scripts que são responsaveis pela inclusao da barra horizontal(cometchat) na base da pagina do meu webmail(roundcube). E esse cometchat tambem e um script profissional que tambem possue sua index que carrega varias outras funcoes... entre uma delas tenho o arquivo integration.php dentro da pasta cometchat que e responsavel por uma funcao que define se o usuario esta ou não logado no roundcube (no caso) e exibe o chat. A funcao e essa: function getUserID() { $userid = 0; // Return 0 if user is not logged in session_start(); if (!empty($_SESSION['user_id'])) { $userid = $_SESSION['user_id']; } return $userid; } A variavel userid como podem ver e definida por padrão por 0 (ou seja vazio) logo apos temos a session que deveria pegar a session user_id da pagina index.php (do roundcube) e atribui esse valor do id do usuario para a variavel userid assim modificando o seu valor que era 0 (vazio) para o id do respectivo usuario e assim o chat funciona. Porem isso não esta funcionando! a session user_id não esta pegando o valor da session user_id da index do roundcube, então ela esta retornando como 0 mesmo e o chat não funciona pois entende que o usuario não estao logado no webmail (roundcube), se eu alterar o valor 0 da variavel userid para qualquer outro valor não sendo 0 o chat funciona, mais so para 1 pessoa porque os id seriam iguais para todos, por isso preciso pegar o id do usuario que esta logado no roundcube e atribuir para esta variavel userid. Como eu posso fazer isso?
  5. Ola boa tarde, vou tentar explicar o mais breve e objetivo possivel... Estou usando um sistema de webmail (roundcube)(www.roundcube.net) e estou tentando incluir o cometchat (www.cometchat.com) no roundcube, eu já fiz mais que a metade do caminho, a barra cometchat já esta apaecendo e funcionando quase todas as funcoes exceto o chat (mais importante), o plugin de chat do cometchat funciona basicamente assim: Ele tem uma funcao php assim: function getUserID() { $userid = 0; // Retorna 0, e se o valor for 0 quer dizer que o usuario não esta logado e então não pode usar o chat if (!empty($_SESSION['user_id'])) { $userid = $_SESSION['user_id']; //Aqui pega o id do usuario que esta logado em seu email no roundcube e atribui a variavel userid } return $userid; //retorna o valor (id do usuario) na variavel userid, assim autenticando o uso do chat } Primeiro temos a variavel userid, ela tem um valor padrão de 0, o chat interpreta esse valor 0 como vazio, e define que o usuario não esta logado então o chat retorna uma menssagem "Logue-se antes de usar o chat" se eu alterar esse 0 da variavel por 1 ou qualquer outro numero ou letra o chat funciona normalmente pois assim não interpretara a variavel como vazia. Mais eu não posso fazer isso pois eu preciso realmente do id do usuario logado no roundcube pois esse id servira para defnir o seu nome, email e etc... então e necessario que a variavel userid tenha ids dinamicos ou seja cada usuario que entrar no roundcube essa variavel userid armazenaria o id do usuario. So que o problema esta na session user_id. Essa session vem da pagina index.php do roundcube e já conferi e esta correto o nome da session mais essa session não esta retornando o id do usuario, ela esta retornando 0 (vazio). Esse arquivo index.php do roundcube e claro que não contem o php exposto, pois e um script profissional e e composto por functions e themes para carregar diversar outras paginas em outras pastas e criar o layout e etc... mais é no index.php que existe essa session user_id, ela funciona normalmente dentro do roundcube, mais o que eu preciso e que essa session user_id seja passada para aquela funcao que eu coloquei ai encima. Essa funcao esta em um outro arquivo dentro da pasta cometchat que esta dentro da pasta do roundcube, A funcao esta no arquivo do cometchat chamado integration.php. Como eu disse a pagina index.php do roundcube aponta varias outras paginas do sistema por exemplo head.html (que especifica quais scripts serao carregados no <head>) e etc... (E nessa pagina head.html que eu coloco os 2 scripts que carregam a barra do cometchat). Assim quando entro www.meusite.com/roundcube/index.php já carrega o index.php e já abre a minha barra cometchat na base da pagina (la embaixo) então o que eu preciso e pegar o valor dessa session que e usada no index.php nakela funcao que eu coloquei logo acima, desse jeito que ela ta ela não ta funcionando pois não esta pegando o id do usuario e esta retornando como 0 (vazio) Segue abaixo a pagina index.php (do roundcube): <?php /* +-------------------------------------------------------------------------+ | Roundcube Webmail IMAP Client | | Version 0.7.2 | | | | Copyright (C) 2005-2012, The Roundcube Dev Team | | | | This program is free software; you can redistribute it and/or modify | | it under the terms of the GNU General Public License version 2 | | as published by the Free Software Foundation. | | | | This program is distributed in the hope that it will be useful, | | but WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | GNU General Public License for more details. | | | | You should have received a copy of the GNU General Public License along | | with this program; if not, write to the Free Software Foundation, Inc., | | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | | | +-------------------------------------------------------------------------+ | Author: Thomas Bruederli <roundcube@gmail.com> | +-------------------------------------------------------------------------+ $Id: index.php 5995 2012-03-11 16:22:50Z thomasb $ */ // include environment require_once 'program/include/iniset.php'; // init application, start session, init output class, etc. $RCMAIL = rcmail::get_instance(); // Make the whole PHP output non-cacheable (#1487797) send_nocacheing_headers(); // turn on output buffering ob_start(); // check if config files had errors if ($err_str = $RCMAIL->config->get_error()) { raise_error(array( 'code' => 601, 'type' => 'php', 'message' => $err_str), false, true); } // check DB connections and exit on failure if ($err_str = $DB->is_error()) { raise_error(array( 'code' => 603, 'type' => 'db', 'message' => $err_str), FALSE, TRUE); } // error steps if ($RCMAIL->action=='error' && !empty($_GET['_code'])) { raise_error(array('code' => hexdec($_GET['_code'])), FALSE, TRUE); } // check if https is required (for login) and redirect if necessary if (empty($_SESSION['user_id']) && ($force_https = $RCMAIL->config->get('force_https', false))) { $https_port = is_bool($force_https) ? 443 : $force_https; if (!rcube_https_check($https_port)) { $host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']); $host .= ($https_port != 443 ? ':' . $https_port : ''); header('Location: https://' . $host . $_SERVER['REQUEST_URI']); exit; } } // trigger startup plugin hook $startup = $RCMAIL->plugins->exec_hook('startup', array('task' => $RCMAIL->task, 'action' => $RCMAIL->action)); $RCMAIL->set_task($startup['task']); $RCMAIL->action = $startup['action']; // try to log in if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') { $request_valid = $_SESSION['temp'] && $RCMAIL->check_request(RCUBE_INPUT_POST, 'login'); // purge the session in case of new login when a session already exists $RCMAIL->kill_session(); $auth = $RCMAIL->plugins->exec_hook('authenticate', array( 'host' => $RCMAIL->autoselect_host(), 'user' => trim(get_input_value('_user', RCUBE_INPUT_POST)), 'pass' => get_input_value('_pass', RCUBE_INPUT_POST, true, $RCMAIL->config->get('password_charset', 'ISO-8859-1')), 'cookiecheck' => true, 'valid' => $request_valid, )); // check if client supports cookies if ($auth['cookiecheck'] && empty($_COOKIE)) { $OUTPUT->show_message("cookiesdisabled", 'warning'); } else if ($auth['valid'] && !$auth['abort'] && !empty($auth['host']) && !empty($auth['user']) && $RCMAIL->login($auth['user'], $auth['pass'], $auth['host']) ) { // create new session ID, don't destroy the current session // it was destroyed already by $RCMAIL->kill_session() above $RCMAIL->session->remove('temp'); $RCMAIL->session->regenerate_id(false); // send auth cookie if necessary $RCMAIL->session->set_auth_cookie(); // log successful login rcmail_log_login(); // restore original request parameters $query = array(); if ($url = get_input_value('_url', RCUBE_INPUT_POST)) { parse_str($url, $query); // prevent endless looping on login page if ($query['_task'] == 'login') unset($query['_task']); } // allow plugins to control the redirect url after login success $redir = $RCMAIL->plugins->exec_hook('login_after', $query + array('_task' => 'mail')); unset($redir['abort'], $redir['_err']); // send redirect $OUTPUT->redirect($redir); } else { $error_code = is_object($IMAP) ? $IMAP->get_error_code() : -1; $OUTPUT->show_message($error_code < -1 ? 'imaperror' : (!$auth['valid'] ? 'invalidrequest' : 'loginfailed'), 'warning'); $RCMAIL->plugins->exec_hook('login_failed', array( 'code' => $error_code, 'host' => $auth['host'], 'user' => $auth['user'])); $RCMAIL->kill_session(); } } // end session (after optional referer check) else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id']) && (!$RCMAIL->config->get('referer_check') || rcube_check_referer())) { $userdata = array('user' => $_SESSION['username'], 'host' => $_SESSION['imap_host'], 'lang' => $RCMAIL->user->language); $OUTPUT->show_message('loggedout'); $RCMAIL->logout_actions(); $RCMAIL->kill_session(); $RCMAIL->plugins->exec_hook('logout_after', $userdata); } // check session and auth cookie else if ($RCMAIL->task != 'login' && $_SESSION['user_id'] && $RCMAIL->action != 'send') { if (!$RCMAIL->session->check_auth()) { $RCMAIL->kill_session(); $session_error = true; } } // not logged in -> show login page if (empty($RCMAIL->user->ID)) { // log session failures if (($task = get_input_value('_task', RCUBE_INPUT_GPC)) && !in_array($task, array('login','logout')) && !$session_error && ($sess_id = $_COOKIE[ini_get('session.name')])) { $RCMAIL->session->log("Aborted session " . $sess_id . "; no valid session data found"); $session_error = true; } if ($OUTPUT->ajax_call) $OUTPUT->redirect(array('_err' => 'session'), 2000); if (!empty($_REQUEST['_framed'])) $OUTPUT->command('redirect', $RCMAIL->url(array('_err' => 'session'))); // check if installer is still active if ($RCMAIL->config->get('enable_installer') && is_readable('./installer/index.php')) { $OUTPUT->add_footer(html::div(array('style' => "background:#ef9398; border:2px solid #dc5757; padding:0.5em; margin:2em auto; width:50em"), html::tag('h2', array('style' => "margin-top:0.2em"), "Installer script is still accessible") . html::p(null, "The install script of your Roundcube installation is still stored in its default location!") . html::p(null, "Please <b>remove</b> the whole <tt>installer</tt> folder from the Roundcube directory because . these files may expose sensitive configuration data like server passwords and encryption keys to the public. Make sure you cannot access the <a href=\"./installer/\">installer script</a> from your browser.") ) ); } if ($session_error || $_REQUEST['_err'] == 'session') $OUTPUT->show_message('sessionerror', 'error', null, true, -1); $RCMAIL->set_task('login'); $OUTPUT->send('login'); } // CSRF prevention else { // don't check for valid request tokens in these actions $request_check_whitelist = array('login'=>1, 'spell'=>1); // check client X-header to verify request origin if ($OUTPUT->ajax_call) { if (rc_request_header('X-Roundcube-Request') != $RCMAIL->get_request_token() && !$RCMAIL->config->get('devel_mode')) { header('HTTP/1.1 403 Forbidden'); die("Invalid Request"); } } // check request token in POST form submissions else if (!empty($_POST) && !$request_check_whitelist[$RCMAIL->action] && !$RCMAIL->check_request()) { $OUTPUT->show_message('invalidrequest', 'error'); $OUTPUT->send($RCMAIL->task); } // check referer if configured if (!$request_check_whitelist[$RCMAIL->action] && $RCMAIL->config->get('referer_check') && !rcube_check_referer()) { raise_error(array( 'code' => 403, 'type' => 'php', 'message' => "Referer check failed"), true, true); } } // we're ready, user is authenticated and the request is safe $plugin = $RCMAIL->plugins->exec_hook('ready', array('task' => $RCMAIL->task, 'action' => $RCMAIL->action)); $RCMAIL->set_task($plugin['task']); $RCMAIL->action = $plugin['action']; // handle special actions if ($RCMAIL->action == 'keep-alive') { $OUTPUT->reset(); $RCMAIL->plugins->exec_hook('keep_alive', array()); $OUTPUT->send(); } else if ($RCMAIL->action == 'save-pref') { include INSTALL_PATH . 'program/steps/utils/save_pref.inc'; } // include task specific functions if (is_file($incfile = INSTALL_PATH . 'program/steps/'.$RCMAIL->task.'/func.inc')) include_once $incfile; // allow 5 "redirects" to another action $redirects = 0; $incstep = null; while ($redirects < 5) { // execute a plugin action if ($RCMAIL->plugins->is_plugin_task($RCMAIL->task)) { if (!$RCMAIL->action) $RCMAIL->action = 'index'; $RCMAIL->plugins->exec_action($RCMAIL->task.'.'.$RCMAIL->action); break; } else if (preg_match('/^plugin\./', $RCMAIL->action)) { $RCMAIL->plugins->exec_action($RCMAIL->action); break; } // try to include the step file else if (($stepfile = $RCMAIL->get_action_file()) && is_file($incfile = INSTALL_PATH . 'program/steps/'.$RCMAIL->task.'/'.$stepfile) ) { include $incfile; $redirects++; } else { break; } } // parse main template (default) $OUTPUT->send($RCMAIL->task); // if we arrive here, something went wrong raise_error(array( 'code' => 404, 'type' => 'php', 'line' => __LINE__, 'file' => __FILE__, 'message' => "Invalid request"), true, true); E a pagina integration.php (onde tem aquela funcao) <?php ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* ADVANCED */ define('SET_SESSION_NAME',''); // Session name define('DO_NOT_START_SESSION','0'); // Set to 1 if you have already started the session define('DO_NOT_DESTROY_SESSION','0'); // Set to 1 if you do not want to destroy session on logout define('SWITCH_ENABLED','1'); define('INCLUDE_JQUERY','1'); define('FORCE_MAGIC_QUOTES','0'); define('ADD_LAST_ACTIVITY','1'); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* DATABASE */ // DO NOT EDIT DATABASE VALUES BELOW // DO NOT EDIT DATABASE VALUES BELOW // DO NOT EDIT DATABASE VALUES BELOW //RETIREI ESSA PARTE POR MOtivOS DE SEGURANCA ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* FUNCTIONS */ function getUserID() { $userid = 0; // Return 0 if user is not logged in session_start(); if (!empty($_SESSION['user_id'])) { $userid = $_SESSION['user_id']; } return $userid; } function getFriendsList($userid,$time) { $sql = ("select ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity,(select storage_path from ".TABLE_PREFIX."storage_files where parent_file_id is null and file_id = ".TABLE_PREFIX.DB_USERTABLE.".photo_id) avatar, ".TABLE_PREFIX.DB_USERTABLE.".username link, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX."user_membership join ".TABLE_PREFIX."users on ".TABLE_PREFIX."user_membership.user_id = ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".user_id = cometchat_status.userid where ".TABLE_PREFIX."user_membership.resource_id = '".mysql_real_escape_string($userid)."' and active = 1 order by username asc"); if (defined('DISPLAY_ALL_USERS') && DISPLAY_ALL_USERS == 1) { $sql = ("select ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity,(select storage_path from ".TABLE_PREFIX."storage_files where parent_file_id is null and file_id = ".TABLE_PREFIX.DB_USERTABLE.".photo_id) avatar, ".TABLE_PREFIX.DB_USERTABLE.".username link, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX."users left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".user_id = cometchat_status.userid where ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." <> '".mysql_real_escape_string($userid)."' and ('".$time."'-".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." < '".((ONLINE_TIMEOUT)*2)."') order by username asc"); } return $sql; } function getUserDetails($userid) { $sql = ("select ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX."users.".DB_USERTABLE_NAME." username, ".TABLE_PREFIX."users.".DB_USERTABLE_LASTACTIVITY." lastactivity, ".TABLE_PREFIX.DB_USERTABLE.".username link, (select storage_path from ".TABLE_PREFIX."storage_files where parent_file_id is null and file_id = ".TABLE_PREFIX.DB_USERTABLE.".photo_id) avatar, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX."users left join cometchat_status on ".TABLE_PREFIX."users.user_id = cometchat_status.userid where ".TABLE_PREFIX."users.user_id = '".mysql_real_escape_string($userid)."'"); return $sql; } function updateLastActivity($userid) { $sql = ("update `".TABLE_PREFIX.DB_USERTABLE."` set ".DB_USERTABLE_LASTACTIVITY." = '".getTimeStamp()."' where ".DB_USERTABLE_USERID." = '".mysql_real_escape_string($userid)."'"); return $sql; } function getUserStatus($userid) { $sql = ("select ".TABLE_PREFIX."users.status message, cometchat_status.status from ".TABLE_PREFIX."users left join cometchat_status on ".TABLE_PREFIX."users.user_id = cometchat_status.userid where ".TABLE_PREFIX."users.user_id = '".mysql_real_escape_string($userid)."'"); return $sql; } function getLink($link) { return BASE_URL."../profile/".$link; } function getAvatar($image) { if (is_file(dirname(dirname(__FILE__))."/".$image)) { return BASE_URL."../".$image; } else { return BASE_URL."../application/modules/User/externals/images/nophoto_user_thumb_icon.png"; } } function getTimeStamp() { return time(); } function processTime($time) { return $time; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* HOOKS */ function hooks_statusupdate($userid,$statusmessage) { $sql = ("update ".TABLE_PREFIX."users set status = '".mysql_real_escape_string($statusmessage)."', status_date = '".getTimeStamp()."' where user_id = '".mysql_real_escape_string($userid)."'"); $query = mysql_query($sql); } function hooks_forcefriends() { } function hooks_activityupdate($userid,$status) { } function hooks_message($userid,$unsanitizedmessage) { } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* LICENSE */ /* Nulled by TrioxX */ $p_ = 4; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  6. em javascript ela deve ser nesse formato que especifiquei (é uma validacao de formulario javascript)
  7. Ola galera primeiramente boa pascoa ai pra voces hehe Eu preciso de um regex que aceite todos os caracteres menos o espaco este regex devera aceitar todos os caracteres especiais, acentos, tils, circunflexos, cedilha e etc, so não devera aceitar o caracter espaco! E tambem esse regex obrigara que seja escrito um numero e uma letra ou uma letra e um numero (obrigatoriamente) para isso tenho esse regex: ^[A-Za-z].*[0-9]|[0-9].*[A-Za-z]+$ Esse regex acima obriga que deve ser digitado pelo ao menos 1 letra e 1 numero ou vice versa eu preciso implementar esse regex para que ele possa aceitar todos os caracteres: `´~!@#$%^&*()_+={[};:'"<,->.?/|\] e mais todos os acentos por ex: Áá e etc... Se puderem ajudar...
  8. Uma vez baixei um script na net de uma determinada marca, e quando fui edita-lo editei completamente mais a unica coisa que não consegui trocar foi os creditos do autor que ficam aparecendo no final da pagina, tentei de tudo e olha que os arquivos eram apenas html e javascript não tinha php nem nada, nas paginas html tinha a tag div creditos mais dentro da div não tinha nada então apaguei essa div e quando acessei o sistema ele ficou todo zuado ilegivel no browser então recoloquei a div de apenas alguns caracteres de volta ao lugar na pagina html e ele funcionou corretamente. Tentei alterar o javascript procurei pelas tags "desenvolvido" e nada tentei procurar assim d/s/e/n/v/o/l/v/i/d/o tambem não obtive sucesso fui retirando partes do script que achava que poderia ser a parte dos creditos e nada quando retirava o sistema ficava deficiente. Ate que por ultimo resolvi o problema. Mais foi quase impossivel fazer isso. Por isso gostaria de saber se alguém aqui no forum sabe fazer um credito impossivel de ser retirado via javascript, php, ou qualquer outra linguagem. Os creditos deveriam ficar la sempre e impossiveis de achar o local onde se encontram no codigo e se achasse se retirasse-o o script não funcionasse.
  9. Olá estou com um simples problema: Tenho um sistema php simples de redefinição de senha de email no cpanel, ele está funcionando perfeitamente, mas o problema é que quando clico no botao "redefinir senha" no meu formulário ele processa normalmente e altera a senha, mas ele não exibe nenhum alert ou qualquer menssagem dizendo que a senha foi alterada com sucesso ou não. Ele apenas altera a senha normalmente e recarrega a pagina ou seja ao processar fica na mesma pagina, apenas zera os valores do formulario. Preciso que ao processar o codigo php (ou seja ao redefinir a senha com sucesso) ele exiba um alert dizendo por ex: "Sua senha foi alterada com Sucesso!" Segue abaixo o código php que estou usando: $theme = "x3"; if (isset($_SESSION["usermail"])) { $postfields = "email=" . $_SESSION["usermail"] . "&domain=" . $domain . "&password=" . $_POST['senha'] . '&quota=1'; $popPost = curl_init(); $url = "http://" . $username . ":" . $password . "@" . $domain . ":2082/frontend/" . $theme . "/mail/dopasswdpop.html?" . $postfields; curl_setopt($popPost, CURLOPT_URL, $url); curl_setopt($popPost, CURLOPT_POST, 1); curl_setopt($popPost, CURLOPT_RETURNTRANSFER, 1); curl_setopt($popPost, CURLOPT_TIMEOUT, 15); $popPost_result = curl_exec ($popPost); curl_close ($popPost); $start = strpos($popPost_result, '<b>Account'); $end = strpos($popPost_result, '<!-- pre tag ended here -->'); $responce = substr($popPost_result, $start, $end-$start); } Tentei adicionar no final do codigo php (apos a string $responce) a seguinte linha de comando: if ($responce = substr($popPost_result, $start, $end-$start)) { echo "<script language='javascript' type='text/javascript'> alert('Senha alterada com Sucesso! Clique em OK para se Logar.'); window.location.replace('./login.php'); </script>"; } Mas tambem não funcionou! Por favor se puderem me dar alguma luz para resolver este problema ficarei agradecido... Bom final de semana a todos...
  10. Ola galera boa noite, não sou muito bom em postar em foruns mais vou tentar especificar o melhor possivel o meu problema! é o seguinte: Eu estou criando um sistema de webmail para minha universidade este sistema funcionara da seguinte forma: Pagina de Cadastro (O usuario vai preencher um formulario com dados como: nome, cpf, nome de usuario (para o email, por ex: o usuario vai colocar so o username o @xxx.com é inserido automatico), senha, confirmar senha, pergunta secreta e resposta secreta (para recuperar a senha). Bom esses dados vao para um banco de dados armazeno os seguintes dados vindo do formulario de cadastro: nome, cpf, email(já formatado: usuario@xxx.com), senha, pergunta e resposta, o motivo de eu querer armazenar estes dados no banco de dados e porque o sistema de webmail vai ter uma pagina para o professor que ira enviar emails para os alunos ai os recipientes vao vir do banco de dados. Ate ai tudo bem, já criei o formulario de cadastro, já criei a tabela no bd, e o formulario já esta funcionando perfeitamente já esta armazenando todos os dados que eu quero no banco de dados. So que agora eu preciso criar realmente o email no cpanel, e isso tem que ser de forma automatica para isso eu desenvolvi um sisteminha simples em php que cria emails no cpanel este sistema funciona da seguinte forma: Usuario desejado: input text /@dominio.com.br Senha: input text button submit somente isso! o usuario digita o nome de usuario para o email desejado, cria a senha e clika no botao submit e já automaticamente o sistema cadastra o nome de email solicitado no cpanel. O sistema ta funcionando perfeitamente tambem. Agora chega no meu problema: Eu preciso tipo agrupar estes dois sistemas em 1 por exemplo quero que ao preencher o formulario de cadastro e envia-lo quero que já cadastre o email no cpanel, ou seja quero que o sistema de cadastro (que apenas insere os dados no bd) rode junto o sistema php que desenvolvi para criar o email no cpanel ai no caso o sistema iria pegar os valores no banco de dados (já inseridos pelo form de cadastro) por exemplo ao invés de usar $_POST para pegar os valores dos inputs $email e $senha, quero que ele pegue o valor da string do formulario de cadastro por exemplo ele vai pegar o valor $email e o valor $senha do formulario de cadastro e com esses valores inserir no cpanel. Mas para pegar estes 2 valores (senha e email) eu quero que esse sistema php que cria as contas de email no cpanel faca uma busca no bd (dos usuarios cadastrados) e pegue esses 2 valores la atraves das strings $email e $senha que estao no formulario de cadastro e assim cadastrar o email que o usuario pretente criar. Os sistemas estao funcionando corretamente mais estao funcionando individualmente, ai eu preciso de alguma forma agrupa-los para que o form de cadastro já automaticamente crie o email no cpanel. Codigo do formulario Cadastro.php <?php require("config.php");//arquivo de config para acessar o phpmyadmin $acao = strip_tags( $_GET['acao'] ); ?> <p><span style="color:#F00">Atenção:</span> O cadastro aqui somente poderá ser efetuado por alunos IFMG, caso contrário sua conta será automaticamente excluída sem nenhum aviso prévio!</p> <br /> <?php if( empty( $acao ) ) { ?> <form action="cadastro.php?acao=add" class="formCadastro" name="formcadastre" id="formCadastro" onsubmit="return validateForm()" method="post"> <label>Nome</label> <div class="inputsCadastro"> <input name="nome" title="Preencha com seu Nome" type="text" class="validate[required,custom[onlyLetterSp]]" id="nome" value="" /> </div><br /> <label>CPF</label> <div class="inputsCadastro"> <input name="cpf" title="Preencha com seu CPF" type="text" id="cpf" class="validate[required]" value="" maxlength="11" /> </div><br /> <label>Login Desejado</label> <div class="inputNmail"> <input name="xmail" title="Digite o login desejado" type="text" id="nMail" class="validate[required,custom[nMail]]" value="" maxlength="50" /><div class="mailinfo">@adm.ifmg.br</div> </div><br /> <label>Senha</label> <div class="inputsCadastro"> <input name="senha" title="Informe uma Senha" type="password" class="validate[required,minSize[8],custom[onlyLetterNumber]]" id="password" value="" maxlength="20" /> </div><br /> <label>Confirme a Senha</label> <div class="inputsCadastro"> <input name="confirma_senha" title="Redigite a senha informada acima" type="password" class="validate[required,equals[password]]" id="password2" value="" maxlength="10" /> </div><br /> <p>Responda abaixo uma pergunta secreta que será solicitada para recuperação de senha</p><br /> <label>Pergunta Secreta</label> <!-- We are going to use jQuery to hide the select element and replace it --> <select name="pergunta" class="makeMeFancy" title="Escolha uma pergunta secreta para responder"> <!-- Notice the HTML5 data attributes --> <option value="" selected="selected" data-skip="1">Escolha uma Pergunta</option> <option value="1" data-html-text="Melhor amigo de infância?">Melhor amigo de infância?</option> <option value="2" data-html-text="Local onde nasceu?">Local onde nasceu?</option> <option value="3" data-html-text="Personagem histórico favorito?">Personagem histórico favorito?</option> <option value="4" data-html-text="Professor favorito?">Professor favorito?</option> </select> <br /> <label>Resposta</label> <div class="inputsCadastro"> <input name="resposta" title="Informe a Resposta para a pergunta escolhida" type="text" id="resposta" class="validate[required]" value="" /> </div><br /> <center><input class="inputCadastrar_off" title="Cadastrar" type="submit" value="Cadastrar" /></center> </form> <?php } // fim da ação EMPTY if( $acao == 'add') { extract( $_POST, EXTR_OVERWRITE); // extrai os dados do POST, transformando os indices em nomes. Sobrescreve as variaveis existentes, se houver ////Pegamos os valores do formulario $nome = $_POST['nome']; $cpf = $_POST['cpf']; $xmail = $_POST['xmail']; $senha = $_POST['senha']; $pergunta = $_POST['pergunta']; $resposta = $_POST['resposta']; ////Agrupamos o User + Endereco final do dominio $xmailUsr="$xmail"; $xmailEnd="@adm.ifmg.br"; $xmailCp="$xmailUsr"."$xmailEnd"; //Aqui validamos o cpf para não duplicar $sql1 = mysql_query("SELECT id FROM usuarios WHERE cpf='$cpf'"); $vcpf = mysql_num_rows($sql1); if( !empty( $cpf ) && $vcpf > 0){ echo "<script language='javascript' type='text/javascript'> alert('Ops, este CPF já está registrado em nosso banco de dados! Tente outro CPF!'); window.location.href='java script:history.go(-1)' </script>"; echo "<script language='javascript' type='text/javascript'> window.location.href='java script:history.go(-1)' </script>"; exit; } //Aqui validamos o usuariomail para não duplicar $sql1 = mysql_query("SELECT id FROM usuarios WHERE xmail='$xmailCp'"); $xmail = mysql_num_rows($sql1); if( !empty( $xmailCp ) && $xmail > 0){ echo "<script language='javascript' type='text/javascript'> alert('Ops, o nome de usuário $xmailCp já está em uso! Tente um outro nome de usuário!'); window.location.href='java script:history.go(-1)' </script>"; echo "<script language='javascript' type='text/javascript'> window.location.href='java script:history.go(-1)' </script>"; exit; } $data = date( "d/m/Y" ); $hora = date( "H:i:s" ); $sql = mysql_query("INSERT INTO usuarios (nome, cpf, xmail, senha, pergunta, resposta) VALUES ('$nome', '$cpf', '$xmailCp', '$senha', '$pergunta', '$resposta')") or print(mysql_error()); $ultimo_id = mysql_insert_id(); echo '<script language="javascript" type="text/javascript"> alert("Seu cadastro foi realizado com Sucesso! Clique em OK para se Logar."); window.location.href="login.php" </script>'; } ?> Banco de dados usuarios.sql -- phpMyAdmin SQL Dump -- version 3.4.9 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Mar 27, 2012 at 09:33 PM -- Server version: 5.0.95 -- PHP Version: 5.2.9 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `ovdscomb_ifmg` -- -- -------------------------------------------------------- -- -- Table structure for table `usuarios` -- CREATE TABLE IF NOT EXISTS `usuarios` ( `id` int(20) NOT NULL auto_increment, `nome` varchar(100) character set utf8 default NULL, `cpf` varchar(100) character set utf8 default NULL, `xmail` varchar(100) character set utf8 default NULL, `senha` varchar(100) character set utf8 default NULL, `pergunta` varchar(100) character set utf8 default NULL, `resposta` varchar(100) character set utf8 default NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=27; -- -- Dumping data for table `usuarios` -- INSERT INTO `usuarios` (`id`, `nome`, `cpf`, `xmail`, `senha`, `pergunta`, `resposta`) VALUES (23, 'Vinicius', '090.900.000-00', 'unmeanings@adm.ifmg.br', 'qwerty123', '2', 'não sei'), (24, 'Teste', '433.333.333-33', 'vamostestar@adm.ifmg.br', '1q2w3e4r', '1', 'sa'), (25, 'Okay', '121.111.111-11', 'tudookagr@adm.ifmg.br', 'qwerty231', '1', 'sassa'), (26, 'wer', '325.544.445-55', 'qwertyu@adm.ifmg.br', '13090909', '1', 'adsd'); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; Sistema que cria o email automatico no cpanel <?php $cpmod = 'x3'; // Tema de seu CPANEL $host = 'site.com.br'; // Digite seu host $port = '2082'; // Porta do CPANEL $port_mail = '2095'; // Porta do EMAIL $ownername = "usuario"; // Usuário CPANEL $reseller_pass = "senha"; // Senha CPANEL $domain = "$host"; // ========================================================= // DADOS POSTADOS POR FORMULÁRIO //----------------------------------------------------------------- $email = $_POST[email]; $password = $_POST[pass]; $quota = $_POST[quota]; if ($_POST[email]) { $request = "/frontend/$cpmod/mail/doaddpop.html?email=$email&domain=$domain&password=$password&quota=$quota"; $result = cprq($host,$port,$ownername,$reseller_pass,$request); $show = strip_tags($result); if (strpos($show, "already") !== false && strpos($show, "exists") !== false) { echo "Esta conta já existe!"; } else { echo"Conta criada com sucesso!"; } } function cprq($host,$port,$ownername,$reseller_pass,$request) { $sock = @fsockopen($host,$port); if(!$sock) { print('Erro de conexão com soquete'); exit(); } $authstr = "$ownername:$reseller_pass"; $pass = base64_encode($authstr); $in = "GET $request\r\n"; $in .= "HTTP/1.0\r\n"; $in .= "Host:$domain\r\n"; $in .= "Authorization: Basic $pass\r\n"; $in .= "\r\n"; fputs($sock, $in); while (!feof($sock)) { $result .= fgets ($sock,128); } fclose( $sock ); return $result; } ?> <style type="text/css"> <!-- .style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; } .style2 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; } --> </style> <form id="form1" name="form1" method="post" action=""> <table width="100%" border="0" cellspacing="10" cellpadding="0"> <tr> <td width="30%" class="style1"> <div align="right"><b> <span class="style1">Conta:</span> <input name="email" type="text" id="email" /> </b></div> </td> <td width="70%" class="style2">@ <select name="select"> <option value="<?php echo $host; ?>"><?php echo $host; ?></option> </select> </td> </tr> <tr> <td class="style1"> <div align="right" class="style2">Senha:</div> </td> <td class="style1"> <input name="pass" type="text" id="pass" /> </td> </tr> <tr> <td class="style1"> <div align="right"><b>Cota:</b></div> </td> <td class="style1"> <input name="quota" type="text" id="quota" size="5" /> Megas ( vazio para ilimitado ) </td> </tr> <tr> <td class="style1">&nbsp;</td> <td class="style1"> <input name="Submit" type="submit" class="style1" value="Submeter" /> </td> </tr> </table> </form> não sei se entendeream mais se não tiver entendido responda com uma pergunta perguntando o que não entendeu porque ai tento explicar melhor... Espero que possam me ajudar
  11. Ola Boa noite a todos... Estou precisando urgente de um sistema bem simples de sms em php, o que preciso que esse sistema faca é o seguinte: Ele ira enviar uma menssagem automatica (padrão) para um determinado numero (o numero que o usuario colocar no formulario) O que preciso é simples quero que esse sistema envia uma menssagem padrão escrita por mim para o numero inserido no formulario (não quero que o usuario digite a menssagem...) Um exemplo desse sistema é aqueles sistemas de cadastrar seu celular para efetuar downloads (protetor de link) (voce poe o seu numero de celular, escolhe a operadora e voce recebe uma sms padrão do site) é isso que eu quero! O sistema deve conter apenas um select com as operadoras claro vivo oi tim, etc... e o campo de texto para digitar o numero do celular... Procurei isso na net mais não consegui achar... Conto com a ajuda de voces, se alguém puder quebrar esse galho pra mim :) e é isso ai galera, vlw ate mais (aguardo respostas)
  12. Ola tenho uma textarea na qual sua string esta codificada (Ou seja se eu escrever qualquer caractere especial como tags em html <>/ etc...) ela gera a visualizacao em outra string exibindo como texto puro por exemplo se eu escrevi na string (textarea): <img src="lala.jpg"/> ela ira me mostrar na outra string exatamente o codigo escrito (<img src...) O que preciso é que na segunda string onde recebo os dados inseridos na primeira string, decodifique os caracteres especiais escritos(<>/...) e gere a visualizacao em html ou seja se eu coloquei (<img src="lala.jpg"/>) ele mostre ao invés do codigo mostre a imagem lala.jpg Segue abaixo o codigo da segunda string (que recebe o valor da primeira string)(A string chama-se $content e esta localizada no final do codigo): <?php /** * SocialEngine * * @category Application_Core * @package Fields * @copyright Copyright 2006-2010 Webligo Developments * @license http://www.socialengine.net/license/ * @version $Id: FieldValueLoop.php 8435 2011-02-10 03:42:17Z steve $ * @author John */ /** * @category Application_Core * @package Fields * @copyright Copyright 2006-2010 Webligo Developments * @license http://www.socialengine.net/license/ * @author John */ class Fields_View_Helper_FieldValueLoop extends Fields_View_Helper_FieldAbstract { public function fieldValueLoop($subject, $partialStructure) { if( empty($partialStructure) ) { return ''; } if( !($subject instanceof Core_Model_Item_Abstract) || !$subject->getIdentity() ) { return ''; } // Generate $content = ''; $lastContents = ''; $lastHeadingTitle = null; //Zend_Registry::get('Zend_Translate')->_("Missing heading"); $viewer = Engine_Api::_()->user()->getViewer(); $show_hidden = $viewer->getIdentity() ? ($subject->getOwner()->isSelf($viewer) || 'admin' === Engine_Api::_()->getItem('authorization_level', $viewer->level_id)->type) : false; foreach( $partialStructure as $map ) { // Get field meta object $field = $map->getChild(); $value = $field->getValue($subject); if( !$field || $field->type == 'profile_type' ) continue; if( !$field->display && !$show_hidden ) continue; // Heading if( $field->type == 'heading' ) { if( !empty($lastContents) ) { $content .= $this->_buildLastContents($lastContents, $lastHeadingTitle); $lastContents = ''; } $lastHeadingTitle = $this->view->translate($field->label); } // Normal fields else { $tmp = $this->getFieldValueString($field, $value, $subject, $map, $partialStructure); if( !empty($tmp) ) { $notice = !$field->display && $show_hidden ? sprintf('<div class="tip"><span>%s</span></div>', $this->view->translate('This field is hidden and only visible to you and admins:')) : ''; $label = $this->view->translate($field->label); $lastContents .= <<<EOF <li> {$notice} <span> {$label} </span> <span> {$tmp} </span> </li> EOF; } $lastContents .= ''; $lastContents; } } if( !empty($lastContents) ) { $content .= $this->_buildLastContents($lastContents, $lastHeadingTitle); } return $content; } public function getFieldValueString($field, $value, $subject, $map = null, $partialStructure = null) { if( (!is_object($value) || !isset($value->value)) && !is_array($value) ) { return null; } // @todo This is not good practice: // if($field->type =='textarea'||$field->type=='about_me') $value->value = nl2br($value->value); $helperName = Engine_Api::_()->fields()->getFieldInfo($field->type, 'helper'); if( !$helperName ) { return null; } $helper = $this->view->getHelper($helperName); if( !$helper ) { return null; } $helper->structure = $partialStructure; $helper->map = $map; $helper->field = $field; $helper->subject = $subject; $tmp = $helper->$helperName($subject, $field, $value); unset($helper->structure); unset($helper->map); unset($helper->field); unset($helper->subject); return $tmp; } protected function _buildLastContents($content, $title) { if( !$title ) { return '<ul>' . $content . '</ul>'; } return <<<EOF <div class="profile_fields"> <h4> <span>{$title}</span> </h4> <ul> {$content} </ul> </div> EOF; } } Eu uso o ZEND framework em meu sistema e apos procurar e procurar achei o arquivo responsavel pelo encode ('htmlspecialchars', 'htmlentities') no qual nome do arquivo zend é abstract.php segue abaixo o codigo abstract.php: <?php /** * Zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * * @category Zend * @package Zend_View * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Abstract.php 16541 2009-07-07 06:59:03Z bkarwin $ */ /** Zend_Loader */ // require_once 'Zend/Loader.php'; /** Zend_Loader_PluginLoader */ // require_once 'Zend/Loader/PluginLoader.php'; /** Zend_View_Interface */ // require_once 'Zend/View/Interface.php'; /** * Abstract class for Zend_View to help enforce private constructs. * * @category Zend * @package Zend_View * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class Zend_View_Abstract implements Zend_View_Interface { /** * Path stack for script, helper, and filter directories. * * @var array */ private $_path = array( 'script' => array(), 'helper' => array(), 'filter' => array(), ); /** * Script file name to execute * * @var string */ private $_file = null; /** * Instances of helper objects. * * @var array */ private $_helper = array(); /** * Map of helper => class pairs to help in determining helper class from * name * @var array */ private $_helperLoaded = array(); /** * Map of helper => classfile pairs to aid in determining helper classfile * @var array */ private $_helperLoadedDir = array(); /** * Stack of Zend_View_Filter names to apply as filters. * @var array */ private $_filter = array(); /** * Stack of Zend_View_Filter objects that have been loaded * @var array */ private $_filterClass = array(); /** * Map of filter => class pairs to help in determining filter class from * name * @var array */ private $_filterLoaded = array(); /** * Map of filter => classfile pairs to aid in determining filter classfile * @var array */ private $_filterLoadedDir = array(); /** * Callback for escaping. * * @var string */ private $_escape = 'htmlspecialchars'; /** * Encoding to use in escaping mechanisms; defaults to latin1 (ISO-8859-1) * @var string */ private $_encoding = 'ISO-8859-1'; /** * Flag indicating whether or not LFI protection for rendering view scripts is enabled * @var bool */ private $_lfiProtectionOn = true; /** * Plugin loaders * @var array */ private $_loaders = array(); /** * Plugin types * @var array */ private $_loaderTypes = array('filter', 'helper'); /** * Strict variables flag; when on, undefined variables accessed in the view * scripts will trigger notices * @var boolean */ private $_strictVars = false; private $_log; /** * Constructor. * * @param array $config Configuration key-value pairs. */ public function __construct($config = array()) { // set inital paths and properties $this->setScriptPath(null); // $this->setHelperPath(null); $this->setFilterPath(null); // user-defined escaping callback if (array_key_exists('escape', $config)) { $this->setEscape($config['escape']); } // encoding if (array_key_exists('encoding', $config)) { $this->setEncoding($config['encoding']); } // base path if (array_key_exists('basePath', $config)) { $prefix = 'Zend_View'; if (array_key_exists('basePathPrefix', $config)) { $prefix = $config['basePathPrefix']; } $this->setBasePath($config['basePath'], $prefix); } // user-defined view script path if (array_key_exists('scriptPath', $config)) { $this->addScriptPath($config['scriptPath']); } // user-defined helper path if (array_key_exists('helperPath', $config)) { if (is_array($config['helperPath'])) { foreach ($config['helperPath'] as $prefix => $path) { $this->addHelperPath($path, $prefix); } } else { $prefix = 'Zend_View_Helper'; if (array_key_exists('helperPathPrefix', $config)) { $prefix = $config['helperPathPrefix']; } $this->addHelperPath($config['helperPath'], $prefix); } } // user-defined filter path if (array_key_exists('filterPath', $config)) { if (is_array($config['filterPath'])) { foreach ($config['filterPath'] as $prefix => $path) { $this->addFilterPath($path, $prefix); } } else { $prefix = 'Zend_View_Filter'; if (array_key_exists('filterPathPrefix', $config)) { $prefix = $config['filterPathPrefix']; } $this->addFilterPath($config['filterPath'], $prefix); } } // user-defined filters if (array_key_exists('filter', $config)) { $this->addFilter($config['filter']); } // strict vars if (array_key_exists('strictVars', $config)) { $this->strictVars($config['strictVars']); } // LFI protection flag if (array_key_exists('lfiProtectionOn', $config)) { $this->setLfiProtection($config['lfiProtectionOn']); } $this->init(); } /** * Return the template engine object * * Returns the object instance, as it is its own template engine * * @return Zend_View_Abstract */ public function getEngine() { return $this; } /** * Allow custom object initialization when extending Zend_View_Abstract or * Zend_View * * Triggered by {@link __construct() the constructor} as its final action. * * @return void */ public function init() { } /** * Prevent E_NOTICE for nonexistent values * * If {@link strictVars()} is on, raises a notice. * * @param string $key * @return null */ public function __get($key) { if ($this->_strictVars) { trigger_error('Key "' . $key . '" does not exist', E_USER_NOTICE); } return null; } /** * Allows testing with empty() and isset() to work inside * templates. * * @param string $key * @return boolean */ public function __isset($key) { if ('_' != substr($key, 0, 1)) { return isset($this->$key); } return false; } /** * Directly assigns a variable to the view script. * * Checks first to ensure that the caller is not attempting to set a * protected or private member (by checking for a prefixed underscore); if * not, the public member is set; otherwise, an exception is raised. * * @param string $key The variable name. * @param mixed $val The variable value. * @return void * @throws Zend_View_Exception if an attempt to set a private or protected * member is detected */ public function __set($key, $val) { if ('_' != substr($key, 0, 1)) { $this->$key = $val; return; } // require_once 'Zend/View/Exception.php'; throw new Zend_View_Exception('Setting private or protected class members is not allowed', $this); } /** * Allows unset() on object properties to work * * @param string $key * @return void */ public function __unset($key) { if ('_' != substr($key, 0, 1) && isset($this->$key)) { unset($this->$key); } } /** * Accesses a helper object from within a script. * * If the helper class has a 'view' property, sets it with the current view * object. * * @param string $name The helper name. * @param array $args The parameters for the helper. * @return string The result of the helper output. */ public function __call($name, $args) { // is the helper already loaded? $helper = $this->getHelper($name); // call the helper method return call_user_func_array( array($helper, $name), $args ); } /** * Given a base path, sets the script, helper, and filter paths relative to it * * Assumes a directory structure of: * <code> * basePath/ * scripts/ * helpers/ * filters/ * </code> * * @param string $path * @param string $prefix Prefix to use for helper and filter paths * @return Zend_View_Abstract */ public function setBasePath($path, $classPrefix = 'Zend_View') { $path = rtrim($path, '/'); $path = rtrim($path, '\\'); $path .= DIRECTORY_SEPARATOR; $classPrefix = rtrim($classPrefix, '_') . '_'; $this->setScriptPath($path . 'scripts'); $this->setHelperPath($path . 'helpers', $classPrefix . 'Helper'); $this->setFilterPath($path . 'filters', $classPrefix . 'Filter'); return $this; } /** * Given a base path, add script, helper, and filter paths relative to it * * Assumes a directory structure of: * <code> * basePath/ * scripts/ * helpers/ * filters/ * </code> * * @param string $path * @param string $prefix Prefix to use for helper and filter paths * @return Zend_View_Abstract */ public function addBasePath($path, $classPrefix = 'Zend_View') { $path = rtrim($path, '/'); $path = rtrim($path, '\\'); $path .= DIRECTORY_SEPARATOR; $classPrefix = rtrim($classPrefix, '_') . '_'; $this->addScriptPath($path . 'scripts'); $this->addHelperPath($path . 'helpers', $classPrefix . 'Helper'); $this->addFilterPath($path . 'filters', $classPrefix . 'Filter'); return $this; } /** * Adds to the stack of view script paths in LIFO order. * * @param string|array The directory (-ies) to add. * @return Zend_View_Abstract */ public function addScriptPath($path) { $this->_addPath('script', $path); return $this; } /** * Resets the stack of view script paths. * * To clear all paths, use Zend_View::setScriptPath(null). * * @param string|array The directory (-ies) to set as the path. * @return Zend_View_Abstract */ public function setScriptPath($path) { $this->_path['script'] = array(); $this->_addPath('script', $path); return $this; } /** * Return full path to a view script specified by $name * * @param string $name * @return false|string False if script not found * @throws Zend_View_Exception if no script directory set */ public function getScriptPath($name) { try { $path = $this->_script($name); return $path; } catch (Zend_View_Exception $e) { if (strstr($e->getMessage(), 'no view script directory set')) { throw $e; } return false; } } /** * Returns an array of all currently set script paths * * @return array */ public function getScriptPaths() { return $this->_getPaths('script'); } /** * Set plugin loader for a particular plugin type * * @param Zend_Loader_PluginLoader $loader * @param string $type * @return Zend_View_Abstract */ public function setPluginLoader(Zend_Loader_PluginLoader $loader, $type) { $type = strtolower($type); if (!in_array($type, $this->_loaderTypes)) { // require_once 'Zend/View/Exception.php'; throw new Zend_View_Exception(sprintf('Invalid plugin loader type "%s"', $type)); } $this->_loaders[$type] = $loader; return $this; } /** * Retrieve plugin loader for a specific plugin type * * @param string $type * @return Zend_Loader_PluginLoader */ public function getPluginLoader($type) { $type = strtolower($type); if (!in_array($type, $this->_loaderTypes)) { // require_once 'Zend/View/Exception.php'; throw new Zend_View_Exception(sprintf('Invalid plugin loader type "%s"; cannot retrieve', $type)); } if (!array_key_exists($type, $this->_loaders)) { $prefix = 'Zend_View_'; $pathPrefix = 'Zend/View/'; $pType = ucfirst($type); switch ($type) { case 'filter': case 'helper': default: $prefix .= $pType; $pathPrefix .= $pType; $loader = new Zend_Loader_PluginLoader(array( $prefix => $pathPrefix )); $this->_loaders[$type] = $loader; break; } } return $this->_loaders[$type]; } /** * Adds to the stack of helper paths in LIFO order. * * @param string|array The directory (-ies) to add. * @param string $classPrefix Class prefix to use with classes in this * directory; defaults to Zend_View_Helper * @return Zend_View_Abstract */ public function addHelperPath($path, $classPrefix = 'Zend_View_Helper_') { return $this->_addPluginPath('helper', $classPrefix, (array) $path); } /** * Resets the stack of helper paths. * * To clear all paths, use Zend_View::setHelperPath(null). * * @param string|array $path The directory (-ies) to set as the path. * @param string $classPrefix The class prefix to apply to all elements in * $path; defaults to Zend_View_Helper * @return Zend_View_Abstract */ public function setHelperPath($path, $classPrefix = 'Zend_View_Helper_') { unset($this->_loaders['helper']); return $this->addHelperPath($path, $classPrefix); } /** * Get full path to a helper class file specified by $name * * @param string $name * @return string|false False on failure, path on success */ public function getHelperPath($name) { return $this->_getPluginPath('helper', $name); } /** * Returns an array of all currently set helper paths * * @return array */ public function getHelperPaths() { return $this->getPluginLoader('helper')->getPaths(); } /** * Get a helper by name * * @param string $name * @return object */ public function getHelper($name) { return $this->_getPlugin('helper', $name); } /** * Get array of all active helpers * * Only returns those that have already been instantiated. * * @return array */ public function getHelpers() { return $this->_helper; } /** * Adds to the stack of filter paths in LIFO order. * * @param string|array The directory (-ies) to add. * @param string $classPrefix Class prefix to use with classes in this * directory; defaults to Zend_View_Filter * @return Zend_View_Abstract */ public function addFilterPath($path, $classPrefix = 'Zend_View_Filter_') { return $this->_addPluginPath('filter', $classPrefix, (array) $path); } /** * Resets the stack of filter paths. * * To clear all paths, use Zend_View::setFilterPath(null). * * @param string|array The directory (-ies) to set as the path. * @param string $classPrefix The class prefix to apply to all elements in * $path; defaults to Zend_View_Filter * @return Zend_View_Abstract */ public function setFilterPath($path, $classPrefix = 'Zend_View_Filter_') { unset($this->_loaders['filter']); return $this->addFilterPath($path, $classPrefix); } /** * Get full path to a filter class file specified by $name * * @param string $name * @return string|false False on failure, path on success */ public function getFilterPath($name) { return $this->_getPluginPath('filter', $name); } /** * Get a filter object by name * * @param string $name * @return object */ public function getFilter($name) { return $this->_getPlugin('filter', $name); } /** * Return array of all currently active filters * * Only returns those that have already been instantiated. * * @return array */ public function getFilters() { return $this->_filter; } /** * Returns an array of all currently set filter paths * * @return array */ public function getFilterPaths() { return $this->getPluginLoader('filter')->getPaths(); } /** * Return associative array of path types => paths * * @return array */ public function getAllPaths() { $paths = $this->_path; $paths['helper'] = $this->getHelperPaths(); $paths['filter'] = $this->getFilterPaths(); return $paths; } /** * Add one or more filters to the stack in FIFO order. * * @param string|array One or more filters to add. * @return Zend_View_Abstract */ public function addFilter($name) { foreach ((array) $name as $val) { $this->_filter[] = $val; } return $this; } /** * Resets the filter stack. * * To clear all filters, use Zend_View::setFilter(null). * * @param string|array One or more filters to set. * @return Zend_View_Abstract */ public function setFilter($name) { $this->_filter = array(); $this->addFilter($name); return $this; } /** * Sets the _escape() callback. * * @param mixed $spec The callback for _escape() to use. * @return Zend_View_Abstract */ public function setEscape($spec) { $this->_escape = $spec; return $this; } /** * Set LFI protection flag * * @param bool $flag * @return Zend_View_Abstract */ public function setLfiProtection($flag) { $this->_lfiProtectionOn = (bool) $flag; return $this; } /** * Return status of LFI protection flag * * @return bool */ public function isLfiProtectionOn() { return $this->_lfiProtectionOn; } /** * Assigns variables to the view script via differing strategies. * * Zend_View::assign('name', $value) assigns a variable called 'name' * with the corresponding $value. * * Zend_View::assign($array) assigns the array keys as variable * names (with the corresponding array values). * * @see __set() * @param string|array The assignment strategy to use. * @param mixed (Optional) If assigning a named variable, use this * as the value. * @return Zend_View_Abstract Fluent interface * @throws Zend_View_Exception if $spec is neither a string nor an array, * or if an attempt to set a private or protected member is detected */ public function assign($spec, $value = null) { // which strategy to use? if (is_string($spec)) { // assign by name and value if ('_' == substr($spec, 0, 1)) { // require_once 'Zend/View/Exception.php'; throw new Zend_View_Exception('Setting private or protected class members is not allowed', $this); } $this->$spec = $value; } elseif (is_array($spec)) { // assign from associative array $error = false; foreach ($spec as $key => $val) { // Webligo fix if ('' == $key || '_' == substr($key, 0, 1)) { //if ('_' == substr($key, 0, 1)) { $error = true; break; } $this->$key = $val; } if ($error) { // require_once 'Zend/View/Exception.php'; throw new Zend_View_Exception('Setting private or protected class members is not allowed', $this); } } else { // require_once 'Zend/View/Exception.php'; throw new Zend_View_Exception('assign() expects a string or array, received ' . gettype($spec), $this); } return $this; } /** * Return list of all assigned variables * * Returns all public properties of the object. Reflection is not used * here as testing reflection properties for visibility is buggy. * * @return array */ public function getVars() { $vars = get_object_vars($this); foreach ($vars as $key => $value) { if ('_' == substr($key, 0, 1)) { unset($vars[$key]); } } return $vars; } /** * Clear all assigned variables * * Clears all variables assigned to Zend_View either via {@link assign()} or * property overloading ({@link __set()}). * * @return void */ public function clearVars() { $vars = get_object_vars($this); foreach ($vars as $key => $value) { if ('_' != substr($key, 0, 1)) { unset($this->$key); } } } /** * Processes a view script and returns the output. * * @param string $name The script script name to process. * @return string The script output. */ public function render($name) { // find the script file name using the parent private method $this->_file = $this->_script($name); unset($name); // remove $name from local scope ob_start(); $this->_run($this->_file); return $this->_filter(ob_get_clean()); // filter output } /** * Escapes a value for output in a view script. * * If escaping mechanism is one of htmlspecialchars or htmlentities, uses * {@link $_encoding} setting. * * @param mixed $var The output to escape. * @return mixed The escaped value. */ public function escape($var) { if (in_array($this->_escape, array('htmlspecialchars', 'htmlentities'))) { return call_user_func($this->_escape, $var, ENT_COMPAT, $this->_encoding); } return call_user_func($this->_escape, $var); } /** * Set encoding to use with htmlentities() and htmlspecialchars() * * @param string $encoding * @return Zend_View_Abstract */ public function setEncoding($encoding) { $this->_encoding = $encoding; return $this; } /** * Return current escape encoding * * @return string */ public function getEncoding() { return $this->_encoding; } /** * Enable or disable strict vars * * If strict variables are enabled, {@link __get()} will raise a notice * when a variable is not defined. * * Use in conjunction with {@link Zend_View_Helper_DeclareVars the declareVars() helper} * to enforce strict variable handling in your view scripts. * * @param boolean $flag * @return Zend_View_Abstract */ public function strictVars($flag = true) { $this->_strictVars = ($flag) ? true : false; return $this; } /** * Finds a view script from the available directories. * * @param $name string The base name of the script. * @return void */ protected function _script($name) { if ($this->isLfiProtectionOn() && preg_match('#\.\.[\\\/]#', $name)) { // require_once 'Zend/View/Exception.php'; throw new Zend_View_Exception('Requested scripts may not include parent directory traversal ("../", "..\\" notation)'); } if (0 == count($this->_path['script'])) { // require_once 'Zend/View/Exception.php'; throw new Zend_View_Exception('no view script directory set; unable to determine location for view script', $this); } foreach ($this->_path['script'] as $dir) { if (is_readable($dir . $name)) { return $dir . $name; } } // require_once 'Zend/View/Exception.php'; $message = "script '$name' not found in path (" . implode(PATH_SEPARATOR, $this->_path['script']) . ")"; throw new Zend_View_Exception($message, $this); } /** * Applies the filter callback to a buffer. * * @param string $buffer The buffer contents. * @return string The filtered buffer. */ private function _filter($buffer) { // loop through each filter class foreach ($this->_filter as $name) { // load and apply the filter class $filter = $this->getFilter($name); $buffer = call_user_func(array($filter, 'filter'), $buffer); } // done! return $buffer; } /** * Adds paths to the path stack in LIFO order. * * Zend_View::_addPath($type, 'dirname') adds one directory * to the path stack. * * Zend_View::_addPath($type, $array) adds one directory for * each array element value. * * In the case of filter and helper paths, $prefix should be used to * specify what class prefix to use with the given path. * * @param string $type The path type ('script', 'helper', or 'filter'). * @param string|array $path The path specification. * @param string $prefix Class prefix to use with path (helpers and filters * only) * @return void */ private function _addPath($type, $path, $prefix = null) { foreach ((array) $path as $dir) { // attempt to strip any possible separator and // append the system directory separator $dir = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $dir); $dir = rtrim($dir, DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; switch ($type) { case 'script': // add to the top of the stack. array_unshift($this->_path[$type], $dir); break; case 'filter': case 'helper': default: // add as array with prefix and dir keys array_unshift($this->_path[$type], array('prefix' => $prefix, 'dir' => $dir)); break; } } } /** * Resets the path stack for helpers and filters. * * @param string $type The path type ('helper' or 'filter'). * @param string|array $path The directory (-ies) to set as the path. * @param string $classPrefix Class prefix to apply to elements of $path */ private function _setPath($type, $path, $classPrefix = null) { $dir = DIRECTORY_SEPARATOR . ucfirst($type) . DIRECTORY_SEPARATOR; switch ($type) { case 'script': $this->_path[$type] = array(dirname(__FILE__) . $dir); $this->_addPath($type, $path); break; case 'filter': case 'helper': default: $this->_path[$type] = array(array( 'prefix' => 'Zend_View_' . ucfirst($type) . '_', 'dir' => dirname(__FILE__) . $dir )); $this->_addPath($type, $path, $classPrefix); break; } } /** * Return all paths for a given path type * * @param string $type The path type ('helper', 'filter', 'script') * @return array */ private function _getPaths($type) { return $this->_path[$type]; } /** * Register helper class as loaded * * @param string $name * @param string $class * @param string $file path to class file * @return void */ private function _setHelperClass($name, $class, $file) { $this->_helperLoadedDir[$name] = $file; $this->_helperLoaded[$name] = $class; } /** * Register filter class as loaded * * @param string $name * @param string $class * @param string $file path to class file * @return void */ private function _setFilterClass($name, $class, $file) { $this->_filterLoadedDir[$name] = $file; $this->_filterLoaded[$name] = $class; } /** * Add a prefixPath for a plugin type * * @param string $type * @param string $classPrefix * @param array $paths * @return Zend_View_Abstract */ private function _addPluginPath($type, $classPrefix, array $paths) { $loader = $this->getPluginLoader($type); foreach ($paths as $path) { $loader->addPrefixPath($classPrefix, $path); } return $this; } /** * Get a path to a given plugin class of a given type * * @param string $type * @param string $name * @return string|false */ private function _getPluginPath($type, $name) { $loader = $this->getPluginLoader($type); if ($loader->isLoaded($name)) { return $loader->getClassPath($name); } try { $loader->load($name); return $loader->getClassPath($name); } catch (Zend_Loader_Exception $e) { return false; } } /** * Retrieve a plugin object * * @param string $type * @param string $name * @return object */ private function _getPlugin($type, $name) { $name = ucfirst($name); switch ($type) { case 'filter': $storeVar = '_filterClass'; $store = $this->_filterClass; break; case 'helper': $storeVar = '_helper'; $store = $this->_helper; break; } if (!isset($store[$name])) { $class = $this->getPluginLoader($type)->load($name); $store[$name] = new $class(); if (method_exists($store[$name], 'setView')) { $store[$name]->setView($this); } } $this->$storeVar = $store; return $store[$name]; } /** * Use to include the view script in a scope that only allows public * members. * * @return mixed */ abstract protected function _run(); } Obrigado pela atencao e espero que alguém possa me ajudar, boa noite... :)
  13. Oi galera fiz recentemente um post sobre o cms social engine no qual estava com problema na textarea não aceitar tags html... Bom eu consegui colocar nessa textarea um editor de html (tinymce), mas o problema é que quando eu vou atualizar o perfil do usuario (onde esta localizada a textarea (about me) (sobre mim), nela eu formato o texto como eu quizer coloco imagens videos, etc.. mais o problema é que quando eu clico em atualizar, a pagina que recebe essas informacoes, le a minha formatacao dessa textarea como texto puro, ou seja não é codificada nenhuma tag html, eu acho que isso pode ser um htmlpurifier ou algum parser que não esta codificando as tags html para a exibicao, mais eu não consigo localizar nenhum parser ou htmlpurifier nas pastas, o que isso pode ser? como resolver essa questao? Sugiro a voces para entender melhor baixem o trial version do cms social engine no site: http://www.socialengine.net/ Pois baixando o cms voces podem verificar as pastas e tentarem solucionar esse problema pra mim (PLS) A documentacao do social engine: http://www.socialengine.net/support/documentation O que quero fazer é bem simples... So quero fazer que a textarea (about me ou seja sobre mim) aceite tags html, pois ela so esta aceitando texto puro sem negrito nem quebra de linhas, por favor me ajudem nisso ai programadores ou alguém que saiba... Pode ser por MSN também, ou via assistencia remota não tem problema... Obrigado pela atencao de vocês aguardo uma resposta...
  14. o codigo da textarea já poassuia esse codigo que voce me informou: // build the element $xhtml = '<textarea name="' . $this->view->escape($name) . '"' . ' id="' . $this->view->escape($id) . '"' . $disabled . $this->_htmlAttribs($attribs) . '>' [i][u] . $this->view->escape($value) . '[/u][/i]</textarea>'; return $xhtml; } tentei tira-lo resultado-> nada aconteceu! continua não convertendo as tags html tentei tira-lo e recoloca-lo em posicao diferente pois ele estava entre <textarea>'.$this->view->escape($value).'</textarea> ai tirei ele e coloquei assim <textarea '.$this->view->escape($value).'></textarea tambem nada adiantou! sera que pode ser na pagina que exibe as informacoes preenchidas pelo usuario que pode estar não aceitando as tags html? ex: porque tem o formulario de editar o perfil e depois tem o formulario que exibe as informacoes editadas ne? sera que pode ser la? olhei no codigo fonte do perfil (onde esta o campo da textarea (aboutme)) nele temos: <div class="profile_fields"> <h4> <span>Personal Details</span> </h4> <ul> <li> <span> About Me </span> <span> testo [b]negrito[/b] textotexto okokok &lt;a href=&quot;http://www.google.com.br/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.google.com.br/&lt;/a&gt; </span> </li> </ul> </div>
  15. Cara desculpa ae é porque eu não consegui apagar o outro :wacko: (se voce puder apagar ai pra mim, pode apagar!) Respondendo sua Pergunta: Como assim manual? eu acho que não possui manual não voce pode ver um demo do sistema em: http://www.socialengine.net/examples/live-demos ou baixar a versao trial Nas ultimas linhas de codigo da textarea (penultimo codigo postado)(formTextarea.php) nesse codigo: // build the element $xhtml = '<textarea name="' . $this->view->escape($name) . '"' . ' id="' . $this->view->escape($id) . '"' . $disabled . $this->_htmlAttribs($attribs) . '>' . $this->view->escape($value) . '</textarea>'; return $xhtml; } não tem algum codigo php que eu possa acrescentar, substituir ou remover desse codigo que possa fazer ela pelo ao menos aceitar as tags html? Se pudesse talvez acrescentar dentro da tag ou antes não sei um codigo de allow_html sei la me ajuda ai preciso arrumar isso com urgencia :(
×
×
  • Criar Novo...