Código HTML:
//Conexion a la base de datos para añadir ficheros a joomdoc $j = new JConfig(); $dbh = mysql_connect($j->host, $j->user, $j->password) or die('error db'); //Variables $admfilename = $_FILES['photoupload']['name']; $archivo = split('_',$admfilename); $admowner = $archivo[0]; $archivo = split('.',$_FILES['photoupload']['name']); $admname = $archivo[0]; $admsubmitedby = [B][COLOR="Red"]????[/COLOR][/B]; $admdate_published = strftime( "%Y-%m-%d-%H:%M:%S", time() ); $result['size'] = "Subir $admsubmitedby"; $query = "INSERT INTO `jos_joomdoc` (catid, dmname, dmdate_published, dmowner, dmfilename, published, approved, dmsubmitedby) VALUES (7, '$admname', '$admdate_published', '$admowner', '$admfilename', 1, 1, '$admsubmitedby')"; $db = mysql_select_db($j->db, $dbh) or die('error db'); mysql_query($query); mysql_close($dbh);
Código HTML:
$user = JFactory::getUser(); $admsubmitedby = $user->'id'
Código HTML:
$user = JFactory::getUser(0); $admsubmitedby = $user->'id'
Código HTML:
global $my; $admsubmitedby = $my->username;
Código HTML:
$admsubmitedby = JConfig()->user;
Código HTML:
$admsubmitedby = $_SESSION['user']
Código HTML:
$admsubmitedby = $_SESSION['userid']