Линк в JSON

Knoppix_

Registered
Здравейте, как мога да извеждам линк в таблица към файла ако името на файла е записано, взимам данните със JSON
ето това ми е кода:

Код:
<?php
	$page = isset($_POST['page']) ? intval($_POST['page']) : 1;
	$rows = isset($_POST['rows']) ? intval($_POST['rows']) : 10;
	$offset = ($page-1)*$rows;
	$result = array();

	include '../config/connect-db.php';
	
	$rs = mysql_query("select count(*) from vatreshna_korespondencia");
	mysql_query("SET CHARACTER SET utf8");
	$row = mysql_fetch_row($rs);
	$result["total"] = $row[0];
	$rs = mysql_query("select * from vatreshna_korespondencia limit $offset,$rows");
	mysql_query("SET CHARACTER SET utf8");
	$items = array();
	while($row = mysql_fetch_object($rs)){
		array_push($items, $row);
	}
	$result["rows"] = $items;

	echo json_encode($result);

?>

Искам в таблицата която визуализира това да извеждам линк към файла които се записва в таблицата MYSQL в полето fille

Ето това е кода с който визуализрам таблицата

Код:
    <?php 
	
	include 'config/connect-db.php';
	$con=mysqli_connect("localhost","username","password","mail_ekoplod");
	//Проверка на връзката
	
	if (mysqli_connect_errno())
 		 {
 			 echo "Грешка при свързването с базата данни: " . mysqli_connect_error();
  		}
	$result = mysqli_query($con,"SELECT * FROM vatreshna_korespondencia ORDER BY id DESC LIMIT 1");
		while($row = mysqli_fetch_array($result))
  		{	
	  		//echo "<pre>" . print_r($row, true) . "</pre>";
	  		$id = $row['id'];
  		}
		$vh_nomer = 000 . $id;
		$new_vh_nomer = $vh_nomer + 1;
	
	
	?>
    <div style="float:left; margin-left:8px; margin-top:5px;">
    <table id="dg" title="Вътрешно фирмена входяща кореспондениця във фирма Екоплод Милево ООД" class="easyui-datagrid" style="width:720px;height:410px"
    url="pages/get_vhodiashta.php"
    toolbar="#toolbar"
    rownumbers="true" fitColumns="true" singleSelect="true" pagination="true">
    <thead>
    <tr>
    <th field="vh_nomer" width="50" align="center">Вх. номер</th>
    <th field="date" width="50" align="center">Дата</th>
    <th field="ot" width="50" align="center">От</th>
    <th field="do" width="50" align="center">До</th>
    <th field="document_type" width="50" align="center">Вид на документа</th>
    <th field="place" width="50" align="center">Съхранение</th>
    <th field="fille" width="50" align="cetner">Файл</th>
    </tr>
    </thead>
    </table>
    <div id="toolbar">
    <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newRecord()">Нов запис</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="removeRecord()">Изтриване</a>
    </div>
    </div>
        <div id="dlg" class="easyui-dialog" style="width:400px;height:380px;padding:10px 20px"
    closed="true" buttons="#dlg-buttons">
    <div class="ftitle">Нов запис</div>
    <form id="fm" method="post" enctype="multipart/form-data">
    <div class="fitem">
    <label>Вх.номер:</label>
    <input name="vh_nomer" class="easyui-validatebox" value="<?php printf("%06d",$new_vh_nomer) ?>">
    </div>
    <div class="fitem">
    <label>Дата:</label>
    <input name="date" class="easyui-datebox">
    </div>
    <div class="fitem">
    <label>От:</label>
    <input name="ot">
    </div>
    <div class="fitem">
    <label>До:</label>
    <input name="do" class="easyui-validatebox">
    </div>
    <div class="fitem">
    <label>Вид на документа:</label>
    <input name="document_type" class="easyui-validatebox">
    </div>
    <div class="fitem">
    <label>Съхранение:</label>
    <input name="place" class="easyui-validatebox">
    </div>
    <div class="fitem">
    <label>Файл:</label>
    <input type="file" name="fille" class="easyui-validatebox">
    </div>
    </form>
    </div>
    <div id="dlg-buttons">
    <a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveRecord()">Запис</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">Отказ</a>
    </div>
 

Back
Горе