ALTER TABLE w_noticias ADD not_type int(1) NOT NULL;
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT `not_id`, `not_body`, `not_date`, `not_active` FROM w_noticias WHERE not_id = \'' .
(int)$not_id . '\' LIMIT 1');
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT `not_id`, `not_body`, `not_date`, `not_active`, `not_type` FROM w_noticias WHERE not_id = \'' .
(int)$not_id . '\' LIMIT 1');
/*
newNoticia()
*/
function newNoticia()
{
global $tsCore, $tsUser;
//
$not_body = $tsCore->setSecure($tsCore->parseBadWords(substr($_POST['not_body'],
0, 190)));
$not_active = empty($_POST['not_active']) ? 0 : 1;
if (!empty($not_body))
{
if (db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `w_noticias` (`not_body`, `not_autor`, `not_date`, `not_active`) VALUES (\'' .
$not_body . '\', \'' . $tsUser->uid . '\', \'' . time() . '\', \'' . $not_active .
'\')'))
return true;
}
//
return false;
}
/*
editNoticia()
*/
function editNoticia()
{
global $tsCore, $tsUser;
//
$not_id = intval($_GET['nid']);
$not_body = $tsCore->setSecure($tsCore->parseBadWords(substr($_POST['not_body'],
0, 190)));
$not_active = empty($_POST['not_active']) ? 0 : 1;
//
if (!empty($not_body))
{
if (db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE `w_noticias` SET `not_autor` = \'' . $tsUser->uid . '\', `not_body` = \'' .
$not_body . '\', not_active = \'' . $not_active . '\' WHERE not_id = \'' . (int)
$not_id . '\''))
return true;
}
}
/*
newNoticia()
*/
function newNoticia()
{
global $tsCore, $tsUser;
//
$not_body = $tsCore->setSecure($tsCore->parseBadWords(substr($_POST['not_body'],
0, 190)));
$not_active = empty($_POST['not_active']) ? 0 : 1;
$not_type = $tsCore->setSecure($_POST['not_type']) ? 0 : $_POST['not_type'];
if (!empty($not_body))
{
if (db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `w_noticias` (`not_body`, `not_autor`, `not_date`, `not_active`, `not_type`) VALUES (\'' .
$not_body . '\', \'' . $tsUser->uid . '\', \'' . time() . '\', \'' . $not_active .
'\', \'' . $not_type . '\')'))
return true;
}
//
return false;
}
/*
editNoticia()
*/
function editNoticia()
{
global $tsCore, $tsUser;
//
$not_id = intval($_GET['nid']);
$not_body = $tsCore->setSecure($tsCore->parseBadWords(substr($_POST['not_body'],
0, 190)));
$not_active = empty($_POST['not_active']) ? 0 : 1;
$not_type = $tsCore->setSecure($_POST['not_type']);
//
if (!empty($not_body))
{
if (db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE `w_noticias` SET `not_autor` = \'' . $tsUser->uid . '\', `not_body` = \'' .
$not_body . '\', not_active = \'' . $not_active . '\', not_type = \'' . $not_type . '\' WHERE not_id = \'' . (int)
$not_id . '\''))
return true;
}
}
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT not_body FROM w_noticias WHERE not_active = \'1\' ORDER by RAND()');
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT not_body, not_type FROM w_noticias WHERE not_active = \'1\' ORDER by RAND()');
#mensaje-top{
clear:left;
width:100%!important;
height:24px;
line-height:200%;
background:#ffe13e url('images/mensajetopbg.gif') repeat-x bottom left;
text-align:center;
border-top:1px solid #ffe970;
display:block;
}
#mensaje-top {
clear: left;
width: 100% !important;
height: 48px;
text-align: center;
display: block;
}