2008-09-23 22:12:24 +03:00
|
|
|
<?php
|
|
|
|
/*-------------------------------------------------------
|
|
|
|
*
|
|
|
|
* LiveStreet Engine Social Networking
|
|
|
|
* Copyright © 2008 Mzhelskiy Maxim
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------
|
|
|
|
*
|
|
|
|
* Official site: www.livestreet.ru
|
|
|
|
* Contact e-mail: rus.engine@gmail.com
|
|
|
|
*
|
|
|
|
* GNU General Public License, version 2:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
*
|
|
|
|
---------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Обрабатывает текс для предпросмотра контента
|
|
|
|
*/
|
|
|
|
|
|
|
|
set_include_path(get_include_path().PATH_SEPARATOR.dirname(dirname(dirname(__FILE__))));
|
2009-03-21 15:48:00 +02:00
|
|
|
$sDirRoot=dirname(dirname(dirname(__FILE__)));
|
|
|
|
require_once($sDirRoot."/config/config.ajax.php");
|
2008-09-23 22:12:24 +03:00
|
|
|
|
|
|
|
$sText=@$_REQUEST['text'];
|
2008-09-28 13:45:18 +03:00
|
|
|
$bSave=@$_REQUEST['save'];
|
2008-09-23 22:12:24 +03:00
|
|
|
$bStateError=true;
|
|
|
|
$sTextResult='';
|
|
|
|
if ($oEngine->User_IsAuthorization()) {
|
2008-09-28 13:45:18 +03:00
|
|
|
if ($bSave) {
|
|
|
|
$sTextResult=htmlspecialchars($sText);
|
2009-04-17 16:58:38 +03:00
|
|
|
} else {
|
|
|
|
$sTextResult=$oEngine->Text_Parser($sText);
|
2008-09-28 13:45:18 +03:00
|
|
|
}
|
2008-09-23 22:12:24 +03:00
|
|
|
$bStateError=false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$GLOBALS['_RESULT'] = array(
|
|
|
|
"bStateError" => $bStateError,
|
|
|
|
"sText" => $sTextResult,
|
|
|
|
);
|
|
|
|
|
2009-04-15 14:29:43 +03:00
|
|
|
?>
|