58 lines
984 B
PHP
58 lines
984 B
PHP
<?php header('Content-type: application/json');
|
|
|
|
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/cmeter/');
|
|
|
|
include(PATHTOINCLUDES."base.php");
|
|
|
|
$em="";
|
|
|
|
|
|
$sql="SELECT
|
|
|
|
`bate_blogs_links`.`id`,
|
|
|
|
`bate_blogs_links`.`thelink`,
|
|
|
|
`bate_blogs_links`.`thetext`
|
|
|
|
FROM
|
|
|
|
`bate_blogs_links`
|
|
|
|
ORDER BY `bate_blogs_links`.`thetext`";
|
|
|
|
$result=$database->database_query($sql) or $em=$em.$database->database_error();
|
|
|
|
$rownum=0;
|
|
|
|
$thelink="<ul>";
|
|
|
|
while ($row = $database->database_fetch_assoc($result)) {
|
|
|
|
$rownum=$rownum+1;
|
|
|
|
if($rownum==1)
|
|
|
|
{
|
|
|
|
$thelink=$thelink."<li class=\"bl_firstrow\"><a href=\"".$row["thelink"]."\" target=\"_batelink\">".$row["thetext"]."</a></li>";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$thelink=$thelink."<li><a href=\"".$row["thelink"]."\" target=\"_batelink\">".$row["thetext"]."</a></li>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$thelink=$thelink."</ul>";
|
|
|
|
$arr = array ('error'=>$em, 'thecontent'=>$thelink);
|
|
|
|
echo json_encode($arr);
|
|
|
|
?>
|
|
|