<?php
require ("global.php");
InitGP(array('action','l_title','l_url','l_img_url','l_presentation',));
if ($action == 'application_chk'){
	empty($l_title) && strlen($l_url)<10  && Showmsg('application_1');
	
	
	$sql = "SELECT * FROM ".$db_tablepre."link order by l_sort desc";
	$query = sql_return($sql,2);
	$l_sort = $query['l_sort']+1;
	
	empty($l_img_url) ? $l_img_true = 0 : $l_img_true = 1; 
	
	$sql = "INSERT INTO ".$db_tablepre."link (l_title,l_url,l_sort,l_presentation,l_img_url,l_img_true,l_review) VALUES ('".$l_title."', '".$l_url."',".$l_sort.",'".$l_presentation."','".$l_img_url."',".$l_img_true.",0)";
	sql_return($sql) && jumpPage('pub_s','index.php');
}

require PrintEot($self_template);
?>