| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/ees_request/externalpages/ams/ |
Upload File : |
<?php
include('config.php');
define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(__FILE__) );
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
require_once ( JPATH_BASE .DS.'libraries'.DS.'joomla'.DS.'factory.php' );
$mainframe =& JFactory::getApplication('site');
$user =& JFactory::getUser();
$regyear = date('Y');
if (!$user->guest) {
if( $_POST['title']=='' or $_POST['author']=='' or $_POST['magazineCouncil']=='' or $_POST['year']=='' or $_POST['type']=='' ) {
echo "<font color='red'>Πρέπει να συμπληρώσετε όλα τα απαιτούμενα πεδία.</font><br><br>";
echo "[<a href='?option=com_content&view=article&id=32'> Πίσω </a>]";
}
else {
$db_connection=mysql_connect($host, $username, $password, $db_name);
if (!$db_connection) {
die("<br><b>Database Error:</b> Could not connected. Try again later.<br>");
exit;
}
@mysql_select_db($db_name, $db_connection) or die("Unable to select database.");
mysql_query("SET NAMES 'utf8'", $db_connection);
$Q = "INSERT INTO scientific_activity(`id`,`userId`,`author`,`title`,`magazineCouncil`,`tome`,`page`, `year`, `rank`,`type`,`regyear`,`docNumber`)
VALUES('','".$user->id."', '".$_POST['author']."', '".$_POST['title']."', '".$_POST['magazineCouncil']."', '".$_POST['tome']."', '".$_POST['page']."', '".$_POST['year']."', '0','".$_POST['type']."', '".$regyear."', '".$_POST['docNumber']."')";
if(mysql_query($Q)) {
echo "<b><font color='blue'>Επιτυχής Καταχώρηση!</font></b><br>";
echo "[<a href='?option=com_content&view=article&id=31&Itemid=13'> Συνέχεια </a>]";
}
else {
echo "<font color='red'>Υπήρξε Σφάλμα κατά την Καταχώρηση της εγγραφής σας.</font><br><br>";
echo "[<a href='?option=com_content&view=article&id=32'> Πίσω </a>]";
}
}
}
else {
echo "<br><font color='red'>Απογορεύεται η πρόσβαση. Δεν είστε συνδεδεμένοι!</fpnt>";
}
?>